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

Can not find "python manage.py reset" command parameters in django1.6

$python manage.py reset Unknown command: 'reset' Type 'manage.py help' for usage. In django 1.6 whether to cancel this command parameters yet?
Sebastian
  • 49
  • 7
3
votes
1 answer

Django custom assignment_tag does not get executed

I try to make my own assignment template tag in Django 1.6 (edit: I also tried it with 1.5.5 w/o success) but I can't get it to do anything. In templatetags/getattribute.py I have: from django import template import logging register =…
frixx
  • 143
  • 8
3
votes
3 answers

Django custom form ImportError even though file is in the same directory

I'm working through Effective Django's tutorial series. I'm currently having an issue trying to create a custom form to use in an app. I created the forms.py file as instructed in this part of the tutorial, and made the alterations to my views.py…
Weston Odom
  • 311
  • 1
  • 6
  • 17
2
votes
1 answer

Need to fetch one-to-many model within a Queryset such that the Queryset has same record repeated, one for each child/nested model

I am working with Django 1.6 and have a problem statement as follows: Suppose there are 2 models, Author and Book, so there is obvious one-to-many relation for the author and book model. Now, I need to display the Author's data such that, there is…
Varun J
  • 21
  • 1
2
votes
0 answers

django custom field accept and store decimal but return ouput as integer

I have problem statement where I need that my field should store the value as decimal, but while calling it the field should return a rounded Integer value Example mymodel.myfield = 12.61 mymodel.save() Input mymodel.myfield Output 13 and if…
2
votes
0 answers

How to annotate query set with count of field in generic relation with Django ORM using Django 1.6

class Purchase(models.Model): content_type = models.ForeignKey(ContentType) content_uid = UUIDField(auto=False,unique=False) content = generic.GenericForeignKey('content_type', 'content_uid') user = models.ForeignKey(User) class…
Sojan KR
  • 21
  • 4
2
votes
1 answer

Creating Users & Sending Password Resets in Django

I apologize if there has been a substantial answer on this already, I have searched for quite a while and can't find any helpful answers. I have a django project that has varying levels of account access. I have a group of 'Managers' and I want to…
rob
  • 2,119
  • 1
  • 22
  • 41
2
votes
2 answers

Django field with lambda as default value and unique = True

I have got basically this model (other fields left out): class GiftBase(models.Model): """ A base class for describing gift type items. """ uuid = models.CharField(max_length=32, default=lambda: uuid.uuid4().hex,…
Magnus Teekivi
  • 473
  • 1
  • 7
  • 21
2
votes
1 answer

User entered links display as text in Django

I just finished creating a user commenting system on a social networking app I am building with Django (python version 2.7.8, Django verion 1.6). Everything is working well with the commenting system, but I have encountered an issue. If a user…
2
votes
3 answers

Any way to use a Django Model as an Interface?

I have a Base class for many Subclasses, and the only thing changing within the subclasses is a certain method (the template pattern). However I am stuck and can't get it to work. class Base(models.Model): _value =…
C.B.
  • 8,096
  • 5
  • 20
  • 34
2
votes
2 answers

django model field update on a special event

If I define auto_now = True on a DateTimeField, than this field will be updated on every save(). But, how to update this field when something special happened? For example: update DateTimeField only if some other field of the same Model has changed…
mikhdm
  • 109
  • 2
  • 12
2
votes
1 answer

Tweepy rate limit / pagination issue.

I've put together a small twitter tool to pull relevant tweets, for later analysis in a latent semantic analysis. Ironically, that bit (the more complicated bit) works fine - it's pulling the tweets that's the problem. I'm using the code below to…
Withnail
  • 3,128
  • 2
  • 30
  • 47
2
votes
2 answers

Django flatpages template tag doesn't work with template inheritance

I have a Django (1.6) application that inherits a base template. I would like to include one of my (currently working) flatpages into the application landing page, something that the Django docs say is possible. Here is my template: {% extends…
tatlar
  • 3,080
  • 2
  • 29
  • 40
2
votes
0 answers

get_queryset vs. get_query_set, Django 1.5 vs. 1.6

It looks like I have solved the problem by upgrading to Django 1.6. Just curious, what was going on. I am trying to integrate OSQA alongside an existing Django app, and I am encountering some very subtle issues. Just look at that --- this is one PDB…
Sergey Orshanskiy
  • 6,794
  • 1
  • 46
  • 50
2
votes
1 answer

Default format datetime Django 1.6

I have a project in Django 1.6 and a configuration file called formats.py, it is defined as I want the date to appear in my project. In my settings I tell the FORMAT_MODULE_PATH the path to that file,but Django is ignoring this file and whenever I…
Vanderson Ramos
  • 341
  • 1
  • 4
  • 15