Unique set of fields in a model

2010-04-30 Thread cornflake
Hello, I'm looking for a way to define uniquness for a set of more than one field in a model. For example: class Item(models.Model): order = models.ForeignKey(Order) number = models.IntegerField() ... I want the number to be unique per order, and not unique throughout the

Re: While trying to set up Django on Windows: Attrib uteError: ‘Settings’ object has no attribute ‘DATABASE S’

2010-04-26 Thread cornflake
you should try looking in your settings.py file and check for database > field there and see if you defined that field. > > > > > > On Tue, Apr 27, 2010 at 9:26 AM, cornflake wrote: > > Dear Django users, > > Although my question is about the installation of Django a

While trying to set up Django on Windows: AttributeE rror: ‘Settings’ object has no attribute ‘DATABASES’

2010-04-26 Thread cornflake
Dear Django users, Although my question is about the installation of Django and not about its usage, I really hope you can help me, because I've been struggling with this for hours. I'm following the Django on Windows Howto. I have installed Python 2.6, PostgreSQL 8.4, Psycopg 2.0.14 for Python 2