Hi djangonauts,
> System check identified some issues:
> HINT: ForeignKey(unique=True) is usually better served by a OneToOneField.
I would like to keep using ForeignKey(unique=True) for this particular
model, and mark the warning as disabled for this model only (keep it
enabled project-wide f
Hi all,
I think I've found a strange case where QuerySet.count() does not match
len(queryset), and the behaviour is certainly unexpected.
But I'm not sure whether this is a bug, some mistake on my part, or a known
limitation of combining .extra(), .distinct() and .count().
I am aware of the defa
Hi all,
I've seen DateTimeField's auto_now and auto_now_add parameters often
described as "buggy" or "error-prone". For example:
https://code.djangoproject.com/ticket/22995
https://groups.google.com/forum/#!topic/django-developers/TNYxwiXLTlI
The ticket proposes to document these downsides or pr
> Are there any obvious solutions that I have over looked? Or am I stuck
having to use django to serve the files?
Depending on the security that you aim to achieve, one option would be to
add a custom file storage implementation that overrides
https://github.com/django/django/blob/master/django/c
Hi all,
I have been asked to build a single-page, ajax based data entry interface
for a moderately complex set of models. There are 5 models, linked into a
tree structure by foreign keys. The number of children for each model is
variable, so there could be up to 4 levels of nested formsets.
I can
https://github.com/coderholic/django-cities parses the GeoNames
export, and makes it very easy to integrate into Django apps.
On Tue, Feb 26, 2013 at 11:32 AM, Daniel Blasco wrote:
> This is a useful resource http://download.geonames.org/export/dump/
>
>
> On Monday, February 25, 2013 7:05:54 AM
Hi all,
I would like to define multiple abstract base models with small set of
fields each. The "real" models inherit from multiple mixins to add the
fields.
For example:
class Taggable(?):
tag = models.CharField()
class Visible(?):
visible = models.BooleanField()
class SomeFullModel(?, T
nd make all
editable=False fields show up as readonly: after all, their data is
still interesting to look at, just should not be editable.
Mattias
On Wed, Sep 5, 2012 at 1:37 PM, Mattias Linnap wrote:
> Hi all,
>
> I have a model X that references another model Y with a ForeignKey.
> There
Hi all,
I have a model X that references another model Y with a ForeignKey.
There are very few Xs, but close to a million Ys in the database (and
it will grow considerably in the future).
This causes MemoryErrors in the Django built-in admin pages: the
ForeignKey is rendered as a select box field,
It is possible to override the save() method in a model to add functionality:
https://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods
Another choice would be to register a receiver for the pre_save or
post_save signals:
https://docs.djangoproject.com/en/dev/ref/models/inst
Hi all,
I'm trying to build a nice authentication flow for a website.
In my opinion, a good flow would be:
0. There are no usernames, emails are used instead,
1. User signs up by just entering their email address,
2. An account is created for them, and a temporary plaintext password,
along with a
Hi Django users,
I'm building an application with Django, and I need some database
changes to occur at certain times in the future - independently of any
web request. Things like cleaning up expired sessions, deleting
expired user actions, etc.
What is the best way to implement those?
1) Make a s
I'm using Django 1.2.3 with Python 2.6.
I would like to use the new fancy unittest asserts available in Python
2.7. These have been backported to Python 2.6 as the unittest2 module
(http://www.voidspace.org.uk/python/articles/unittest2.shtml).
But at the same time, I would like to use test fixtures
13 matches
Mail list logo