Re: How to access SplitDateTime field elements in template

2008-12-23 Thread rtmie
) created = forms.SplitDateTimeField(initial=datetime.datetime.now (), widget=adminWidgets.AdminSplitDateTime) in template: {% trans "Created:" %} {{ form.created }} I'm still curious on the original question though Rob On Dec 22, 12:45 pm, rtmie wrote: > I

How to access SplitDateTime field elements in template

2008-12-22 Thread rtmie
I have a form with a SplitDateTimeField and cannot figure out how to access the individual date and time elements in it from my template: class Dummy1(models.Model): name = models.CharField(max_length = 100) created = models.DateTimeField(default = datetime.datetime.now()) class Dummy

Re: Problem with field validation in 1.02

2008-12-16 Thread rtmie
OK, got it working: changed view code to: if request.method =='POST': form = AppUserForm(request.POST,request.FILES) On Dec 15, 2:48 pm, rtmie wrote: > H i , > I am trying to migrate a project from 0.95 to 1.02 and so have to > migrate all of my old model based val

Problem with field validation in 1.02

2008-12-15 Thread rtmie
H i , I am trying to migrate a project from 0.95 to 1.02 and so have to migrate all of my old model based validator stuff in the new forms style( my first encounter with the new forms style). I am having a problem with the following: in my model I have a AppUser class, with username , password ,

Problem with field validation in 1.02

2008-12-15 Thread rtmie
H i , I am trying to migrate a project from 0.95 to 1.02 and so have to migrate all of my old model based validator stuff in the new forms style( my first encounter with the new forms style). I am having a problem with the following: in my model I have a AppUser class, with username , password ,

How to save file with name based on PK of DB entry

2006-07-26 Thread rtmie
Hi, I would like to be able to do the following: Upload a file to my app along with some meta data. Store the filepath in the table using a FileField. However I would like to override the uploaded filename to be used in the file store to some unique system generated, preferrably numeric, name. I