because you're passing commit=False with form2
On Tue, 1 Jun 2021 at 14:10, Hugh Frost wrote:
> def detail(request):
> if request.method == 'POST':
> baby_form1 = BabyForm1(data=request.POST)
> baby_form2 = BabyForm2(data=request.POST)
>
> if baby_form1.is_valid() and
def detail(request):
if request.method == 'POST':
baby_form1 = BabyForm1(data=request.POST)
baby_form2 = BabyForm2(data=request.POST)
if baby_form1.is_valid() and baby_form2.is_valid():
baby_form1.save()
print(baby_form1)
baby_form2.b
Hi guys,
I made a video on how to solve this problem.
Please go to the link below and subscribe for more content.
https://youtu.be/XvX6Q64oFyw
There is a git repo link in the description as well.
Thank You
On Wed, Jun 10, 2020 at 3:50 PM chaitanya orakala
wrote:
> Answer :
>
> *First hide t
Hi guys,
I made a video on how to solve this problem.
here is the Link
https://youtu.be/XvX6Q64oFyw
On Wed, Jun 10, 2020 at 3:50 PM chaitanya orakala
wrote:
> Answer :
>
> *First hide the necessary fields which you want to hide and pop in drop
> down.*
> style.css
>
> #id_exec_first_name,
Answer :
*First hide the necessary fields which you want to hide and pop in drop
down.*
style.css
#id_exec_first_name, label[for="id_exec_first_name"] {
display: none
}
#id_exec_last_name, label[for="id_exec_last_name"]{
display: none
}
#id_exec_title, label[for="id_exec_title"]{
display
Thank You Very Much for considering advice
On Wed, Jun 10, 2020 at 8:11 AM chaitanya orakala
wrote:
> sure, I will do it by tomorrow
>
>
> On Tue, Jun 9, 2020 at 2:35 AM Balaji Shetty
> wrote:
>
>> Nice
>>
>> Can you please share sample code on git link.
>>
>> This is very common requirement in
👍🏻
Shre your code, so it will help others.
And if you can, change to resoulved, so it will be marked in Google search
Best regards
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from
sure, I will do it by tomorrow
On Tue, Jun 9, 2020 at 2:35 AM Balaji Shetty wrote:
> Nice
>
> Can you please share sample code on git link.
>
> This is very common requirement in every project
>
>
>
> On Tuesday, June 9, 2020, chaitanya orakala
> wrote:
>
>> Thank You, Amine Aziz. I tried jque
Nice
Can you please share sample code on git link.
This is very common requirement in every project
On Tuesday, June 9, 2020, chaitanya orakala
wrote:
> Thank You, Amine Aziz. I tried jquery and it worked. its so simple once we
> know jquery.
> do help others like you did to me.
>
> On Sun,
Thank You, Amine Aziz. I tried jquery and it worked. its so simple once we
know jquery.
do help others like you did to me.
On Sun, Jun 7, 2020 at 1:18 PM AMINE AZIZ wrote:
> I will share with you my iwn code used in admin , but it still the same as
> the front end
>
> withe jQuery i can show inp
I will share with you my iwn code used in admin , but it still the same as
the front end
withe jQuery i can show input or hide it , so you will do the same with
popup , by default it will be display none, and with Jquery you can show it
if user change value to yes dropdown (select)
you will u
I will share with you my iwn code used in admin , but it still the same as
the front end
withe jQuery i can show input or hide it , so you will do the same with
popup , by default it will be display none, and with Jquery you can show it
if user change value to yes dropdown (select)
$(do
Can anyone suggest how to approch this???
On Sun., Jun. 7, 2020, 12:09 p.m. chaitanya orakala, <
chaitu.orak...@gmail.com> wrote:
> *sure, here is my code*. please let me know how can I modify this to
> achieve a dependent drop fields.
> I want it to make action on executive_authority, next field
*sure, here is my code*. please let me know how can I modify this to
achieve a dependent drop fields.
I want it to make action on executive_authority, next fields should pop-up
*Views.py*
from django.shortcuts import render, redirect
from er_form.forms import NewClientForm, BillingGroupForm
f
You 'll use JQUERY normal as the same in html
You need every html id (so you cab add on change)
JQUERY on change select
Show hidden popup / or show hidden input
Share your code.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscr
Thanks for the response guys. I see many of them are saying need to use
javascript or jquery.
Is there any reference links to achieve that? ?
On Sun, Jun 7, 2020 at 10:00 AM Shyam Acharjya
wrote:
> hi AMINE AZIZ. for frontend what approach should be taken?
> thnx
>
> On Sunday, June 7, 2020 at
hi AMINE AZIZ. for frontend what approach should be taken?
thnx
On Sunday, June 7, 2020 at 7:19:28 PM UTC+5:30, AMINE AZIZ wrote:
>
> Hi
>
> You need to use some JQUERY code
>
> You need this in admin or frontend ?
--
You received this message because you are subscribed to the Google Groups
I think that you will have to use something like JavaScript in the model
forms
On Sun, Jun 7, 2020, 09:34 Sai wrote:
> Hi guys,
> I am working on a* Django project,* which involves submission form and
> saving the data in the database using model form. I am stuck with one of
> the functionaliti
If anyone has done this before.plese share the sollution.thnx
On Sun, Jun 7, 2020 at 3:52 PM wongX Ndeso wrote:
> You can use django form wizard if you want, much easier than you should
> manipulate the onclick event using javascript or something similar with
> that..
> Maybe you should remo
Hi
You need to use some JQUERY code
You need this in admin or frontend ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroup
You can use django form wizard if you want, much easier than you should
manipulate the onclick event using javascript or something similar with
that..
Maybe you should remodel your form or the flow.. Hope this help
On Sun, Jun 7, 2020, 1:34 PM Sai wrote:
> Hi guys,
> I am working on a* Django p
Hi guys,
I am working on a* Django project,* which involves submission form and
saving the data in the database using model form. I am stuck with one of
the functionalities of form which should work like for example "do you want
benefit plan: *YES,* *next Field options should pop up*. if click*
Hi,
I have a situation where I need to have more than 3 nested forms for a
model with Foreignkey with child models. Can someone please point me in the
right direction because I've been trying this from last couple of days now.
I can make it work with 1 parent and 2-3 child but not further than that
Error i get :
Traceback:
File
"C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handlers\exception.py"
in inner
34. response = get_response(request)
File
"C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\django\core\handle
Boa tarde, primeiramente gostaria de pedir desculpas adiantado aos ADMs
caso a minha pergunta/dúvida esteja fora do escopo do grupo. Também
gostaria de avisar que sou marinheiro de primeira viagem no Django, e estou
tendo algumas dificuldade para interpretar algumas coisa do mesmo. Dito
isso, v
We're using Fobi in https://github.com/FreedomCoop/valuenetwork
Works pretty well. Does what it promises. Dev has been responsive to issues.
On Wednesday, August 2, 2017 at 5:55:21 AM UTC-5, Thiago Luiz Parolin wrote:
>
> Hi,
> Try using this app:
> Django-fobi https://github.com/barseghyanartur/d
Hi,
Try using this app:
Django-fobi https://github.com/barseghyanartur/django-fobi
I've never used it, but it looks very promising.
2017-08-01 21:15 GMT-03:00 Shazia Nusrat :
> I need to create a frontend app where I can use forms to create forms such
> as Google Surveys or Survey Monkey kind of
I need to create a frontend app where I can use forms to create forms such
as Google Surveys or Survey Monkey kind of application. Can someone point
me to any reusable app or something similar or someone can guide me that
would be a great help.
Regards,
Shazia
--
You received this message becau
On 25/08/15 01:25, Sait Maraşlıoğlu wrote:
> default = timezone.now()
Beware, timezone.now() will be evaluated once when the module is loaded,
not on save if you might think.
Use default = timezone.now without calling it to get the current value
on save.
--
You received this message because you
So the form should have action = '/stats/submit/' ? If I do this, whenever
I click submit, it brings me back to the submission page, telling me that I
didn't submit a file even if I did.
On Tuesday, August 25, 2015 at 11:05:59 AM UTC-7, Hugo Osvaldo Barrera
wrote:
>
>
> On Tue, Aug 25, 2015,
On Tue, Aug 25, 2015, at 14:16, Hugo Kitano wrote:
> Noted. "/stat/s" is an index page. Here is what my urls.py looks
> like. Also, by using print statements, I've realized that the
> request.method is always GET, not POST, which makes it so no model
> instance is ever saved. What does this GE
Noted. "/stat/s" is an index page. Here is what my urls.py looks like.
Also, by using print statements, I've realized that the request.method is
always GET, not POST, which makes it so no model instance is ever saved.
What does this GET request refer to specifically?
Thanks
On Monday,
instead of
model_instance.sub_date = timezone.now()
I suggest you to declare a default for that field in your model definition.
default = timezone.now()
On Thursday, 20 August 2015 23:41:05 UTC+3, Hugo Kitano wrote:
>
> Hi, I'm a beginner using Django, and I'm having trouble using model forms
On Mon, Aug 24, 2015, at 16:41, Hugo Kitano wrote:
> I'm actually now pretty certain that my html file is what's causing it
> to not work
>
>
Including your message as an inline image rather than simple text will
reduce the amount of people that can actually read your message (and
complicate foll
Also, it looks like the request.method is always 'GET', not 'POST', which
means the form is never saved. How is this happening?
On Monday, August 24, 2015 at 12:56:39 PM UTC-7, Hugo Kitano wrote:
>
> More specifically, what does the action="/stats/" field do and require?
>
> On Monday, August 24
More specifically, what does the action="/stats/" field do and require?
On Monday, August 24, 2015 at 12:41:16 PM UTC-7, Hugo Kitano wrote:
>
> I'm actually now pretty certain that my html file is what's causing it to
> not work
>
>
>
> On Monday, August 24, 2015 at 11:34:41 AM UTC-7, Hugo Kitano
I'm actually now pretty certain that my html file is what's causing it to
not work
On Monday, August 24, 2015 at 11:34:41 AM UTC-7, Hugo Kitano wrote:
>
> It always redirects to the stats page, though the model instance isn't
> saved.
> I suspect it has to do with the .save() function, but I c
It always redirects to the stats page, though the model instance isn't
saved.
I suspect it has to do with the .save() function, but I can't tell why,
since I even create the modelform in the views.py file.
Thanks,
Hugo
On Saturday, August 22, 2015 at 3:19:07 AM UTC-7, James Schneider wrote:
On Aug 22, 2015 3:10 AM, "James Schneider" wrote:
>
> Hi, I'm a beginner using Django, and I'm having trouble using model
forms to create instances of my model.
> When a user submits a form, the database saves nothing. Here's my
code for the view
>
>
> So what exactly does happen?
Hi, I'm a beginner using Django, and I'm having trouble using model
forms to create instances of my model.
When a user submits a form, the database saves nothing. Here's my
code for the view
So what exactly does happen? Based on the code you provided, you would
either end up on the
Do you have any idea what could be causing the problem, then?
On Friday, August 21, 2015 at 2:25:17 AM UTC-7, Hugo Osvaldo Barrera wrote:
>
>
>
>
> On Thu, Aug 20, 2015, at 17:43, Edgar Gabaldi wrote:
>
> The code seems right. Probably your form has some error. Try print
> {{form.errors}} i
On Thu, Aug 20, 2015, at 17:43, Edgar Gabaldi wrote:
> The code seems right. Probably your form has some error. Try print
> {{form.errors}} in your template to check.
Shouldn't {{ form.as_p }} include errors as well? This seems to be what
the doc indicates:
https://docs.djangoproject.com/en/1.
Could you elaborate on my form has some error?
On Thursday, August 20, 2015 at 1:43:32 PM UTC-7, Edgar Gabaldi wrote:
>
> The code seems right. Probably your form has some error. Try print
> {{form.errors}} in your template to check.
>
> On Thu, Aug 20, 2015 at 4:45 PM, Hugo Kitano > wrote:
>
>>
The code seems right. Probably your form has some error. Try print
{{form.errors}} in your template to check.
On Thu, Aug 20, 2015 at 4:45 PM, Hugo Kitano wrote:
> Hi, I'm a beginner using Django, and I'm having trouble using model forms
> to create instances of my model.
> When a user submits a
Hi, I'm a beginner using Django, and I'm having trouble using model forms
to create instances of my model.
When a user submits a form, the database saves nothing. Here's my code for
the view
def submit(request):
SubmissionForm = modelform_factory(Submission, fields=('sub_name',
'sub_file'))
Kakar Nyori writes:
> When doing so, only the last pform is gets saved. And the other two
> pforms are ignored. How do I get to save all the three forms of photo
> (pforms) accordingly?
>
> Or is there any other way around? Your help will be much appreciated!
> Thank you.
James is right that a f
I'm guessing that if you look at the generated source code in the browser,
all of the names for the fields in the pform form's are the same, which
likely collide on the Django side (if the browser actually posts all the
copies with the same field names, not sure what the typical browser
behavior is
A user will have photos which will be related with their specific album.
So this was the model for that:
class Album(models.Model):
> user = models.ForeignKey(User)
> title = models.CharField(max_length=200)
> pub_date = models.DateTimeField(auto_now_add=True, auto_now
lease someone that put me in
> the right way.
>
>
ModelForms definitely work, and they can definitely be combined with CBVs.
Django's documentation contains a whole lot of example code and tutorials,
but if you don't tell us what you've tried (and I mean *exactly* what
y
Hi all,
I have 5 different models all with relations with themselves. I want to use
ModelForm to generate a form that will contain fields of all these models.
I read and read, I tried different things to do this (inheritance,
subclassing...) and then use the class based views to do CRUD with th
I have invoice/estimates django app, I need to write tests for it. Since
I'm a beginner with this, testing forms results hard for me.
This is the code - for models, form and admin:
# MODELS
class Invoice(models.Model):
subject = models.ForeignKey(
Subject,
verbose_name=
On Wed, Dec 11, 2013 at 11:22 AM, wrote:
>
> Hello,
>
> when using ModelForms, which is the correct way to implement the "edit item"
> pattern?
>
> Suppose I've a table with many rows, each representing a record in a
> database.
> I choose one and wis
Hello,
when using ModelForms, which is the correct way to implement the "edit
item" pattern?
Suppose I've a table with many rows, each representing a record in a
database.
I choose one and wish to display/let the user edit the details.
I'm trying to use a ModelForm and f
Hi everyone,
I'm trying to get a particular formset, but i'm stuck on it.
In my database, I have some information stored around external data,
represented by this kind of model :
LiveInfo(models.Model):
external_id = models.IntegerField()
live_url = models.URLField()
description = m
https://docs.djangoproject.com/en/1.4/topics/forms/modelforms/#model-formsets
El domingo, 6 de enero de 2013 11:46:40 UTC-3, Pedro J. Aramburu escribió:
>
> Have you tried merging the forms with formsets?
> https://docs.djangoproject.com/en/1.4/topics/forms/formsets/
>
> El viernes
first
> project with class based views. I'm having trouble deciding how to write a
> view that will display a two Modelforms, one having a foreign key over the
> other.
>
> I will need to do the .save(commit=False) part to save my first model and
> then be able to save the m
Morales wrote:
>
> Hi everyone,
>
> I'm still wraping my head around class based views and I'm trying my first
> project with class based views. I'm having trouble deciding how to write a
> view that will display a two Modelforms, one having a foreign key over the
Hi everyone,
I'm still wraping my head around class based views and I'm trying my first
project with class based views. I'm having trouble deciding how to write a
view that will display a two Modelforms, one having a foreign key over the
other.
I will need to do the .save(com
On Tue, Dec 18, 2012 at 4:11 PM, Francisco Vianna <
francisco.v.via...@gmail.com> wrote:
> After some debugging, I realized they become the same after calling
> "is_valid" to the bound form. Now, I'm not sure if I am missing something
> conceptually about ModelForms
u_form = UserForm(request.POST, instance=request.user)
>>>
>>> if u_form.is_valid():
>>> if u_form.instance.email != u_form.cleaned_data['email']:
>>> tmp_profile = u_form.instance.get_profile()
>>>
irmed = False
>> tmp_profile.save()
>>
>> u_form.save()
>> response['success'] = True
>> else:
>> response['errors'].append(u_**form.errors)
>>
>>
>> When I get to test if the form e-mail is d
else:
> response['errors'].append(u_form.errors)
>
>
> When I get to test if the form e-mail is diferent from the instance e-mail
> in order to set a flag in my model, both emails
>
> u_form.instance.email
>
> and
>
> u_form.cleaned_dat
rom the instance e-mail
in order to set a flag in my model, both emails
u_form.instance.email
and
u_form.cleaned_data['email']
are the same. After some debugging, I realized they become the same after
calling "is_valid" to the bound form. Now, I'm not sure if I am mis
There's a way, but you'll need to touch the form on the python side
quite a lot, changing the default widgets adding them the css classes
you want.
You can take a look at https://github.com/earle/django-bootstrap and
https://github.com/dyve/django-bootstrap-toolkit/ they provide some
shortcuts for
Hi Marilena,
I'm also using Twitter Bootstrap and over time migrated to this
template snipped that I'm including in my templates at the place where
you put {{ form.as_table }}
http://dpaste.com/hold/768995/
If you find it useful, great :) I'm not a web developer by nature
so there may be a
On Tue, 2012-07-10 at 04:06 -0700, mapapage wrote:
> I already read that, but my question is how can I css-style only some
> of my fields while the rest continue to be rendered by form.as_table.
> Is there such an option?
that I do not think you can do. What you have to do is to drill down
into th
I already read that, but my question is how can I css-style only some of my
fields while the rest continue to be rendered by form.as_table. Is there
such an option?
I want that because with modelForms I have a direct mapping of my forms to
my models and if I customize them manually I loose for
On Monday, 9 July 2012 12:06:32 UTC+1, mapapage wrote:
>
> Hi!
> In my django app I'm using modelForms and not simple django forms so in
> order to render the form I just do {{ form.as_table }} an the template and
> everything is being displayed.
> That's simple, bu
The important part of my template is the following:
>
>
> Forms
>
>
>
> {% extends "main.html" %}
>
>
>> {% block content %}
>
> > enctype='multipart/form-data'{% endif %}>
>
>
>> {% csrf_token %}
>
>
>
>
>
>
>
> {{ lname }}
>
> {{ fn
On Mon, 2012-07-09 at 04:27 -0700, mapapage wrote:
> In my django app I'm using modelForms and not simple django forms so
> in order to render the form I just do {{ form.as_table }} an the
> template and everything is being displayed. That's simple, but
> obviously any html
Hi!
In my django app I'm using modelForms and not simple django forms so in
order to render the form I just do {{ form.as_table }} an the template and
everything is being displayed.
That's simple, but obviously any html code is being skipped, so I wonder
how will I further customi
Hi!
In my django app I'm using modelForms and not simple django forms so in
order to render the form I just do {{ form.as_table }} an the template and
everything is being displayed.
That's simple, but obviously any html code is being skipped, so I wonder
how will I further customize my
Excellent, that works perfectly.
Thanks for you help.
Wes
On May 22, 9:58 am, bruno desthuilliers
wrote:
> On May 22, 10:34 am, wchildsuk wrote:
>
> > Hi,
>
> > I'm trying to use generic class based views to edit a specific
> > queryset but I can't see to get my code working. I've defined quer
On May 22, 10:34 am, wchildsuk wrote:
> Hi,
>
> I'm trying to use generic class based views to edit a specific
> queryset but I can't see to get my code working. I've defined queryset
Nope, cf Xavier's answer on this.
> and relevant form but when the form renders it doesn't contain the
> queryse
Hi Xavier,
I changed my queryset to use filter
(ReminderMessage.objects.filter(id=1)) but it didn't make any
difference to the form rendering correctly with the instance or
saving.
Regards
Wes
On May 22, 9:37 am, Xavier Ordoquy wrote:
> Hi,
>
> get is a termination statement for querysets.
> p
Hi,
get is a termination statement for querysets.
please use filter instead.
Regards,
Xavier Ordoquy.
Le 22 mai 2012 à 10:34, wchildsuk a écrit :
> Hi,
>
> I'm trying to use generic class based views to edit a specific
> queryset but I can't see to get my code working. I've defined queryset
>
Hi,
I'm trying to use generic class based views to edit a specific
queryset but I can't see to get my code working. I've defined queryset
and relevant form but when the form renders it doesn't contain the
queryset and when it saves it creates a new entry instead of editing
the existing one.
If an
Hi all,
I'm working on an application that uses a HTML-form consisting of multiple
Django-ModelForms. Moreover, their validation is interdependent. Moreover,
their data is interdependent. Moreover, I use multiple modelforms with the
same instance (might be a bad idea anyway). My template
ave the following situation:
>
> I am rendering an array of ModelForms to my template. ie. formArray =
> [, , ]
>
> In the template I display the forms with the following:
>
> {% for form in formArray %}
>
> {{ form }}
>
> {% endfor %}
>
> Previously I have
You could do something along these lines:
{% for field in form %}
...
{% ifequal field form.someSpecificField %}
> {{ form }}
>
> {% endfor %}
>
> Previously I have accessed certain ModelForms using {% if forloop.counter
> == # %} to add some customization.
>
> Howeve
Hello,
I have the following situation:
I am rendering an array of ModelForms to my template. ie. formArray =
[, , ]
In the template I display the forms with the following:
{% for form in formArray %}
{{ form }}
{% endfor %}
Previously I have accessed certain ModelForms using {% if
On Mar 23, 12:46 am, hack wrote:
> I think I shot myself in the foot using ModelForms to generate all of my
> html forms. Is there any way to use a stylesheet when your forms are
> generated from ModelForms?
Yes of course, why ?
> I've tried everything and cannot get it to
On Thu, Mar 22, 2012 at 3:46 PM, hack wrote:
> I think I shot myself in the foot using ModelForms to generate all of my
> html forms. Is there any way to use a stylesheet when your forms are
> generated from ModelForms?
You should be able to render the forms and plug the rendered HT
Not to gild the lilly, but, you could also do this, and it would work:
either as part of the css you are inheriting from the "base" or,
separately, you could create a whole slew of named css styles in one file,
then apply each file to the template tags, table tags you use to call the
data into the
If you're worried about stylizing specific fields, it'll be setup as a
table, ul, or paragraph based upon how you "render the form" (paragraph by
default I think). The individual fields are named with the following
convention (if I recall correctly) . So
for a field named "password" in a paragraph
I think the best thing for you do is to create the css outside the
template. Like this - create the css file, separately, then reference the
file in the template.
Or, better yet, add the css you need for your form in you main css file
that is referenced in your base template and just inherit it by
It doesn't matter how you generate your form, your CSS should be applied
from inside the template. You need to add a CSS file link to a template to
which you're passing the form to inside your context from within a view, or
you can embed it into your template using
I think I shot myself in the foot using ModelForms to generate all of my
html forms. Is there any way to use a stylesheet when your forms are
generated from ModelForms?
I've tried everything and cannot get it to work. I've tried directly
importing the css files, I've tried lo
register_new_tenant(request, template_name ='tenant/
register_tenant.html'):
"""
This view takes the three incomplete modelforms Lease, Tenant, and
Rental
period and creates a new lease made up of lease details, its rent
periods
(hopefully plural); and finds and assigns
Specify blank=True on the model field. When a ModelForm is created, the
default value for a model form field's "required" attribute is based on the
corresponding model field's "blank" attribute.
Karen
--
http://tracey.org/kmt/
--
You received this message because you are subscribed to the Googl
ur and
make the fields editable? I know in a regular form, you specify a
BooleanField(required=False) for all your boolean fields, but since the
ModelForms and in particular the ProcessFormViews are automatically
generated from the model, I can't seem to do that.
-- Jeff
--
You received this
Tom,
Thanks for the quick reply! However, when I tried that I got an error
saying that inventoryitem "is an invalid keyword argument for this
function". I fixed this by manually specifying the OneToOneField
relationship with the parent class as inventoryItem and setting
parent_link=True. With that
On Fri, Oct 28, 2011 at 7:50 AM, Alex wrote:
> I've been scouring Google and the Django documentation and I can't
> figure out how to do this. I'm working on an inventory management
> system for my shop. My inventory models.py similar to the following:
>
> class ItemType( models.Model ):
>
I've been scouring Google and the Django documentation and I can't
figure out how to do this. I'm working on an inventory management
system for my shop. My inventory models.py similar to the following:
class ItemType( models.Model ):
def __unicode__( self ):
return "blah bl
Wow, thanks for the great reply. It makes sense that it's the related object
manager. I have everything working now so thank you very much again!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://
Hello, Timmy
"rel" is the related manager object that will be used in specific fields,
namely those that refer to relationships to other table. These relationships
are handled by objects in django.db.models.fields.related[1].
For example, take User and Group from django.contrib.auth.models. Assum
I am trying to use a 3rd party form field and custom widget in my own model
form and I am having trouble understanding what the "rel" attribute is used
for.
for example:
class SomeFormField(forms.ModelChoiceField):
def __init__(self, rel, queryset, to_field_name, *args, **kwargs):
...
I see it
On Tue, Oct 18, 2011 at 2:00 PM, Jeff Heard wrote:
> But I want to be able to invalidate my form if geocoding fails... Can I
> still do that in the save method?
>
No, save() is not part of validation. However, it is not hard to
combine the two:
In the clean() method, calculate the geocoding poi
But I want to be able to invalidate my form if geocoding fails... Can I still
do that in the save method?
On Oct 18, 2011, at 4:52 AM, Daniel Roseman wrote:
> On Monday, 17 October 2011 20:30:35 UTC+1, Jefferson Heard wrote:
> class FarmersMarket(ModelForm):
>class Meta:
> model =
On Monday, 17 October 2011 20:30:35 UTC+1, Jefferson Heard wrote:
>
> class FarmersMarket(ModelForm):
>class Meta:
> model = models.FarmersMarket
> exclude = ('location',)
>
>def clean(self):
> place, (lat, lng) = _g.geocode(self.cleaned_data['address'])
> self.clean
1 - 100 of 217 matches
Mail list logo