Questions tagged [django-1.6]

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

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

See the release notes for more details.

208 questions
5
votes
3 answers

Longer username in Django 1.7

I want to increase the length of the username in django from 30 to around 80, I know it may be duplicate question but the previous answers are not working, for example https://kfalck.net/2010/12/30/longer-usernames-for-django this is for Django…
vaibhav1312
  • 863
  • 4
  • 13
  • 31
5
votes
1 answer

Django custom 500 error template not displaying request.user

I'm implementing custom 404 and 500 templates, but while the 404.html template seems to return request.user.is_authenticated fine, the 500.html template fails to return anything. I also checked for request.user and it's just blank on the 500…
5
votes
2 answers

How to set STATIC_ROOT and MEDIA_ROOT so the path used is not hard coded?

In my settings.py file both the STATIC_ROOT and MEDIA_ROOT both currently point to a hard coded location. For example the STATIC_ROOT path is: /home/ian/projectname/mysite/appname/static I know this will cause problems when I deploy my project.…
Ian Carpenter
  • 8,346
  • 6
  • 50
  • 82
5
votes
1 answer

Why is "django.core.context_processors.request" not enabled by default?

I was troubleshooting a problem with obtaining the request obj with a new project and realized "django.core.context_processors.request" was commented in vanilla installs of Django. Like the title suggests, why would this seemingly helpful context…
BeepBoop
  • 1,282
  • 10
  • 12
5
votes
1 answer

Django1.6 transaction.atomic questions

I just switched to Django 1.6 (with Posgres 9.1) and there is a few questions that I couldn't answer myself: (Answered) Is there a statement that prints/shows me if I am currently inside one or more and in which transaction.atomic…
kev
  • 8,928
  • 14
  • 61
  • 103
4
votes
1 answer

Django 1.6: How to ignore a fixture in python manage.py loaddata?

I need an answer for this, right now im doing this command: python manage.py loaddata app/myapp/fixtures/* --settings=setting.develop This works fine, but now i want to do this same command but ignoring or skiping a simple file inside…
C. Herrera
  • 71
  • 1
  • 8
4
votes
1 answer

How to use python-social-auth with google only?

I'm trying to add google authentication to my project I installed it: pip install python-social-auth and added it in settings.py: SOCIAL_AUTH_USER_MODEL = 'accounts.CustomUser'## SOUTH_MIGRATION_MODULES = { 'default':…
4
votes
2 answers

Django aggregate average of an annotation sum (1.6.5)

Currently trying to grab an average of a sum of a group by, but when I try to execute the correct queryset it complains of incorrect syntax objs = MyModel.objects.filter(...).values('user', 'value') objs = objs.annotate(sum=Sum('value')) # i've…
C.B.
  • 8,096
  • 5
  • 20
  • 34
4
votes
4 answers

Can't customize django ckeditor toolbar

I installed django-ckeditor==4.4.8 on django1.6 But I get a minimum of buttons in the toolbar, I tried to change the toolbar to get more options, specially to be able to add pictures this is what I get: and these are my settings: #ckeditor…
Armance
  • 5,350
  • 14
  • 57
  • 80
4
votes
1 answer

How is post_delete firing before delete in Django?

I am seeing post_delete fire on a model before the instance is actually deleted from the database, which is contrary to https://docs.djangoproject.com/en/1.6/ref/signals/#post-delete Note that the object will no longer be in the database, so be…
Steve
  • 5,771
  • 4
  • 34
  • 49
4
votes
1 answer

Issue with CSRF token cookies in Django 1.6

We've been experiencing issues with duplicate CSRF token cookies in Django in our most recent release. We just upgraded from Django 1.4 to 1.6 and we never had any issues back in 1.4. Basically, everything starts fine for each user, but at some…
Scott
  • 61
  • 6
4
votes
1 answer

How to add a line number to each row of a tabularinline block

I have a ModelAdmin class with an inline of type TabularInline. What I would like is for each row of the TabularInline to have a line number displayed to the left of it. This number would increment as new records are added to the inline, and would…
rhoward99
  • 59
  • 3
4
votes
0 answers

Is the chaining order of filter(...) and exclude(...) crucial?

Is there no difference between the following examples? Query 1: objects.filter(a=b).exclude(c=d).filter(e=f).exclude(g=h).distinct() Query 2: objects.filter(a=b).filter(e=f).exclude(c=d).exclude(g=h).distinct()
Tom Maier
  • 293
  • 3
  • 12
4
votes
3 answers

Django code executed by post_save signal happens within atomic transaction

Upgrading to Django 1.6 has introduced a tricky problem into my code: database operations that are triggered by a post_save signal are getting contained within the with transaction.atomic(): block of Django's get_or_create(). The impact for me…
probabble
  • 444
  • 4
  • 13
3
votes
2 answers

LocaleMiddleware redirects on a non-i18n url pattern

I'm using Django's LocaleMiddleware to internationalize a part of the website I'm working on. Here is my project's urls.py: from django.conf.urls import patterns, include, url from django.conf.urls.i18n import i18n_patterns urlpatterns =…
julienc
  • 19,087
  • 17
  • 82
  • 82
1 2
3
13 14