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
3
votes
2 answers

How to get table name from Django filter objects

I have diffrent tables with same columns Like class teachers(models.Model): x= models..CharField(max_length=250, blank=True, null=True); y= models..CharField(max_length=250, blank=True, null=True); class students(models.Model): x=…
Bamaboy
  • 229
  • 1
  • 4
  • 13
3
votes
2 answers

cannot run django_quiz app. manage.py not found

I was trying to install the django_quiz app that was found on github. https://github.com/tomwalker/django_quiz And as you can see below, i've installed all requirements. but there's no manage.py. How do i start and run the project? Things I did…
3
votes
0 answers

Upgrading from Django 1.6 to 1.8 annotate logic change

I just upgraded from Django 1.6 to 1.8 due to numerous reasons. I noticed some changes in the displayed data on my application. Maybe someone can help me find the issue, please. This is my code: users = __apply_filters(User.objects.all(),…
Irene Texas
  • 1,731
  • 2
  • 12
  • 8
3
votes
0 answers

django inlineformset_factory without model

I want a feature akin to the django inlineformset_factory but I want it without having to deal with the models. Basically, I just need a vanilla form with a formset_factory as its field. Is there any such method/library?
nKandel
  • 2,543
  • 1
  • 29
  • 47
3
votes
2 answers

Django no sessionid in cookie

Im using Mongo Engine/REST Framework with Django 1.6. All I need is for the client to get a sessionid when he hits one of the views. However at the moment no sessionid is present in the cookie. views.py @csrf_exempt def updateInput(request): …
felix001
  • 15,341
  • 32
  • 94
  • 121
3
votes
2 answers

Django admin model add_view: how to remove "save and add another" buttons?

I was able to remove the "save and add another" and "save and continue editing" buttons by implementing the following code: # At the start of my admin.py file I have: from django.contrib.admin.templatetags.admin_modify import * from…
3
votes
1 answer

Sending mail with an absolute_uri when a model is created (without a request object)

I'm trying to do something that seems relatively simple, but I'm completely stumped. I have a model, and I want to send an e-mail out once an instance is created for the first time. I can do this easily enough using…
Gravity Grave
  • 2,802
  • 1
  • 27
  • 39
3
votes
4 answers

How can a form within a formset know it's index within the formset?

I have a basic Form subclass with a formset generated such as: MyFormset = formset_factory( MyForm, extra=5, max_num=5, ) I would like to be able to access the index of the form from within the form.save() and form.__init__ methods.
DanH
  • 5,498
  • 4
  • 49
  • 72
3
votes
2 answers

Django 1.6 HTTP_X_CSRFTOKEN header ignored if csrf cookie is missing

I have AJAX code which makes POST requests to a Django 1.6.4 application. The view has CSRF protection enabled via the django.middleware.csrf.CsrfViewMiddleware. If I do not pass a cookie but do pass the HTTP_X_CSRFTOKEN, it fails. I am looking at…
Krystian Cybulski
  • 10,789
  • 12
  • 67
  • 98
3
votes
1 answer

Clarification on django syncdb --all option

I am trying to understand what exactly ./manage.py syncdb --all does? I recently had a database issue that I was able to fix by running this command but I am not exactly sure what it does behind the scenes. I understand that syncdb creates the…
user3282276
  • 3,674
  • 8
  • 32
  • 48
3
votes
1 answer

Django1.6 IntegrityError despite transaction.atomic()?

Within transaction.atomic() I am deleting and re-creating objects. Django sits behind a 3-worker gunicorn, database is postgres. Issue: When hitting the server with a lot of requests simultaneously, Django is throwing a few…
kev
  • 8,928
  • 14
  • 61
  • 103
3
votes
0 answers

Django dynamic permissions for instance of custom model

I have a model of which instances are created by my site users. User can also share those instances of that model with other users. I will create functions like can_view(), can_change(), can_delete() for them. I know how to do it with another…
Umair A.
  • 6,690
  • 20
  • 83
  • 130
3
votes
2 answers

How can I make a query with contains over date/datetime fields

Im trying to use the datatables jQuery plugin with date/datetime fields. and when you make the query that contains those field generates a MySQL Warning when you try to use __contains in the queryset. I've detected that if you try to make queries…
MikeVelazco
  • 885
  • 2
  • 13
  • 30
3
votes
2 answers

Why do I need to run the postgresql nextval function? And how to prevent it?

I just had an issue with Django and PostgreSQL that I don't understand. I have a simple model, defined such as: class MyModel(models.Model): my_field = models.IntegerField() my_other_field = models.TextField() In my view, i have something…
Paco
  • 4,520
  • 3
  • 29
  • 53
3
votes
0 answers

How to setup django-fluent-comments on Django 1.6?

I am trying to use django-fluent-comments along with Django 1.6. I tried following their github README tutorial for setting it up but some features like threaded comments and AJAX are not working. my settings.py has this INSTALLED_APPS += ( …