How I get the time zone of logged user by using Django? - django

I want to manage(such as Change the default language) the country region details of in my Django website. Does anyone have a best way to do that?

There is no built-in way in Django to achieve that. See adamcharnock/django-tz-detect. The project is maintained well, still active and has an easy-to-understand documentation.

Related

How do i retrieve browsers history in python django?

I want to display all the Internet History Information of a system using Python?
Try this, Hope If this works,
Help to track given user is browsing a Django website
https://github.com/aaugustin/django-userlog
There is no way to do what you want, by design.

what's the best django profile / user settings application around?

I'm looking for a good django app that brings to me basic features like
user profile editing
password changing
save settings / preferences specific to my app
save authentication keys to external apps (twitter, rtm, facebook, ...)
I know how to extend the normal user model (see docs http://www.djangobook.com/en/1.0/chapter12/#cn222)
and there are also these apps around:
django-profile/
idios (on github)
django-account/
however, none of them seems to be ideal for what I want.
Therefore, my question is, does anyone know a app that is better / more mature / more feature rich that I just didn't find?
Or do I have to roll my own app?
I use django-userena.
https://github.com/bread-and-pepper/django-userena
demo: http://www.django-userena.org
I am sorry to inform you that you will (for now) have to put together a custom solution using django-registration/django-profiles along with django-socialregistration.
Start here with and progress to Socialnetwork Authentication. On the up side, django is young so solid solutions are in the near future and you will be part of them. ;-)

Django Admin: Allow email as a username?

I've recently inherited a django project and I'm facing a serious amount of bugs/issues and ...quirks that need to be fixed. As I'm coming from a php background (don't ask), I'm having a ...challenging time.
In terms of the Django admin, It will not accept any email address as a username. However, IN our front-end - the previous developer designed the system in such a way that the application used an email address as the username. This is fine in the frontend, but we can't save any changes we make to a user in the admin section ¬.¬
Is there any way to fix this WITHOUT updating our django installation to v1.2 (NOT an option) and WITHOUT modifiying any of the Django.contrib files?
I've heard good things about extending these classes/method, but I'm very unsure how to proceed.
Looking at websites online, they suggest writing a custom backend, etc...? Is the the right way to go about it? I'm not too confident a djanog programmer though, and considering this is to do with User Logins, I'd be VERY unconfident about any solution I could write.
Is there an easy way I can simply override the username validation method to accept an # and be over 30 chars?
This snippet might be helpful:
Use email addresses for user name
If you use django1.2.1 there is no problem: http://docs.djangoproject.com/en/1.2/topics/auth/#fields

Tracking changes to Django Model instances

When you create or modify an object instance in Django's admin, a changelog entry is created. This is really nice for fairly obvious reasons.
However my model's instances created by a normal user outside of the admin interface. No changelog is recorded to note its creation (not a huge issue) but I would like to track edits the user makes.
I also want to show the user this full log (user+admin edits) in the frontend so I need a way to pull the changelog out.
My question: how? Is there a one-line switch I can flick to enable full logging or do I have to dig in and do something on my user's edit form logic?
django-reversion is an app designed to help with that.

Admin interface editable Django app settings

Is there a good way provide user configurable app settings in Django admin?
Basically I would like to have a nice forms where site owner can easily edit such one off information as his contact information, front page text content, etc. Sort of like a normal admin interface of a model, but limited to only one undeletable item in the model.
I think django constance is the way to go. Alive and compatible with django 1.4.
The third-party project django-dbsettings is ideal for this.
I looked at dbsettings and liked some of what I saw, but I really wanted a more centralized, organized system. So I built django-appsettings. Enjoy :)
Found this: django-livesettings