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
, **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
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"
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
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
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,
&
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',
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
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
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
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
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
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
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
14 matches
Mail list logo