Re: DateTimeField TypeError: replace() takes no keyword arguments?

2005-08-20 Thread jtm
It's not Django, it's me. Between the caffeine and lack of sleep and looming deadline, skimming the Django documentation led me to believe that you attach foreign keys like so: a = aClass() b = add_aClass(a) where is I should have been saying: a = aClass(b_id=b.id) Unless there is another

Re: Sorting object_list in generic views

2005-08-20 Thread Adrian Holovaty
On 8/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > By the way, do you have an estimated release date for 1.0? We don't have an official date set, but we have a roadmap here: http://code.djangoproject.com/milestone/Version%201.0 We'll consider it ready for 1.0 release when we've closed

Re: Sorting object_list in generic views

2005-08-20 Thread Adrian Holovaty
On 8/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm trying to sort a generic list from the > django.views.generic.list_detail.object_list generic view > > It seems that all of the items below are returning the same results: > > {% for log in object_list|dictsortreversed:"timestamp"

Re: Questions about Django model exceptions and request data

2005-08-20 Thread Adrian Holovaty
On 8/20/05, jtm <[EMAIL PROTECTED]> wrote: > Do exceptions like "PollDoesNotExist" get generated in a similar manner > that the lookups do? > > I find that when processing a request, Django is throwing me exceptions > like "RespondentDoesNotExist", but if I try and catch that exception, > rather

Global models

2005-08-20 Thread [EMAIL PROTECTED]
Hi all, I've built up a couple of simple applications inside a single project. Currently, both have defined a 'Tag' model to allow various things to be tagged in a del.icio.us style. What I'd like to do is to have the same Tags used in both applications. Can anyone give me some

DateTimeField TypeError: replace() takes no keyword arguments?

2005-08-20 Thread jtm
This one has me stumped. I have a mySession class with three DateTimeFields along these lines: meta.DateTimeField('session_start', 'Session Start Time', auto_now_add=True) when I create a new mySession instance and try to .save() it, I get the following Traceback: Traceback (most recent call

Help me checking this model.. (tb included)

2005-08-20 Thread paolo
This is my solution to add to a recipe an arbitrary number of ingredients, each of them with a quantity specified. from django.core import meta class Ingredient(meta.Model): fields = ( meta.CharField('name', 'Name', maxlength=128), meta.TextField('description', 'Description',

Re: Problem

2005-08-20 Thread PythonistL
Problem solved. The reason was that DJANGO_SETTINGS_MODULE variable had to be set up globally. In other words if I set up DJANGO_SETTINGS_MODULE in one command console and try following command: from django.models.shop import * from Python shell opened in a new command console (without setting

Questions about Django model exceptions and request data

2005-08-20 Thread jtm
Hiya. Do exceptions like "PollDoesNotExist" get generated in a similar manner that the lookups do? I find that when processing a request, Django is throwing me exceptions like "RespondentDoesNotExist", but if I try and catch that exception, rather than using a bare "except:" statement, I get

Problem

2005-08-20 Thread PythonistL
After I finished tutorials I wanted to start playing with my own application. So I created my new project called shopproject and defined my model like this shop.py# from django.core import meta class Registration(meta.Model): fields = (