Trouble Loading Admin Web Page

2008-01-21 Thread almostvindiesel
Hello all! I'm excited to use the django web framework, but I'm having trouble getting the web admin page to work. After trying to hit http://mydomain.com/admin I get the login screen. After logging on, my server returns (this happens whether I'm in the dev server @ port 8000 or production): #

Re: "unexpected indent" error not allowing me to add the poll app to the admin site

2008-01-22 Thread almostvindiesel
Is it possible to change the python interpreter to treat a single tab character the same as 4 space characters (rather than 8)? On Jan 6, 7:40 pm, Darryl Ross <[EMAIL PROTECTED]> wrote: > >> I was having problems with my text editor. For some reason Python > >> didn't like the way it handled

Form adding new datum instead of updating existing datum

2008-01-22 Thread almostvindiesel
I've created a form that allows a user to edit a datum in a model. However, when a user performs an edit, django adds that value as a new datum rather than editing the existing datum in the database. Any idea what's wrong? #Model # c

Trouble with pattern in urls.py

2008-01-23 Thread almostvindiesel
Hi all, I'm new to regex/django/python, and I'm having trouble getting urls.py to pass a request to a view. Specifically, when I hit: http://django.mysite.com/chef/home/param1/param2/ I'd expect the 3rd from the last pattern to match: ## my urls.py file

Re: Trouble with pattern in urls.py

2008-01-23 Thread almostvindiesel
d Batchelder <[EMAIL PROTECTED]> wrote: > I don't know if the URL you show is literally what you hit or not. If it > is, then it doesn't match because "param1" doesn't match "\d+" which > means one or more digits. Same for param2. > > --Ned. > >

Re: Form adding new datum instead of updating existing datum

2008-01-23 Thread almostvindiesel
Bingo. I assumed (incorrectly) that the ModelForm class would automatically incorporate the PK since it was auto-gened in the Model class. Your fix does the trick. Thanks Rajesh, ~John On Jan 23, 9:55 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Alternatively, you can add the primary key to t

Outputting individual fields of a Model form

2008-01-26 Thread almostvindiesel
I have a ModelForm called RecipeForm built from a Recipe model. In the template, I'd like to output the individual components of the form. Writing {{ form.as_table }} successfully renders the entire form, however, I just want to output individual fields. I figured {{ form['recipe_name'] }} or {