How to add timezone support in Django (1.5) admin

2013-11-26 Thread Carlos Villavicencio


I am using django 1.5 with pytz. Currently all the datetimes stored in the 
database are in UTC. The frontend application is timezone aware (users 
worldwide), that means that I store the user timezone in his profile. 
Administration is using the default timezone as in settings.py (UTC).

What about if I want to give access to some user in another timezone (say 
-5), so for his sake it would be perfect to convert the times to his 
timezone, even the inputs, so when he edit a field, an automatic conversion 
to UTC will performed to update the value in DB.

What would be the approach to perform this change/hack/configuration in 
django administrator so it set a session timezone.

Thank you all

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c5556926-b866-4c13-ae2e-d0607bb40923%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Couple of random Error 500 issues

2013-09-20 Thread Carlos Villavicencio
Hello,

I have a django project running on digitalocean (in a 512M server) and 
suddenly it appears Error 500 on the Apache. 

I'm running wsgi and only 2 users (because we are starting)

Looking on the logs, the errors were the following:

1. ImproperlyConfigured: Error importing middleware 
django.middleware.transaction: "cannot import name transaction"
2. OSError: [Errno 12] Cannot allocate memory

The first error occurs more than the second one.

Does the 512M server is fine for a django production project?
The middleware transaction is correctly configured in settings.py, why I 
get "randomly" this error? Maybe a concurrency issue?

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.