import request ? - django debugsqlshell

2010-04-22 Thread Daxal
call last): File "", line 1, in NameError: name 'request' is not defined Anyone know what the command is to import request? I checked many websites on google and search forums but did not find anything. Thanks for you help. Daxal -- You received this message because

Re: Saving many to many fields

2010-04-20 Thread Daxal
, **kwargs): super(cvdb, self).save(*args, **kwargs) ** save m2m fields ** super(cvdb, self).save(*args, **kwargs) so I am not quite clear on how to create that instance to pass in? thanks for the help :) On Apr 20, 12:32 pm, Tom Evans wrote: > On Tue, Apr 20, 2010 at 5:28 PM, Daxal wr

Saving many to many fields

2010-04-20 Thread Daxal
Hi guys, I am trying to save manytomany fields in the database. -- view --- def cvdetails(request, id): if request.method == 'POST': form = cvdbForm(request.POST) if form.is_valid(): *save functions here* request.flash.notice = "Save successful"

Re: modelmultiplechoicefield show as null on the template -2

2010-04-16 Thread Daxal
es (one is using modelform and second is just putting fields in the form - the more traditional approach) thank you for your help p.s. any other suggestions? i am searching on web really clueless as to what's happening. On Apr 16, 11:21 am, Tom Evans wrote: > On Fri, Apr 16, 2010 at 4:1

Re: populating manytomany fields on template

2010-04-16 Thread Daxal
eing "super user" but i still get the error type object: "cvdb" does not have attribute "id" no idea why. must be the lines below it. any thoughts? thank you On Apr 16, 11:19 am, Tom Evans wrote: > On Fri, Apr 16, 2010 at 4:01 PM, Daxal wrote: > > hi

Re: modelmultiplechoicefield show as null on the template -2

2010-04-16 Thread Daxal
for every single page. so my cvdetails.html extends application.html but it gives me this error when it does not for any other page. any ideas on what maybe causing this? thanks On Apr 16, 11:01 am, Daniel Roseman wrote: > On Apr 16, 3:22 pm, Daxal wrote: > > > > > Hey guys, &

populating manytomany fields on template

2010-04-16 Thread Daxal
hi anyone know how to populate the manytomany fields in models on the template? *models* from django.db import models from django.forms import ModelForm class cvdb(models.Model): user = models.ForeignKey(User) Language = models.ManyToManyField(Language, db_table='cm_cvdb_language',

modelmultiplechoicefield show as null on the template -2

2010-04-16 Thread Daxal
Hey guys, I am trying to render a modelmultiplechoicefield on my template and i cannot seem to figure out how. any help would be appreciated. Thanks. Here is model: class cvdb(models.Model): user = models.ForeignKey(User) Language = models.ManyToManyField(Language, db_table='cm_cvdb_language

modelmultiplechoicefield show as null on the template

2010-04-15 Thread Daxal
Hey guys, I am trying to render a modelmultiplechoicefield on my template and i cannot seem to figure out how. any help would be appreciated. Thanks. Here is model: class cvdb(models.Model): user = models.ForeignKey(User) Language = models.ManyToManyField(Language, db_table='cm_cvdb_language

Populating fields from the admin section

2010-04-12 Thread Daxal
Hey, I am wondering on how to populate list of items for a specific field on model from the admin section of Django? For ex, class cvdb(models.Model): language = models.ManyToManyField(Language, db_table='cm_cvdb_language', verbose_name="languages") I would

Populating fields using views from django admin

2010-04-09 Thread Daxal
Hi Guys, I am trying to populate fields for a template using views from the admin section of the site. The admin section is already setup and I got my models to show up there and I can add and delete properly so it works fine. What remains is to populate those fields in views to render them onto

Re: creating basic view for a modelmultiplechoicefield

2010-04-09 Thread Daxal
to do this please let me know. I already setup the admin backend so that I can add the six different fields defined in the model (country, language, practice, profdesgn, sector and profession) <-- the manytomany fields in models. Thanks for your help! :) Daxal On Apr 9, 5:46 am, Daniel Rose

creating basic view for a modelmultiplechoicefield

2010-04-09 Thread Daxal
Basically, I am starting to create a view called "cvdetails" and it is linked to "cvdetails.html" link for template. The form is supposed to use is: class cvForm(forms.Form): Language = forms.ModelMultipleChoiceField(queryset=C.Language.objects.all()) ProfDesgn = forms.ModelMultipleChoiceFiel

if statement with url

2010-03-10 Thread Daxal
Hey, I wanted to use a if statement with a url like ... if you are on "/cm/add/" .. endif . option 1: I was wondering if anyone knows how to code that statement. if can compare string variables like {% ifequal somevariable url %} where "url" can be hard coded like "/cm/add" and somevariable w