Thanks for the link Tom.
I'll read that in details later (it's a little bit complicated) an for
my POC I'll just use a not DRY method !!! :-)
Regards
Youpsla
On 28 nov, 17:16, Tom Evans <tevans...@googlemail.com> wrote:
> On Mon, Nov 28, 2011 at 4:07 PM, youpsla <youp...@gmai
Hello,
in my code, I like to overrride the form_valid() method in both
CreateView and UpdateView generic class views.
I've put my code in views.py.
class MyCreateView(UpdateView):
.
def form_valid(self, form, **kwargs):
some code
class MyUpdateView(CreateView):
.
Thnaks a lots,
it works.
Youpsla
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/ZATE6UT7dWwJ.
To post to this group, send email to dj
precious help.
Regards
youpsla
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/1IxshdRdwksJ.
To post to this group, send email to dj
Thanks for all.
Agai I apologize for not having post this "etail" in my originl post.
Regards
Alain
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
Hello all,
I've verified that I don't override the class.
I've found the reason of the bug. When I delete "@login_required", it works.
My class was in view.py:
@login_required
class EvenementCreateView(.):
.
I apologize for not have copy/paste that in my first post.
I've done the
Hi again,
yes I'm sure the error comes from here. Bellow is the full trace back:
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8010/magasin/
Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
Hi,
thnaks for your answer. It's the same. it doesn't work.
For information I use generic view for other part of the site with:
url(r"magasin/(?P\d+)/supprimer/$", DeleteView.as_view(model=Magasin,
success_url="/magasins/liste"), name='magasin_supprimer'),
and it works fine.
And has you say,
Hello,
the issue here seems to be trivial, maybe I got something in my eyes,
but I can't find the solution.
Here is my code:
urls.py
url(r"magasin/(?P\d+)/evenement/new/$",
EvenementCreateView.as_view(model=Evenement),
name='new_evenement_magasin'),
views.py:
class
nov, 05:08, youpsla <youp...@gmail.com> wrote:
> Hello,
> I hope, despite my poor english, to be enough clear.
>
> In my Django app, users fill a form with adress, Zip, CIty
> informations.
>
> I like to geocode those informations to fill the lat and lng field of
> th
Hello,
I hope, despite my poor english, to be enough clear.
In my Django app, users fill a form with adress, Zip, CIty
informations.
I like to geocode those informations to fill the lat and lng field of
the table db. FOt this tak I use geocoders method from geopy module.
It works fine if Google
<russ...@keith-magee.com> wrote:
> On Mon, Nov 7, 2011 at 8:06 PM, youpsla <youp...@gmail.com> wrote:
> > Hi,
> > before getting more in depth in writing my project I ask you a general
> > design question. My Django knowledge is not BIG enough for me to b
Hi,
before getting more in depth in writing my project I ask you a general
design question. My Django knowledge is not BIG enough for me to be
able to have a clear answer (with for and cons) on my question.
Here are the main guidelines of my project :
- I've two kind of users : Shop owners and
; Customer has 0 categories, it will write once (INSERT at bottom of
> program). If the Customer has n categories, it will only write once
> (INSERT) in the loops, and write once (UPDATE) at the bottom of the program.
>
> That is why it is much quicker running it this way.
>
> Cheers
form.cleaned_data.iteritems():
> if field == 'category' and instance.id == None: # if this
> is a category, and the instance has not yet been saved, save it so it has
> an id.
> instance.save()
> setattr(instance, field, value)
>
ield/value pairs, this is brute force (not very
> scalable for large number of fields), but should work. Anybody else please,
> show code that could get the specific forms and field/values for categories.
>
> Furbeenator
>
>
>
>
>
>
>
> On Wed, Nov 2, 201
scalable for large number of fields), but should work. Anybody else please,
> show code that could get the specific forms and field/values for categories.
>
> Furbeenator
>
>
>
>
>
>
>
> On Wed, Nov 2, 2011 at 10:28 AM, youpsla <youp...@gmail.com> wrote:
>
Hello,
i'm currently doning a website where user can register (without
password, without auth module of Django). They put some informations
and at the end (Step5Form) do multiple choices by clicking on
checkboxes. When I click on validate on the last step I've "instance
needs to have a primary key
Customer__email_adresse__exact=
self.cleaned_data['email_adresse']
raise forms.ValidationError(u'Cette adresse Email est deja
utilisee')
return self.cleaned_data
except:
pass
If you have beter idea.
regards
Alain
Entry.objects.filter(blog__name__exact='Beatles Blog')
On 25 oct, 21:01, you
Hello,
I've setup a 5 steps form (There is only one table in the database).
In the first step I ask for Email adresse. I ike this to be unique in
the database.
By putting parameters "unique=True" in models, the error only raise
when submitting the form at the last step.
Is there a way to do the
Hello,
I'm buiding a website where users hae t fill a form. It's not a really
big one but I like to split it on multiple pages.
I can build the database with only one big table but I prefer for
update (index) reason split in 3 or 4 tables.
(Maybe you'll find some quetions like beginners one ...
.3 documents, just make sure you change that "dev" in the URL
> to "1.3". Don't worry, it happens a lot more often that you might think!
>
>
>
>
>
>
>
> On Fri, Oct 21, 2011 at 7:44 PM, youpsla <youp...@gmail.com> wrote:
> > Hi again,
you're not reading the Development docs. It's
> a different class all together in there.
>
>
>
>
>
>
>
> On Fri, Oct 21, 2011 at 7:02 PM, youpsla <youp...@gmail.com> wrote:
> > Sorry, I think I was wrong. I try to use SessionWizardView wich
> > require ton
ject.com/en/1.3/ref/contrib/formtools/form-wizard/
>
> I don't believe it's deprecated in 1.3.1 but I could be wrong...
>
>
>
>
>
>
>
> On Fri, Oct 21, 2011 at 6:04 PM, youpsla <youp...@gmail.com> wrote:
> > Hello,
> > I like to know wich is the best
Hello,
I like to know wich is the best splution to manage one form on
multiple pages with Gjango 1.3.1.
I've seen in the doc that there is a FormWizard Session or Cookies)
wich seems to be deprecated.
Then, is there a new mechanics for the 1.3.1 version ?
Thanks for your answers.
Regards
Hello Daniel
thanks for your answer and sorry for my english. As you said, it could be a
problem of translation !!! :-)
I really appreciate your help, I'm doing lots of progress in my python
object programming curve ...
OK, then to be sure how Python works ... let see this code:
1 from
e and last_name are instances of CharField.
>
> There's no functional programming here.
>
> -WN.
>
>
>
>
>
>
>
> On Sun, Oct 16, 2011 at 6:43 PM, youpsla <youp...@gmail.com> wrote:
> > 1 from django.db import models
> > 2
> > 3 class Person(
ebb Newbie <new...@avatarific.com> wrote:
> "models" is a module that contains classes Model and CharField.
>
> Person inherits from Model.
>
> first_name and last_name are instances of CharField.
>
> There's no functional programming here.
>
> -WN.
>
>
&
Hello,
I'm new to Django and I've only a medium background in funtionnal
programming in Python.
I'm currently reading and working on the Django tutorial. I've few
questions on a example of code because things are not so clear for me.
Here is the code example
1 from django.db import models
2
3
29 matches
Mail list logo