While Trying to Upload Multiple Files Using Single Form Field with Django Model Form Why i am getting Error no 13.Permission Denied …?

2019-03-03 Thread Sachin Cse
*I found some diififculty to write details here so i given link of my question here https://stackoverflow.com/q/54967840/11143159 * -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Need to query a resultset from database in Django using a form

2018-08-01 Thread ryerekar
I have a form which is editing a database entry and saving the changes back to the database. after the changes are saved, I want to redirect to a contract.html, where I want to populate the details of that entry. below is the view: *def edit_res(request, pk=None): if request.method ==

Re: Using multiple form in Class Base View (CBV)

2015-04-09 Thread Dan Gentry
To modify the generic CBVs to handle two forms would mean changes in many of the base classes and mixins, including ProcessFormView, FormMixin, and BaseFormView. It would make more sense to start with the View base class and roll your own methods. If this is a one-off, I would probably keep

Using multiple form in Class Base View (CBV)

2015-04-08 Thread Rootz
Can anyway give me advice as to how I would implement a CBV like formview to incorporate multiple forms in the class base view? I have (2) form class I would like for my FormView to use? But I am not sure how to do that with the FormView or any class base view. Thanks -- You received this

advice needed using a form in one app in another

2012-02-02 Thread richard
I have two apps one called mysite and one called register which is a nested app to mysite that handles registration. In mysite app views i have a view that imports the register form from register app and renders to home.html and home.html includes another template called register.html. So the

admin inline formset using incorrect form

2011-04-12 Thread shanyu
bj is None, the method doesn't pass FooForm to the superclass method, and therefore the superclass is expected to construct the formset using default form (self.form - which is not FooForm). But to my surprise I am getting FooForm objects initialized. So I have 2 questions: 1. Why does get_formset

Re: No POST response when using checkbox form

2011-02-08 Thread Ethan Yandow
How bad of an Idea is it to not use Django forms? I feel like Django forms are kinda a pain On Fri, Feb 4, 2011 at 12:06 PM, Tom Evans wrote: > On Fri, Feb 4, 2011 at 4:20 PM, Shawn Milochik wrote: > > Here's the main piece: > >

Re: No POST response when using checkbox form

2011-02-04 Thread Tom Evans
On Fri, Feb 4, 2011 at 4:20 PM, Shawn Milochik wrote: > Here's the main piece: > http://docs.djangoproject.com/en/1.2/ref/forms/ > Just make a form with a boolean field. > When you've successfully made one form that you submit, validate, and act > upon, just throw a bunch in a

Re: No POST response when using checkbox form

2011-02-04 Thread Shawn Milochik
Here's the main piece: http://docs.djangoproject.com/en/1.2/ref/forms/ Just make a form with a boolean field. When you've successfully made one form that you submit, validate, and act upon, just throw a bunch in a formset: http://docs.djangoproject.com/en/1.2/topics/forms/formsets/ If you

Re: No POST response when using checkbox form

2011-02-04 Thread Ethan Yandow
Hmmm, I am having a hard time understanding the django forms... Would someone mind giving me an example of how I would list my events with check boxes next to them please :) On Fri, Feb 4, 2011 at 10:07 AM, Ethan Yandow wrote: > aahhh yes!!! Thank you very much!!!

Re: No POST response when using checkbox form

2011-02-04 Thread Ethan Yandow
aahhh yes!!! Thank you very much!!! Alright, ill work on implementing those form views :) On Fri, Feb 4, 2011 at 4:25 AM, Daniel Roseman wrote: > On Friday, February 4, 2011 9:24:48 AM UTC, Daniel Roseman wrote: >> >> On Friday, February 4, 2011 12:35:20 AM UTC, Ethan

Re: No POST response when using checkbox form

2011-02-04 Thread Daniel Roseman
On Friday, February 4, 2011 9:24:48 AM UTC, Daniel Roseman wrote: > > On Friday, February 4, 2011 12:35:20 AM UTC, Ethan Yandow wrote: >> >> Hey there, I am trying to delete Events as chosen by a by a user using >> check boxes to check of which events they want to be deleted. But for >> some

Re: No POST response when using checkbox form

2011-02-04 Thread Daniel Roseman
On Friday, February 4, 2011 12:35:20 AM UTC, Ethan Yandow wrote: > > Hey there, I am trying to delete Events as chosen by a by a user using > check boxes to check of which events they want to be deleted. But for > some reason whenever I call request.POST.get('event_list') Nothing is > received

No POST response when using checkbox form

2011-02-03 Thread Ethan Yandow
Hey there, I am trying to delete Events as chosen by a by a user using check boxes to check of which events they want to be deleted. But for some reason whenever I call request.POST.get('event_list') Nothing is received even though boxes are checked and I end up with nothing. Here is my template

