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
5
votes
1 answer

Testing with a custom user model as a ForeignKey in Django 1.5

I'm using Django 1.5 and I'm trying to make an application work with any custom user model. I've changed the app to use get_user_model everywhere and the app itself is not showing any problems so far. The issue is that I want to be able to test the…
fcoelho
  • 311
  • 4
  • 8
5
votes
1 answer

How to install Django 1.5 using pip?

How to install Django 1.5 ? pip install django==1.5 not working. Is Django1.5 a stable version?
Julie
  • 125
  • 2
  • 6
4
votes
1 answer

Using super() from outside a class in Django (or alternative to it, if any)

For the following I am using Python 2.7 / Django 1.5. I am trying to refactor some production code which overrides Django form's clean() method with a custom validation procedure. It is repeated in several of the forms so we want to abstract it to…
gos1
  • 360
  • 5
  • 10
4
votes
0 answers

get options id from multiple choice form filled with javascript

So I filled a multiplechoicefield with values from a ajax request using Javascript. The problem is that the form object is actually empty so when I want to validate the form it can't get the value from the option field. If I can get the ID('s) from…
ZiXuan
  • 91
  • 1
  • 5
4
votes
1 answer

How can I get support for rfc6532 - unicode in address part of email address - in Django 1.5?

How can I support Unicode in the address part of an email address, under Django? Django 1.5 rejects these outright: >>> from django import forms >>> forms.EmailField().clean('pie@obviously.com') u'pie@obviously.com' >>>…
Bryce
  • 8,313
  • 6
  • 55
  • 73
4
votes
1 answer

Switch to Django Custom User Model, Groups and Permissions

I updated my django 1.4 application with user profiles to use 1.5 Custom User Model. #core/models.py from django.contrib.auth.models import User, UserManager, BaseUserManager, AbstractUser class MyUserManager(BaseUserManager): pass class…
4
votes
1 answer

Subclassing AbstractUser in Django for two types of users

I'm developing a school database system in Django 1.5, and was planning on having a number of different user types (Student, Staff, Parent) which subclass AbstractUser (actually, another abstract subclass of AbstractUser). I was just attempting to…
askvictor
  • 3,621
  • 4
  • 32
  • 45
4
votes
1 answer

Django registration login redirection

With django-registration, I have in settings.py: LOGIN_REDIRECT_URL = '/' When I'm trying to access a page (signed out) like http://localhost:8000/surfboards/current/, I'm redirected to…
Dachmt
  • 2,079
  • 4
  • 29
  • 45
4
votes
3 answers

Save a list of objects in django

I am using django 1.5 and i am trying to do something like this : quotes = formset.save() user = client_form.save() for quote in quotes: quote.client = user quotes.save() But lists dont have a save() method so is there some…
maazza
  • 7,016
  • 15
  • 63
  • 96
4
votes
1 answer

Performing a sed -i on a list of files in stdin

So I recently upgraded Django from 1.4 to 1.5. I found out I need to update all my template codes to add single quotes like from {% url user_detail pk=user.pk %} to {% url 'user_detail' pk=user.pk %} I'm kind of new to bash commands like sed, but…
hobbes3
  • 28,078
  • 24
  • 87
  • 116
4
votes
1 answer

Unable to bound form data after upgrading to django 1.5.1

I just upgraded from django 1.4.5 to django 1.5.1, and noticed that all my form processing code stopped working. Specifically, the form data returned with POST cannot be found anymore. Django code - here I follow the instructions from Django 1.5's…
4
votes
1 answer

Trouble migrating reusable django app models to use a custom user model

I need to update an existing project to Django 1.5 to take advantage of its newly available custom user model. However, I'm having trouble migrating reusable apps that contain a model with a foreign key to a user. Currently, the foreign key points…
SunnySydeUp
  • 6,680
  • 4
  • 28
  • 32
4
votes
1 answer

Tests on Django 1.5 with AUTH_USER_MODEL

I migrated my django application to Django 1.5. I configured AUTH_USER_MODEL and everything looks fine, but when I tried to create some tests I got the following error: DatabaseError: (1146, "Table 'test_X.auth_user' doesn't exist") tests.py class…
Thomas
  • 2,256
  • 6
  • 32
  • 47
4
votes
1 answer

Is it advisable to upgrade to Django 1.5?

I'm currently using 1.4.3. 1.5 will make my front-end development much easier because of the new verbatim template tag. The release candidate was posted a few weeks ago: https://www.djangoproject.com/weblog/2013/jan/04/15-rc-1/ Is it advisable to…
Alan Illing
  • 1,376
  • 2
  • 14
  • 18
3
votes
2 answers

Django: Significance of 'RUN_MAIN' environment variable

While issuing management command runserver, it runs the server with loader. In source code of Django1.5 came across a piece of code where before staring a server in new process/thread , it specifically set the value of RUN_MAIN to 'true' in…
navyad
  • 3,752
  • 7
  • 47
  • 88