Questions tagged [django-1.5]

Django 1.5 is a version of the Django framework, released in February 2013. Please only use this tag if your question relates specifically to this version.

Django 1.5 is a version of the Django framework, released in February 2013. Please only use this tag if your question relates specifically to this version.

See the release notes for more details.

275 questions
326
votes
32 answers

Setting DEBUG = False causes 500 Error

Once I change the DEBUG = False, my site will generate 500 (using wsgi & manage.py runserver), and there is no error info in Apache error log and it will run normally when I change debug to True . I'm using Django 1.5 & Python 2.7.3 here is Apache…
zhiguo.wang
  • 4,393
  • 4
  • 16
  • 8
57
votes
1 answer

select_related with reverse foreign keys

I have two Models in Django. The first has the hierarchy of what job functions (positions) report to which other positions, and the second is people and what job function they hold. class PositionHierarchy(model.Model): pcn =…
Paul Tomblin
  • 179,021
  • 58
  • 319
  • 408
49
votes
5 answers

Django allauth social login: automatically linking social site profiles using the registered email

I aim to create the easiest login experience possible for the users of my Django site. I imagine something like: Login screen is presented to user User selects to login with Facebook or Google User enter password in external site User can interact…
neves
  • 33,186
  • 27
  • 159
  • 192
40
votes
6 answers

AUTH_USER_MODEL refers to model .. that has not been installed and created AbstractUser models not able to login

AUTH_USER_MODEL error solved in EDIT3. Passwords still will not save on user creation via form. I'm using Django 1.5 playing around with the new user override/extension features, and I am not able to register new users via my registration form -…
Dan Hoerst
  • 6,222
  • 2
  • 38
  • 51
37
votes
4 answers

Implementing multiple user types with Django 1.5

What is the recommended way to implement multiple user types using Django 1.5's new configurable user model functionality? I would like to have two user types: private users and trade users, each with their own set of required fields. There are two…
gjb
  • 6,237
  • 7
  • 43
  • 71
35
votes
4 answers

AttributeError: 'Manager' object has no attribute 'get_by_natural_key' error in Django?

I am using Django '1.5c1'. I have this line in my settings.py: AUTH_USER_MODEL = 'fileupload.galaxyuser' Here's my Galaxyuser model: class GalaxyUser(models.Model): id = models.IntegerField(primary_key=True) create_time =…
pynovice
  • 7,424
  • 25
  • 69
  • 109
34
votes
5 answers

Migrating existing auth.User data to new Django 1.5 custom user model?

I'd prefer not to destroy all the users on my site. But I want to take advantage of Django 1.5's custom pluggable user model. Here's my new user model: class SiteUser(AbstractUser): site = models.ForeignKey(Site, null=True) Everything works…
B Robster
  • 40,605
  • 21
  • 89
  • 122
29
votes
7 answers

Django: Can class-based views accept two forms at a time?

If I have two forms: class ContactForm(forms.Form): name = forms.CharField() message = forms.CharField(widget=forms.Textarea) class SocialForm(forms.Form): name = forms.CharField() message =…
Houman
  • 64,245
  • 87
  • 278
  • 460
27
votes
6 answers

Integrity error on django_admin_log after updating existing site to new Django 1.5 user model

Apparently after adding my new user table to the site, django_admin_log still has a FK to auth_user table. Any way to address this? I didn't see this problem in staging or locally so something odd must have taken place. Traceback (most recent call…
B Robster
  • 40,605
  • 21
  • 89
  • 122
24
votes
4 answers

Using email as username field in Django 1.5 custom User model results in FieldError

I want to use an email field as the username field for my custom user model. I have the following custom User model subclassing Django's AbstractUser model: class CustomUser(AbstractUser): .... email = models.EmailField(max_length=255,…
OrPo
  • 1,484
  • 3
  • 14
  • 26
24
votes
2 answers

Appropriate way to handle deprecated `adminmedia` templatetag and {% admin_media_prefix %}

From django 1.5 onwards, https://docs.djangoproject.com/en/1.5/releases/1.5/#miscellaneous The template tags library adminmedia, which only contained the deprecated template tag {% admin_media_prefix %}, was removed. Attempting to load it with…
Calvin Cheng
  • 35,640
  • 39
  • 116
  • 167
24
votes
2 answers

Migrate url tags to django 1.5

I'm trying to migrate an old django application to django 1.5, There are 745 urls in different html files as this way: {% url url_name %} If I'm not wrong, this was deprecated and can't be used anymore from django 1.5 (as said here), and I have to…
kastillo
  • 256
  • 5
  • 9
20
votes
5 answers

Django 1.5b1: executing django-admin.py causes "No module named settings" error

I've recently installed Django-1.5b1. My system configuration: OSX 10.8 Python 2.7.1 Virtualenv 1.7.2 When I call django-admin.py command I get the following error (devel)ninja Django-1.5b1: django-admin.py Usage: django-admin.py subcommand…
sultan
  • 5,978
  • 14
  • 59
  • 103
19
votes
8 answers

Changing password in Django Admin

I recently created the admin.py based in the Django Project Document: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.AbstractBaseUser But I really missed the functionality that allow the administrator the…
Thomas
  • 2,256
  • 6
  • 32
  • 47
17
votes
3 answers

django admin inline many to many custom fields

Hi I am trying to customize my inlines in django admin. Here are my models: class Row(models.Model): name = models.CharField(max_length=255) class Table(models.Model): rows = models.ManyToManyField(Row, blank=True) name =…
maazza
  • 7,016
  • 15
  • 63
  • 96
1
2 3
18 19