Giter VIP home page Giter VIP logo

appointment-reminders-django's Issues

sms time come in UTC

Hi

When I receive the sms it come in UTC when my appointment is set to Asia/Dubai.
I got it working using arrow convert method like this in tasks.py file:

@dramatiq.actor
def send_sms_reminder(appointment_id):
    """Send a reminder to a phone using Twilio SMS"""
    # Get our appointment from the database
    try:
        appointment = Appointment.objects.get(pk=appointment_id)
    except Appointment.DoesNotExist:
        # The appointment we were trying to remind someone about
        # has been deleted, so we don't need to do anything
        return

>     appointment_time = arrow.get(appointment.time)
>     appointment_zone = appointment_time.to(appointment.time_zone)
>     body = 'Hi {0}. You have an appointment coming up at {1}.'.format(
>         appointment.name,
>         appointment_zone.format('h:mm a')
>     )

    client.messages.create(
        body=body,
        to=appointment.phone_number,
        from_=settings.TWILIO_NUMBER,
    )

redis connection errors with Heroku build

I just deployed your Heroku build which was quick and easy(big Thumbsup), however my tests are failing and I'm seeing this repeatedly in the logs:
2016-01-13T03:56:39.597179+00:00 app[worker.1]: [2016-01-13 03:56:39,596: INFO/MainProcess] mingle: all alone
2016-01-13T03:56:39.693661+00:00 app[worker.1]: [2016-01-13 03:56:39,693: INFO/MainProcess] mingle: searching for neighbors
2016-01-13T03:56:39.628728+00:00 app[worker.1]: [2016-01-13 03:56:39,627: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection...
2016-01-13T03:56:39.628730+00:00 app[worker.1]: Traceback (most recent call last):
2016-01-13T03:56:39.628731+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.4/site-packages/redis/connection.py", line 577, in read_response
2016-01-13T03:56:39.628732+00:00 app[worker.1]: response = self._parser.read_response()
2016-01-13T03:56:39.628732+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.4/site-packages/redis/connection.py", line 255, in read_response
2016-01-13T03:56:39.628733+00:00 app[worker.1]: raise error
2016-01-13T03:56:39.628734+00:00 app[worker.1]: 2016-01-13T03:56:39.628734+00:00 app[worker.1]:
2016-01-13T03:56:39.628735+00:00 app[worker.1]: During handling of the above exception, another exception occurred:
2016-01-13T03:56:39.628735+00:00 app[worker.1]: 2016-01-13T03:56:39.628735+00:00 app[worker.1]:

Is it pebcak or is there a real problem?

AttributeError: module 'dramatiq.middleware' has no attribute 'Prometheu

I am getting below mention error on windows. please advice

(venv) C:\Users\xx\Desktop\appointment-reminders-django-master>python manage.py runserver
Unhandled exception in thread started by <function check_errors..wrapper at 0x000001DD96A8A6A8>
Traceback (most recent call last):
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception
raise exception[1]
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\core\management_init
.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\apps\registry.py", line 89, in populate
app_config = AppConfig.create(entry)
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django\apps\config.py", line 116, in create
mod = import_module(mod_path)
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django_dramatiq\apps.py", line 3, in
from .tasks import broker # noqa
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django_dramatiq\tasks.py", line 33, in
middleware = [load_middleware(path) for path in broker_settings.get("MIDDLEWARE", [])]
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django_dramatiq\tasks.py", line 33, in
middleware = [load_middleware(path) for path in broker_settings.get("MIDDLEWARE", [])]
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django_dramatiq\tasks.py", line 26, in load_middleware
return load_class(path_or_obj)()
File "C:\Users\xx\Desktop\appointment-reminders-django-master\venv\lib\site-packages\django_dramatiq\tasks.py", line 22, in load_class
return getattr(module, class_name)
s'

Quickstart "Deploy to Heroku" button in the README fails

"Build app" step fails with

-----> Python app detected
-----> Installing python-3.4.3
-----> Installing pip
-----> Installing requirements with pip
       /app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51/bin/steps/pip-install: line 5: /app/.heroku/python/bin/pip: No such file or directory
 !     Push rejected, failed to compile Python app.
 !     Push failed

manage.py migrate errors

When running python manage.py migrate after creating the appointment_reminders DB, I kept getting a slew of errors saying no password authentication. I tried many things, but then found that we need to add a user and password to the common.py file under DATABASES:

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'appointment_reminders',
'USER': 'postgres',
'PASSWORD': 'yourpassword',
}
}

I hope this helps!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.