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
15
votes
4 answers

how to split the string in django template?

i am trying to split the string in template using custom template filter. But i got an error TemplateSyntaxError at /job/16/ 'for' statements should use the format 'for x in y': for skill in form.instance.skills | split : "," Here it is my…
Akhi
  • 221
  • 1
  • 3
  • 14
14
votes
5 answers

django 1.5 admin inline extra

I have some models with a large number of inlines. Since not all are needed for every object I declared the inline model with extra = 0 so that a small add + appeared on the inline. However, this seems to no longer work in django 1.5. If extra = 0…
Jay
  • 2,519
  • 5
  • 25
  • 42
14
votes
1 answer

When to use the Custom User Model in Django 1.5

I have a question regarding the custom user model in Django 1.5 So right now the default user model looks just fine to me, I just need to add a few other variables such as gender,location and birthday so that users can fill up those variables after…
Iqbal
  • 246
  • 2
  • 10
13
votes
2 answers

Django unittest read-only test databases

I must be missing the obvious here. I am using django 1.5.x and am creating unittests, based on djangos TestCase class. I have a bunch of DBs defined in settings as i am pulling (read-only) from alot of different source. When running test i only…
Mathew
  • 379
  • 2
  • 12
13
votes
2 answers

Python Tuple to Dict, with additional list of keys

So I have this array of tuples: [(u'030944', u'20091123', 10, 30, 0), (u'030944', u'20100226', 10, 15, 0)] And I have this list of field names: ['id', 'date', 'hour', 'minute', 'interval'] I would like to, in one fell swoop if possible, to convert…
DanH
  • 5,498
  • 4
  • 49
  • 72
13
votes
4 answers

Django admin does not login properly with custom User model

I upgraded an app I had on Django 1.4.5 to Django 1.5 and just finished migrating over to a custom User model. When I login to my app, using my own authentication form, with my superuser credentials (created when doing manage.py syncdb) everything…
Sanketh Katta
  • 5,961
  • 2
  • 29
  • 30
12
votes
2 answers

AbstractUser Django full example

I am new to Django and I have been trying this for weeks, but could not find a way to solve this problem. I want to store additional information like user mobile number, bank name, bank account. And want to store the mobile number while user…
vaibhav1312
  • 863
  • 4
  • 13
  • 31
12
votes
1 answer

Django: user.has_perm always true and user is not superuser. Why?

I assigned a permission of a user in my Django 1.5 app. When I list all user permissions with In [1]: user.get_all_permissions() Out[1]: set([u'profile.change_profile']) I can see one permission (which is correct and wanted). The user is also not…
neurix
  • 4,126
  • 6
  • 46
  • 71
12
votes
2 answers

Django - multiple pluralization in admin model

I have googled this for very long time but with no results. I`m beginner to Django so I don't know all features it have. But this problem is very important for client :-( Could you help me, please? So, I have this model defined: from…
tomis
  • 1,884
  • 1
  • 15
  • 28
10
votes
1 answer

Access from django admin list_display, a value from a One-To-One table

Given a one-to-one extension a model, such as the Django User model: class UserProfile(models.Model): user = models.OneToOneField(User, related_name='profile', unique=True) avatar = models.ImageField(_('Avatar')) foo …
Bryce
  • 8,313
  • 6
  • 55
  • 73
10
votes
1 answer

Subclassing django-registration 1.0 forms for django 1.5 custom user models

django-registration 1.0 now has support for django 1.5 custom user models. The django-registration documentation only has the following FAQ item about it: I’m using Django 1.5 and a custom user model; how do I make that work? Although the two…
Jon
  • 9,815
  • 9
  • 46
  • 67
10
votes
2 answers

Django: CBV method form_valid() not called

In my CreateView class I am overriding the form_valid() function as follows: class ActionCreateView(CreateView): model = Action form_class = ActionCreateForm success_url = reverse_lazy('profile') def get_initial(self): …
neurix
  • 4,126
  • 6
  • 46
  • 71
10
votes
2 answers

Can I change the USERNAME_FIELD in Django 1.5 without creating a custom user?

I am trying to use the email field in the default Django user model as the username. I am using Django 1.5 and I saw that the default user has a USERNAME_FIELD property. In my project, I would like to set the following USERNAME_FIELD = 'email' as a…
yellowcap
  • 3,985
  • 38
  • 51
9
votes
1 answer

How to use django translation with GAE?

I have the following setup - folders structure: myapp - conf - locale - ru - LC_MESSAGES - django.mo # contains "This is the title." translation - django.po - templates - index.html setting.py …
LA_
  • 19,823
  • 58
  • 172
  • 308
9
votes
1 answer

Django 1.7 vs Django1.6 vs Django 1.5

I have been developing using Django 1.5 a lot. Is it worth the time to shift from Django 1.5 to Django 1.6 or Django 1.7? I know, In 1.7, migration is into the core of Django. How different is it from south?
user3133084
1
2
3
18 19