Django Template for_loop by user

2008-05-05 Thread chiefmoamba
Hi, I'm trying to get a for loop to display data by user. So for example I have the following that will display all 'courses' running in my project: {% if course %} There are Courses The current courses we are running are: {{course|join:", "}} {% else %} There are currently no

Get first_name from User Model in to my Model

2008-05-04 Thread chiefmoamba
Hi, I am having a problem getting data from the user model in to my model (below). I can get the usernames easy enough using "user = models.ForeignKey(User)", but how then do I get the first_name & last_name in to my model from the user model? Any ideas appreciated, Thanks, Ed class

Re: Connect users in models.py to admin site users

2008-04-21 Thread chiefmoamba
hang on, I may have found the answer here: http://groups.google.com/group/django-users/browse_thread/thread/8933164dfc790200/f7ef4498f1391aac?lnk=gst=link+class+to+user#f7ef4498f1391aac On Apr 20, 8:29 pm, chiefmoamba <[EMAIL PROTECTED]> wrote: > Hello, > > I have a model in mod

Connect users in models.py to admin site users

2008-04-20 Thread chiefmoamba
Hello, I have a model in models.py as shown below: class Tutor(models.Model): first_name = models.CharField(maxlength=40) last_name = models.CharField(maxlength=40, core=True) etc... etc... It simply captures fname and lname and adds it to my database. It works. However, the

Re: Admin page doesn't show calendar popup

2008-04-20 Thread chiefmoamba
Hi, I had the same problem earlier - 0.96 on Leopard. How do you switch to trunk? Thanks, Ed On Apr 20, 4:53 pm, sinker <[EMAIL PROTECTED]> wrote: > Switching to trunk WORKED. Thank you so much! > > On Apr 19, 7:42 am, Polat Tuzla <[EMAIL PROTECTED]> wrote: > > > I got the same problem with

Re: DateTimeField calendar not showing

2008-04-20 Thread chiefmoamba
Yes - sorry. In the admin. Thanks. Ed On Apr 20, 1:59 pm, Juanjo Conti <[EMAIL PROTECTED]> wrote: > chiefmoamba escribió: > > > Hi All, > > > For some reason my DateTimeField is not showing a calendar next to the > > 'DateTime' box in my view. My code fr

DateTimeField calendar not showing

2008-04-20 Thread chiefmoamba
Hi All, For some reason my DateTimeField is not showing a calendar next to the 'DateTime' box in my view. My code from models.py is below. Can anyone offer me any suggestions? I am using 0.96. Thanks, Ed from django.db import models class Course(models.Model): course =

Re: Displaying user names on all pages

2008-04-19 Thread chiefmoamba
age.html', {'stuff' : stuf }, > context_instance=RequestContext(request)) > > On Apr 19, 1:36 pm, chiefmoamba <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I am hoping this will be a very simple question for many of you. > > > I have built simple Djang

Displaying user names on all pages

2008-04-19 Thread chiefmoamba
Hello, I am hoping this will be a very simple question for many of you. I have built simple Django login function. When I log in, my log in page will say "Welcome, username" etc. It works beautifully. However, on subsequent pages, eg /nextpage/ even though I have the same code in the page, the

Trying to display a list

2008-01-06 Thread chiefmoamba
I'm sure this will be very easy for most of you... I am trying to display a list. in views.py, I have: from mysite.books.models import Book from django.http import HttpResponse def book_list(request): book = Book.objects.all().order_by('title') return