Models not validating

2008-10-25 Thread AdamC
I'm really at sea here with my models. I used to have an application in python with cgi, which would allow children to solve simple multiplication problems and earn points for their team, which is then displayed in a league table. I thought it would be fun to port this over to django to see how i

Re: Models not validating

2008-10-25 Thread AdamC
2008/10/25 Manuel Held <[EMAIL PROTECTED]>: > > > Hi Adam, > > use: > > table = models.OneToOneField(Table) > > instead of > > table = models.OneToOneField('Table') > > You don't have to use ' there. > > Happy Coding > > Manuel > Thanks Manuel - even if I take that out, I'm still getting the err

Migration problems (old svn version to 1.0 and new server)

2008-10-19 Thread AdamC
I'm migrating my application (a simple film database) to another server. I installed version 1.0 of django on the new server and set up apache with mod_python (which was the same setup on my old server). However, I seem to be having some problems. When I try and login to my application (which se

Re: Migration problems (old svn version to 1.0 and new server)

2008-10-19 Thread AdamC
2008/10/19 Jarek Zgoda <[EMAIL PROTECTED]>: > > Wiadomość napisana w dniu 2008-10-19, o godz. 20:25, przez AdamC: > >> Template error >> >> In template /home/adam/apps/films/templates/includes/nav.html, error >> at line 1 >> Cau

Re: Migration problems (old svn version to 1.0 and new server)

2008-10-20 Thread AdamC
2008/10/20 Jarek Zgoda <[EMAIL PROTECTED]>: > > Wiadomość napisana w dniu 2008-10-19, o godz. 21:19, przez AdamC: > >>>> In template /home/adam/apps/films/templates/includes/nav.html, error >>>> at line 1 >>>> Caught an exception while rendering:

Re: Migration problems (old svn version to 1.0 and new server)

2008-10-20 Thread AdamC
2008/10/20 Karen Tracey <[EMAIL PROTECTED]>: > 2008/10/20 AdamC <[EMAIL PROTECTED]> >> >> They all import fine. >> >> I do have @login_required at the beginning of a few functions. Has >> this changed since v1.0? > > You mean since 0.96?

Re: Migration problems (old svn version to 1.0 and new server)

2008-10-20 Thread AdamC
2008/10/20 Karen Tracey <[EMAIL PROTECTED]>: > On Mon, Oct 20, 2008 at 4:36 PM, AdamC <[EMAIL PROTECTED]> wrote: >> >> I'm running the latest checkout using svn as per the download >> instructions on the djangoproject site. >> > > OK, now that you

Admin problem with user profile model.

2008-06-29 Thread AdamC
I have a couple of models whereby the admin interface is throwing up some errors when I try add details to the user profile. Each user will have a points score and belong to a team, which will aggregate all the scores of those users belonging to that team. My models look thus: class Team(model

Re: Admin problem with user profile model.

2008-06-29 Thread AdamC
On Sun, Jun 29, 2008 at 4:44 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Sun, Jun 29, 2008 at 11:27 AM, AdamC <[EMAIL PROTECTED]> wrote: >> >> I have a couple of models whereby the admin interface is throwing up >> some errors when I try add details to the u

Re: Admin problem with user profile model.

2008-06-29 Thread AdamC
On Sun, Jun 29, 2008 at 5:17 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Sun, Jun 29, 2008 at 12:05 PM, AdamC <[EMAIL PROTECTED]> wrote: >> >> Thanks Karen. The user profile part works a treat now, until I >> implement the team foreign key on the user pr

Querying a User profile

2008-06-29 Thread AdamC
I have two models, UserProfile and Team[2]. I want to create a Team page which lists all the users who belong to that team. I'm not sure how to specify this in my view. [1] The problem I run into is that team doesn't exist within User. Any advice on how to query User for a particular team name?

Re: Querying a User profile

2008-06-29 Thread AdamC
On Mon, Jun 30, 2008 at 12:08 AM, Peter Rowell <[EMAIL PROTECTED]> wrote: > >> Any advice on how to query User for a particular team name? > > Since the relationship is between Team and UserProfile, I believe > that's where you need to start. Something like this would work: > > team = Team.objects