Re: Using A Form

2011-01-04 Thread Daniel Roseman
as well as some other informational fields and a title on it. Since > this is my first explicit attempt at using a form I have the following > questions: > > 1. How does my form get recognized by or associated with the html > screen file? > Via the view, just as wi

Using A Form

2011-01-04 Thread hank23
explicit attempt at using a form I have the following questions: 1. How does my form get recognized by or associated with the html screen file? 2. What form field type do I use to pass a list/collection in the form to the screen (Once I get it there I know I can display its individual items from within

Re: Custom Login using model form

2010-11-26 Thread Daniel Roseman
On Nov 26, 8:00 am, PRANAV HEGDE wrote: > Hi Daniel, > > Yeah I had a thought like that. I thought I could leave the validation > to the model. > Turns out model form comes handy only if your modifying or updating > something in the database, as you said. > Simple form

Re: Custom Login using model form

2010-11-26 Thread PRANAV HEGDE
On Nov 26, 1:57 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Nov 25, 7:53 am, PRANAV HEGDE <pranavhegde...@gmail.com> wrote: > > > > > > > > > > > Hi guys, > > > I'm trying to create a login form using a model form, > >

Re: Custom Login using model form

2010-11-25 Thread Daniel Roseman
On Nov 25, 7:53 am, PRANAV HEGDE <pranavhegde...@gmail.com> wrote: > Hi guys, > > I'm trying to create a login form using a model form, > > user model: > class users(models.Model): >     username = models.CharField(max_length=20, primary_key=True) >     password =

Custom Login using model form

2010-11-25 Thread PRANAV HEGDE
Hi guys, I'm trying to create a login form using a model form, user model: class users(models.Model): username = models.CharField(max_length=20, primary_key=True) password = models.CharField(max_length=50) usertype = models.CharField(max_length=20) class Meta: db_table

Re: RadioSelect widget in Django 1.1 using Model Form

2010-11-03 Thread Ricardo L. Dani
Thanks Daniel, Now it makes sense. Thank you again 2010/11/3 Daniel Roseman > On Nov 3, 3:03 pm, "Ricardo L. Dani" wrote: > > Hello, > > > > I'm working with an project using django-cms and django 1.1 and I have > this > > problem: > > > > With a

Re: RadioSelect widget in Django 1.1 using Model Form

2010-11-03 Thread Daniel Roseman
On Nov 3, 3:03 pm, "Ricardo L. Dani" wrote: > Hello, > > I'm working with an project using django-cms and django 1.1 and I have this > problem: > > With a big model form with many choice charFields must be reendered as > and not as 's (default) > > Ex: > >     field =

RadioSelect widget in Django 1.1 using Model Form

2010-11-03 Thread Ricardo L. Dani
Hello, I'm working with an project using django-cms and django 1.1 and I have this problem: With a big model form with many choice charFields must be reendered as and not as 's (default) Ex: field = models.CharField(max_length=1, default=None, choices=CHOICES) renders:

Re: Using the form field values in templates

2010-01-29 Thread Adrian Maier
Shawn, Ondrey, Thanks for your answers. I ended up using to ModelForm and ModelFormSet. Cheers, Adrian On Tue, Jan 19, 2010 at 16:12, ondrey wrote: > Hi, > > if the form is bound (i.e. form.is_bound is true) then you can access > its data attribute, which contains

Re: Using the form field values in templates

2010-01-19 Thread ondrey
Hi, if the form is bound (i.e. form.is_bound is true) then you can access its data attribute, which contains the data entered into the form. If the form is valid (i.e. form.is_valid() is true), then you can access the cleaned_data attributes as well. So for example if you have form like this: f

Re: Using the form field values in templates

2010-01-18 Thread Shawn Milochik
This is something I've run into as well. If it's a forms.ModelForm, and you instantiated it by passing an instance, you can access it like this: {{ person_form.instance.last_name }} Shawn-- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Using the form field values in templates

2010-01-17 Thread adrian_m
Hello people, How can I access the value of a form field in the template ? I'm having two different use cases : - display a field value as simple text (the field is not meant to be edited by the user, therefore i don't want to use a input field) - use the field value for generating a link (

Re: Issue with Django form when submitted using jQuery form plugin

2009-12-11 Thread Preston Holmes
On Dec 10, 11:02 am, jul <juj...@gmail.com> wrote: > hi, > > when submitting my form using jQuery form plugin, the request received > by the target view is different than that received when the form is > submitted in the standard way (with no javascript), and my Django >

Issue with Django form when submitted using jQuery form plugin

2009-12-10 Thread jul
hi, when submitting my form using jQuery form plugin, the request received by the target view is different than that received when the form is submitted in the standard way (with no javascript), and my Django template does not render as expected. When submitted in the standard way, the template

Re: Using a form to UPDATE a record?

2009-12-03 Thread Todd Blanchard
That did it. I figured if the form had a primary key it would do an update. I guess that was wrong. The url is the form you describe, but the dispatcher view method adds the id to the GET of the request to pass it on. So the url for this is actually /incidents/edit/4. Thanks. On Dec 3,

Re: Using a form to UPDATE a record?

2009-12-03 Thread Daniel Roseman
On Dec 3, 9:53 am, Todd Blanchard wrote: > K > > def edit(request): >     form = None >     if request.method == 'GET': >         try: >             form = IncidentForm(instance = Incident.objects.get(id = > request.GET['id'])) >         except ObjectDoesNotExist: >          

Re: Using a form to UPDATE a record?

2009-12-03 Thread Todd Blanchard
K def edit(request): form = None if request.method == 'GET': try: form = IncidentForm(instance = Incident.objects.get(id = request.GET['id'])) except ObjectDoesNotExist: raise Http404 else: form = IncidentForm(request.POST) if

Re: Using a form to UPDATE a record?

2009-12-03 Thread Daniel Roseman
On Dec 3, 8:53 am, Todd Blanchard wrote: > Thanks, that makes the form show up populated. > But saving it creates a new record, despite making sure I have id in a hidden > field on the form.  :-/ It does work, so you'll need to show us some code so we can see where you're

Re: Using a form to UPDATE a record?

2009-12-03 Thread Todd Blanchard
Thanks, that makes the form show up populated. But saving it creates a new record, despite making sure I have id in a hidden field on the form. :-/ On Dec 3, 2009, at 12:26 AM, Rishabh Manocha wrote: > On Thu, Dec 3, 2009 at 4:17 PM, Todd Blanchard wrote: >> All the

Re: Using a form to UPDATE a record?

2009-12-03 Thread Rishabh Manocha
On Thu, Dec 3, 2009 at 4:17 PM, Todd Blanchard wrote: > All the tutorials on forms discuss creating a new record. > > I've got a record in the database, I want to fetch it, plunk its values into > a form, let the user edit it and save it. > > I don't see how to conveniently

Using a form to UPDATE a record?

2009-12-03 Thread Todd Blanchard
All the tutorials on forms discuss creating a new record. I've got a record in the database, I want to fetch it, plunk its values into a form, let the user edit it and save it. I don't see how to conveniently put the model's values into the form. It seems the form wants a dictionary of

Re: Using django form

2009-10-29 Thread Denis Bahati
reating my own form where users can vote and update the database without > > using the django admin. I'm thinking of using html files or using the > django > > form library but i dont no the exactly solution to go through this. Can > any > > one show me how to do the staff using d

Re: Using django form

2009-10-29 Thread Daniel Roseman
o django admin. ie > creating my own form where users can vote and update the database without > using the django admin. I'm thinking of using html files or using the django > form library but i dont no the exactly solution to go through this. Can any > one show me how to do the staff using

Using django form

2009-10-29 Thread Denis Bahati
using the django admin. I'm thinking of using html files or using the django form library but i dont no the exactly solution to go through this. Can any one show me how to do the staff using django form or using the html forms? I have followed the tutorial like in the Django Book Chapter 7: Forms

Re: Using custom form class for the django.contrib.auth password_change view

2009-07-06 Thread Alex S.
After reading a bit in the source code I remembered that django apps don't use any magic and after that found the (easy) solution. Just extend your own class from the auth form PasswordChangeForm, use for example the "clean" method in your new form and write your own view for it. The

Using custom form class for the django.contrib.auth password_change view

2009-07-04 Thread Alex S.
Hi folks, as the title says I want to use my own form class for the password change process supplied by django.contrib.auth. Do you know of any way to do this without rewriting the code of this view (and specifying another argument for the form class to be used)? There are time where I want to

Re: File handling when not using POST form but service call (base64)

2009-03-15 Thread coulix
Solved using from djang.core.files.base import ContentFile Thanks to Guðmundur H On Mar 15, 3:21 pm, coulix wrote: > Hi all, > > I am using Pyamf to transfer a dynamically generated large image from > Flex to Django. > On the Django side i receive the encodedb64 data as a

File handling when not using POST form but service call (base64)

2009-03-15 Thread coulix
Hi all, I am using Pyamf to transfer a dynamically generated large image from Flex to Django. On the Django side i receive the encodedb64 data as a parameter: My Item model as an imagefield. What i have trouble to do is saving the data as the File Django Field. def save_item(request, uname,