Re: Django forms data save using ajax

2023-04-15 Thread 'Kasper Laudrup' via Django users
On 15/04/2023 12.31, Prashanth Patelc wrote: Hi all, How to save employees information using ajax with django form , id should automatic generation ? Try this helpful link: https://googlethatforyou.com?q=django%20ajax%20form Kind regards, Kasper Laudrup -- You received this message becau

Django forms data save using ajax

2023-04-15 Thread Prashanth Patelc
Hi all, How to save employees information using ajax with django form , id should automatic generation ? -- 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-

regarding django forms

2022-09-26 Thread Javier Esparis Meza
I'm currently having strange behavior with a django admin form. Somehow the django admin form is not creating the model fields and occasionally a GET request fails because I am trying to change the widget of a field in the __init__ method. I think the error I have is in the django admin class I

Re: Regarding Django forms

2022-09-23 Thread Sebastian Jung
This is easy you implement it with django forms then copy widget html/javascript code with browser and then implement it 1:1 but not with django forms... But i understand till yet WHY you want without django forms? Yoz cab change django forms/widget 1:1 how do yoz want but this isn't

Re: Regarding Django forms

2022-09-23 Thread Nishant Sagar
ap developer how show you how to implement >>> such thing. This is relative easy when you know how it works >>> >>> Regards >>> >>> Nishant Sagar schrieb am Fr., 23. Sept. 2022, >>> 07:57: >>> >>>> Hey forks, >>&

Re: Regarding Django forms

2022-09-23 Thread Sebastian Jung
would hire on upworks a cheap developer how show you how to implement >> such thing. This is relative easy when you know how it works >> >> Regards >> >> Nishant Sagar schrieb am Fr., 23. Sept. 2022, >> 07:57: >> >>> Hey forks, >>> &

Re: Regarding Django forms

2022-09-22 Thread Nishant Sagar
> 07:57: > >> Hey forks, >> >> I’m in little dilemma regarding Django forms. I'm working on a project as >> a backend guy who doesn't know much about CSS and JavaScript so a frontend >> guy delivered me a form template designed using CSS, however, Django

Re: Regarding Django forms

2022-09-22 Thread Sebastian Jung
Hello, I would hire on upworks a cheap developer how show you how to implement such thing. This is relative easy when you know how it works Regards Nishant Sagar schrieb am Fr., 23. Sept. 2022, 07:57: > Hey forks, > > I’m in little dilemma regarding Django forms. I'm working o

Regarding Django forms

2022-09-22 Thread Nishant Sagar
Hey forks, I’m in little dilemma regarding Django forms. I'm working on a project as a backend guy who doesn't know much about CSS and JavaScript so a frontend guy delivered me a form template designed using CSS, however, Django documentation suggests that it's good practice to u

Re: please help! not getting the desired output. how to add multiple orders via Django forms using Javascript?

2021-06-19 Thread Williams Andy Inc
Anyone interested in talking about django sharing their knowledge or path or want to learn more? meeting Now https://meet.google.com/wcv-ojtf-vhi On Sat, Jun 19, 2021 at 10:31 AM DJANGO DEVELOPER wrote: > please can someone help me? > > On Sat, Jun 19, 2021 at 9:31 AM DJANGO DEVELOPER > wrote

Re: please help! not getting the desired output. how to add multiple orders via Django forms using Javascript?

2021-06-19 Thread DJANGO DEVELOPER
please can someone help me? On Sat, Jun 19, 2021 at 9:31 AM DJANGO DEVELOPER wrote: > for convenience, please follow addorder1 to addorder5 respectively. > > On Saturday, June 19, 2021 at 9:29:48 AM UTC+5 DJANGO DEVELOPER wrote: > >> Hi guys I need urgent help. your help is appreciated. >> When

Re: please help! not getting the desired output. how to add multiple orders via Django forms using Javascript?

2021-06-18 Thread DJANGO DEVELOPER
for convenience, please follow addorder1 to addorder5 respectively. On Saturday, June 19, 2021 at 9:29:48 AM UTC+5 DJANGO DEVELOPER wrote: > Hi guys I need urgent help. your help is appreciated. > When I try to add a single order from user side then it works fine but > when I try to add multiple

Re: issue with django forms

2021-05-08 Thread Kasper Laudrup
On 08/05/2021 10.32, Bharathwajan Rajendran wrote: > i am trying to build a blog with comments  > but i didnt know how to select a blog(foreign key) automatically ,i have > to select everytime when i post comments > Do you have a question you need help with? If so, try to spend some time on descr

issue with django forms

2021-05-08 Thread Bharathwajan Rajendran
i am trying to build a blog with comments but i didnt know how to select a blog(foreign key) automatically ,i have to select everytime when i post comments -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Popups in django forms?

2021-03-03 Thread zvo...@seznam.cz
No response for this topic for some time, so I will try partially answer myself. Admin Django starting from version 2.0 has autocomplete_fields. These are relalational fields (ForeignKey, ManyToManyField), targeted into other ModelAdmin, which find content for their widget via ajax at the url a

Popups in django forms?

2021-02-26 Thread zvo...@seznam.cz
I want start a new project with good support for popups (select+options) in forms. My requirements are (and I think for real life project they are neccessary): 1. ajax retrieved options based on users selection (outside of admin and inside admin), 2. dynamic filtering of (especially related) opt

Re: DJANGO forms: Improve the presentation of the elements

2020-10-26 Thread sarva nithin
guys,can I know that what work you people so,that I can also prepare for that stuff so,please wwranda...@gmail.com reply me bro...waiting for your reply On Mon, 26 Oct 2020 at 21:04, Walter Randazzo wrote: > Hi Sarva, Hope u can aply gsoc!!! > > El lunes, 26 de octubre de 2020 a la(s) 12:18

Re: DJANGO forms: Improve the presentation of the elements

2020-10-26 Thread Walter Randazzo
Hi Sarva, Hope u can aply gsoc!!! El lunes, 26 de octubre de 2020 a la(s) 12:18:18 UTC-3, sarva nithin escribió: > hey,guys I'm new for all these present I have been learning python through > python bootcamp course in udemy so, I want to crack GSOC so, I started to > learn stuff like contrib

Re: DJANGO forms: Improve the presentation of the elements

2020-10-26 Thread Walter Randazzo
Hi Derek, Thanks for sharing. im gonna try with crispy forms. El lunes, 26 de octubre de 2020 a la(s) 10:52:24 UTC-3, Derek escribió: > What you want to achieve (labels to the side) is the same example shown in > the Django-crispy-forms README: > > https://github.com/django-crispy-forms/django-c

Re: DJANGO forms: Improve the presentation of the elements

2020-10-26 Thread sarva nithin
hey,guys I'm new for all these present I have been learning python through python bootcamp course in udemy so, I want to crack GSOC so, I started to learn stuff like contribute organisations so, I don't understand where to start so, please if anybody can help me please reply and I have also st

Re: DJANGO forms: Improve the presentation of the elements

2020-10-26 Thread Derek
What you want to achieve (labels to the side) is the same example shown in the Django-crispy-forms README: https://github.com/django-crispy-forms/django-crispy-forms On Sunday, 25 October 2020 at 19:46:54 UTC+2 wwran...@gmail.com wrote: > Hi guys, > > Is there any way to improve the distribut

DJANGO forms: Improve the presentation of the elements

2020-10-25 Thread Walter Randazzo
Hi guys, Is there any way to improve the distribution of the elements of the django form, from this (img1) to (img2)? How so? Thanks in Advance Code: {{filter.form|bootstrap}} Buscar % .00 Aplicar

Re: Passing value to http request without using django forms

2020-06-26 Thread Ogunsanya Opeyemi
Yes you can do that. OGUNSANYA OPEYEMI On Fri, Jun 26, 2020 at 10:01 AM Jeric Epon wrote: > Is there way to pass value to http request from a custom html input form > without using django modelForms ? > > -- > You received this message because you are subscribed to the Google Groups > "Django u

Passing value to http request without using django forms

2020-06-26 Thread Jeric Epon
Is there way to pass value to http request from a custom html input form without using django modelForms ? -- 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 djang

Re: Django forms

2020-06-17 Thread chaitanya orakala
Hi Obed, You can use django model forms, where modelform will access your fields in model and you play with it using widgets. Hope this helps. Thank You On Tue, Jun 16, 2020 at 5:25 PM Obed Balogun wrote: > Please im trying to create a playlist app such that the user enters songs > in a playlis

Collecting Data From Django Forms

2020-06-16 Thread Obed Balogun
Please I need help collecting data from a user. I have a playlist app where users should be able to create a playlist and enter songs they feel belong in the playlist. The problem im having is collecting songs from the user in such a way that the songs would be iteable within a playlist model. W

Django forms

2020-06-16 Thread Obed Balogun
Please im trying to create a playlist app such that the user enters songs in a playlist creation page and this is added to a playlist model. I want to know the best way to collect this data from the user. Im stuck at what possible way to collect this data in the form page and then display each s

Re: CSS with Django forms

2020-05-16 Thread Anubhav Madhav
te: > > > Thankyou Clive!! I know I can use CSS like that, but if I do that > > the problem I'll face is that the 'form' or the 'input' tags or > > 'submit' button, which are rendered using django forms, cannot be > > modified u

Re: CSS with Django forms

2020-05-15 Thread Clive Bruton
t' tags or 'submit' button, which are rendered using django forms, cannot be modified using CSS in this way. Is there any other way to fix it? On Wednesday, 13 May 2020 18:58:08 UTC+5:30, Clive Bruton wrote: On 12 May 2020, at 22:41, Anubhav Madhav wrote: > Is there any way

Re: CSS with Django forms

2020-05-15 Thread Anubhav Madhav
ing class on forms. > > On Fri, 15 May 2020 at 00:10, Anubhav Madhav > wrote: > >> Thankyou Clive!! I know I can use CSS like that, but if I do that the >> problem I'll face is that the 'form' or the 'input' tags or 'submit' >> butt

Re: CSS with Django forms

2020-05-15 Thread Devansh Chaubey
roblem I'll face is that the 'form' or the 'input' tags or 'submit' > button, which are rendered using django forms, cannot be modified using CSS > in this way. Is there any other way to fix it? > > On Wednesday, 13 May 2020 18:58:08 UTC+5:30, Clive Bru

How do I show dynamic and dependable list of values of model field on Front End using Django Forms?

2020-05-15 Thread Khubaib Khawar
have a Detail Model which has a ForeignKey() of User Model. I want to show the list of subject (which is a field of Detail Model) associated with a single user, at the Front End in Template. It should be a dropdown menu and user should be able to select the subject from the list and submit the

Re: CSS with Django forms

2020-05-14 Thread Anubhav Madhav
Thankyou Clive!! I know I can use CSS like that, but if I do that the problem I'll face is that the 'form' or the 'input' tags or 'submit' button, which are rendered using django forms, cannot be modified using CSS in this way. Is there any other way to fix i

Re: CSS with Django forms

2020-05-14 Thread Anubhav Madhav
Thankyou Kasper :) On Wednesday, 13 May 2020 19:02:46 UTC+5:30, Kasper Laudrup wrote: > > > > On 13/05/2020 06.17, Bighnesh Pradhan wrote: > > you can use javascript it is good > > > > Oh yes, we all love javascript: > > https://www.destroyallsoftware.com/talks/wat > > :-) > > Seriously thou

Re: CSS with Django forms

2020-05-14 Thread Anubhav Madhav
Thankyou Bighnesh On Wednesday, 13 May 2020 18:57:36 UTC+5:30, Bighnesh Pradhan wrote: > > you can use javascript it is good > > On Wed, May 13, 2020 at 3:13 AM Anubhav Madhav > wrote: > >> My problem is, that I've made a beautiful 'Sign Up' and 'Login' Page >> using HTML and CSS. Later on, in m

Re: CSS with Django forms

2020-05-13 Thread Kasper Laudrup
On 13/05/2020 06.17, Bighnesh Pradhan wrote: you can use javascript it is good Oh yes, we all love javascript: https://www.destroyallsoftware.com/talks/wat :-) Seriously though, javascript has nothing to do with using static CSS in django templates. -- You received this message becaus

Re: CSS with Django forms

2020-05-13 Thread Clive Bruton
On 12 May 2020, at 22:41, Anubhav Madhav wrote: Is there any way to display the forms with my HTML CSS files. Use {% include %} (https://docs.djangoproject.com/en/3.0/ref/ templates/builtins/#include) in your HTML template files for an embedded style sheet, or just use a link in the head

Re: CSS with Django forms

2020-05-13 Thread Bighnesh Pradhan
you can use javascript it is good On Wed, May 13, 2020 at 3:13 AM Anubhav Madhav wrote: > My problem is, that I've made a beautiful 'Sign Up' and 'Login' Page using > HTML and CSS. Later on, in my project, I had to use 'forms' for > registration and login. > Is there any way to display the forms

CSS with Django forms

2020-05-12 Thread Anubhav Madhav
My problem is, that I've made a beautiful 'Sign Up' and 'Login' Page using HTML and CSS. Later on, in my project, I had to use 'forms' for registration and login. Is there any way to display the forms with my HTML CSS files. Please Help!! -- You received this message because you are subscribed

reg: how to use Jinja template in HTML for django forms

2020-04-24 Thread 'Amitesh Sahay' via Django users
Hi,I have created django forms and the logic is fine, and I have created the HTML page to show the form fields. I have attached the screenshot for the reference. The problem I am facing two issues as below:- 1) to integrate the django form fields in the HTML page through Jinja. HTML file:{% load

django forms exclude values from choicefield

2020-01-05 Thread Muhammad Mahir
I want to exclude those options from the ChoiceField in the forms that has been already selected and are into the database. Below is the Code. models.py SEMESTER_CHOICES = ( ("1", "1"), ("2", "2"), ("3", "3"), ("4", "4"), ("5", "5"), ("6", "6"), ("7", "7"), ("8"

django forms exclude values from choicefield that are already into database

2020-01-05 Thread Muhammad Mahir
I want to exclude those options from the ChoiceField in the forms that has been already selected and are into the database. Below is the Code. models.py ``` SEMESTER_CHOICES = ( ("1", "1"), ("2", "2"), ("3", "3"), ("4", "4"), ("5", "5"), ("6", "6"), ("7", "7"), ("8

Re: reg: Django forms and models

2019-11-13 Thread 'Amitesh Sahay' via Django users
Initially I had written the "else" statement at the wrong place. Moved it under the very first "if" and used then returned the HTTPresponse on the right place inside the function Regards, Amitesh S On Wednesday, 13 November, 2019, 5:42:57 AM IST, o1bigtenor wrote: On Tue, Nov 12,

Re: reg: Django forms and models

2019-11-12 Thread o1bigtenor
On Tue, Nov 12, 2019 at 12:39 PM 'Amitesh Sahay' via Django users wrote: > > Hello Kasper, > > Thank you for the hint. I found my mistake and resolved it. > So what did you do? (doesn't need to have all the detail just the idea please) TIA -- You received this message because you are subscribed

Re: reg: Django forms and models

2019-11-12 Thread 'Amitesh Sahay' via Django users
Hello Kasper, Thank you for the hint. I found my mistake and resolved it. Regards, Amitesh On Tuesday, 12 November, 2019, 2:02:09 AM IST, Kasper Laudrup wrote: Hi Amitesh, In this view: On 11/11/2019 20.36, 'Amitesh Sahay' via Django users wrote: > > def contact(request): >   

Re: reg: Django forms and models

2019-11-11 Thread Kasper Laudrup
Hi Amitesh, In this view: On 11/11/2019 20.36, 'Amitesh Sahay' via Django users wrote: def contact(request): if request.method =='POST': name_r = request.POST.get('name') email_r = request.POST.get('email') phone_r = request.POST.get('phone') comment_r

reg: Django forms and models

2019-11-11 Thread 'Amitesh Sahay' via Django users
Hello Members, I am creating a simple django forms and integrating it with models. I have followed the django docs to perform the task, but I believe that I am doing some mistake due to which I am getting "ValueError at /blog/contact/". Below is the full error stack: Environment:

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-10 Thread Sim
Form should be provided in context render of index view . Try this please and let me know if it worked On Sunday, June 9, 2019, Marvelous Ikechi wrote: > I couldn't find a description field in the creation of your ContactForm. > Maybe it's an oversight from me. However, if it isn't, I'm not expe

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-09 Thread Marvelous Ikechi
I couldn't find a description field in the creation of your ContactForm. Maybe it's an oversight from me. However, if it isn't, I'm not expecting to see a {{card.description}} in your cards.html page. On 12:30PM, Fri, Jun 7, 2019 Delcy John wrote: > i think the error is in form.py,you must put i

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-07 Thread Delcy John
i think the error is in form.py,you must put indentation in class On Fri, Jun 7, 2019 at 9:37 AM Joe Reitman wrote: > Interesting problem. It won't display because the form is inside a > for-loop. Django Template language looks at variables inside a for-loop > differently. Basically it looks for

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-06 Thread Joe Reitman
Update. You can do this by hard coding the HTML form in the template. If you want to gather the data a user enters, each form will have to be uniquely identifiable and your view will have to determine which form its getting post data from. You can put the card index number in the button value

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-06 Thread Joe Reitman
Interesting problem. It won't display because the form is inside a for-loop. Django Template language looks at variables inside a for-loop differently. Basically it looks for a collection. Since {{ form }} is not a collection, it just ignores it. I'm not sure how you can create multiple forms l

How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-06 Thread Majid Rafiee
I've created a form in Django: #forms.py from django import forms class ContactForm(forms.Form): name = forms.CharField() number = forms.FloatField() eail_user = forms.EmailField() and imported in in views.py #views.pyfrom django.shortcuts import renderfrom .models imp

Re: Django Upload multiple files without using Django forms or models

2019-05-13 Thread Sam W
Yes long time ago .. follow this tutorial https://simpleisbetterthancomplex.com/tutorial/2016/11/22/django-multiple-file-upload-using-ajax.html On Monday, May 13, 2019 at 10:00:24 AM UTC-5, christophe szczepanski wrote: > > *do solved your problem ? , i have the same ?* > > > *Thank you :)* > --

Re: Django Upload multiple files without using Django forms or models

2019-05-13 Thread christophe szczepanski
*do solved your problem ? , i have the same ?* *Thank you :)* -- 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...@googlegroups.com. To pos

Django Upload multiple files without using Django forms or models

2019-04-14 Thread Sam W
I want to upload multiple files to the system (Local folder) without using Django forms or models. For a single file, everything works just fine and the file get saved to a local media folder under the project. But when I changed the function from {request.FILES['images&#

error information in Django forms template

2019-03-14 Thread Mike Rankin
I'm new to Django and I'm trying an experiment using material.io. The problem I'm having is that the formfield injects the error messages and the label directly into the page instead of sending it to the widget template. Because of the way material.io builds controls, it would be nice to have t

Django forms versus widgets versus crispy forms

2018-11-26 Thread TimT Vogt
Is there a good tutorial for Posting forms in the database? I have a model and views and able to post name adres from the admin on local host:8000. Now try to decide what is best for name adres and shipping. On two separate forms So I am figuring out how my models need to look. Verstuurd vanaf

Re: Custom attributes in django forms

2018-11-26 Thread aakashchoudhary66
Subject: Re: Custom attributes in django forms thanks!gnchyOn 26 Nov 2018 11:22, "Yavin Aalto Arba" wrote:Hi Gordon, Try starting with the documentation here and if u have any questions please let us know:https://docs.djangoproject.com/en/2.1/ref/forms/widgets/On Sun, Nov 25, 2018, 11:09

Re: Custom attributes in django forms

2018-11-26 Thread gordon nchy
thanks! gnchy On 26 Nov 2018 11:22, "Yavin Aalto Arba" wrote: > Hi Gordon, > > Try starting with the documentation here and if u have any questions > please let us know: > > https://docs.djangoproject.com/en/2.1/ref/forms/widgets/ > > On Sun, Nov 25, 2018, 11:09 PM gordon nchy >> hello everyon

Re: Custom attributes in django forms

2018-11-26 Thread Yavin Aalto Arba
Hi Gordon, Try starting with the documentation here and if u have any questions please let us know: https://docs.djangoproject.com/en/2.1/ref/forms/widgets/ On Sun, Nov 25, 2018, 11:09 PM gordon nchy hello everyone > i'm facing a challenge on how to add custom attributes to django login > f

Custom attributes in django forms

2018-11-25 Thread gordon nchy
hello everyone i'm facing a challenge on how to add custom attributes to django login form. i used the LoginView from django.contrib.auth.views to generate a login form, but i really need help on how to add custom attributes maybe like using widgets but i dont know how to do it..i'll appreci

Re: Initializing DateTimeField in django forms.

2018-02-20 Thread Ryan Nowakowski
You could make the date field "disabled": https://docs.djangoproject.com/en/2.0/ref/forms/fields/#disabled On Mon, Feb 19, 2018 at 08:37:40AM -0800, prince gosavi wrote: > That did the job.But I would like to get rid of the 'Field' type view that > surrounds the date. As I only want to display th

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread Jani Tiainen
Hi. If you want to display only date why aren't you doing it in template rather than trying to make form to just display value. 19.2.2018 18.38 "prince gosavi" kirjoitti: > That did the job.But I would like to get rid of the 'Field' type view that > surrounds the date. As I only want to display

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread prince gosavi
That did the job.But I would like to get rid of the 'Field' type view that surrounds the date. As I only want to display the date. Is there a way to do it in the form itself or any way to change it in the templates? On Monday, February 19, 2018 at 7:52:05 PM UTC+5:30, prince gosavi wrote: > > H

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread Etienne Robillard
i think you need to replace: form = UserQueryForm() with form = UserQueryForm(initial={'date': date}) See: https://docs.djangoproject.com/en/2.0/ref/forms/api/ Etienne Le 2018-02-19 à 10:31, prince gosavi a écrit : | # my_app/views.py fromdjango.shortcuts importrender,get_object_or_404 #

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread prince gosavi
# my_app/views.py from django.shortcuts import render, get_object_or_404 # Create your views here. from .models import User from .forms import UserQueryForm def home(request): # home page a_list = User.objects.filter() for item in a_list: context = {'username': item.username,'conta

Re: Initializing DateTimeField in django forms.

2018-02-19 Thread Etienne Robillard
How does your view looks like? Etienne Le 2018-02-19 à 09:18, prince gosavi a écrit : Hi, I am building a simple django application for user feedback. And I have created a form for that purpose. Here is the snippet: | # my_app/forms.py fromdjango importforms importdatetime classUserQueryF

Initializing DateTimeField in django forms.

2018-02-19 Thread prince gosavi
Hi, I am building a simple django application for user feedback. And I have created a form for that purpose. Here is the snippet: # my_app/forms.py from django import forms import datetime class UserQueryForm(forms.Form): date = forms.DateField(initial=datetime.date.today) # need help u

Django forms and django models

2017-11-30 Thread Andrea Cristiana Adamczyk Abascal
I have an attribute of a model called "options" that is an array of prayers that are entered through textinputs. How can I declare this attribute in the model and what widget may I use in the model form? thank you! -- You received this message because you are subscribed to the Google Groups "

Re: Django Forms

2017-10-21 Thread test
class PollForm(forms.Form): answer = forms.ChoiceField( widget=forms.RadioSelect, choices=cool_choices) def __init__(self, poll, *args, **kwargs): super(PollForm, self).__init__(*args, **kwargs) b = poll.choice_set.all() list_choice = [] fo

Re: Django Forms

2017-10-21 Thread James Schneider
Since each form is set to only allow you to select 1 multiple choice option, if I add many forms in one page, I can only select one option overall. So if I answer question 1, I can't answer any of the other questions without it unselecting question 1's answer. Does anyone know how to fix this? I

Django Forms

2017-10-21 Thread test
Hi, I have a form that contains a question and a multiple choice answer field. For example: What is your favorite color? - Blue - Green - Red - Yellow I render the page with a list of forms (or I guess formset?) and loop through them. So something like this. for form in formset:

Re: Drop Down Menu in Django Forms not working.

2017-08-07 Thread Arun S
class EvalState(models.Model,AtlasBaseHelper): """ Represents Eval State: ACTIVE INACTIVE DELETE NA """ name = models.CharField(max_length=32, unique=True) friendly_name = models.CharField(max_length=32, unique=True) description = models.CharField(max_length=

Re: Drop Down Menu in Django Forms not working.

2017-08-07 Thread lemme smash
you didn't show me a model structure, you just showed another model, so I can't give you example without picture of what's going on there On Monday, August 7, 2017 at 1:39:49 PM UTC+3, Arun S wrote: > > Can you just give an Example for this taking a Query. > > > > On Monday, August 7, 2017 at 3:3

Re: Drop Down Menu in Django Forms not working.

2017-08-07 Thread Arun S
Can you just give an Example for this taking a Query. On Monday, August 7, 2017 at 3:37:04 PM UTC+5:30, lemme smash wrote: > > i meant EvalState model > if name attribute on it is a ForeignKey you should get corresponding > queryset of model it links to > if it's charfield, you should use text

Re: Drop Down Menu in Django Forms not working.

2017-08-07 Thread lemme smash
i meant EvalState model if name attribute on it is a ForeignKey you should get corresponding queryset of model it links to if it's charfield, you should use text choices On Monday, August 7, 2017 at 6:22:50 AM UTC+3, Arun S wrote: > > The Models Look like this : > > stage_state = models.ForeignK

Re: Drop Down Menu in Django Forms not working.

2017-08-06 Thread Arun S
The Models Look like this : stage_state = models.ForeignKey(EvalState, verbose_name="Eval State") class Bundle(AtlasAuditModel, AtlasBaseHelper):^M """^M Represents the bundle purchased by the customer. The bundle^M contains a reference identifier which remains the same if the^M th

Re: Drop Down Menu in Django Forms not working.

2017-08-06 Thread lemme smash
so, you can maybe show you models structure here? also, if it is a ForeignKey, why you trying to filter qs by string values? I mean Q(name = 'ACTIVE') it's shouldn't work On Sunday, August 6, 2017 at 5:22:21 AM UTC+3, Arun S wrote: > > Yes, name is a foreign key here. -- You received this mess

Re: Drop Down Menu in Django Forms not working.

2017-08-05 Thread Arun S
Yes, name is a foreign key here. -- 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...@googlegroups.com. To post to this group, send email to

Re: Drop Down Menu in Django Forms not working.

2017-08-05 Thread lemme smash
name is a ForeignKey field? If not, you shouldn't use queryset attribute there. Use choices instead. If you want to render all available choices from db, you can get it like Model.objects.filter(...).values_list('name', flat=True) On Friday, August 4, 2017 at 8:07:24 PM UTC+3, Arun S wrote: > >

Drop Down Menu in Django Forms not working.

2017-08-04 Thread Arun S
Hi, I am trying to have a drop down menu for a field in my form but seems like its not working as required. This is my form: forms.py eval_states = [ ('ACTIVE',EvalState.objects.filter(name='ACTIVE')), ('INACTIVE',EvalState.objects.filter(name='INACTIVE')), ('DELETE',Eva

Re: Django Forms HorizontalRadioSelect Renderer not working.

2017-07-26 Thread Shazia Nusrat
Thank you so much for help. Regards, Shazia On Tue, Jul 25, 2017 at 12:27 PM, Tim Graham wrote: > Replace renderer=HorizontalRadioRenderer with attrs={'class': 'inline'} > and then style radio elements using CSS. contrib.admin uses this > approach. Here's the CSS: > > https://github.com/django

Re: Django Forms HorizontalRadioSelect Renderer not working.

2017-07-25 Thread Tim Graham
Replace renderer=HorizontalRadioRenderer with attrs={'class': 'inline'} and then style radio elements using CSS. contrib.admin uses this approach. Here's the CSS: https://github.com/django/django/blob/d17eaa868cd6911197dcd8b096c4f0418c47007e/django/contrib/admin/static/admin/css/forms.css#L42-L6

Re: Django Forms HorizontalRadioSelect Renderer not working.

2017-07-25 Thread Shazia Nusrat
I am using Djnago 1.11.1. I've tried template approach but perhaps I've missed out something. If you can provide me some workable example I will be really really thankful. Regards, Shazia On Tue, Jul 25, 2017 at 1:57 AM, ecas wrote: > Which version of Django are you using? From 1.11 the widget

Re: Django Forms HorizontalRadioSelect Renderer not working.

2017-07-25 Thread ecas
Which version of Django are you using? From 1.11 the widgets changed to a template mechanism. https://docs.djangoproject.com/en/1.11/ref/forms/widgets/#radioselect Maybe this can help: https://stackoverflow.com/questions/44187640/django-1-11-horizontal-choice-field El dimarts, 25 juliol de 2017

Django Forms HorizontalRadioSelect Renderer not working.

2017-07-25 Thread Shazia Nusrat
Hi, I need to select form values horizontally but couldn't get it work. Following is the code: class HorizontalRadioRenderer(forms.RadioSelect.renderer): def render(self): return mark_safe(u'\n'.join([u'%s\n' % w for w in self])) class ResponseForm(models.ModelForm): class Meta:

Re: How to use Django forms for surveys

2016-10-26 Thread Luis Zárate
Hi, we are developing something like you want, but it's a premature project right now, maybe in few months we launch our first stable version (survey monkey be aware...), the project home page is https://github.com/solvo/derb , see development branch for a updated version. So if you are intereste

Re: How to use Django forms for surveys

2016-10-20 Thread Diego De La Vega
El miércoles, 19 de octubre de 2016, 21:11:18 (UTC-3), James Schneider escribió: > > > > On Sun, Oct 16, 2016 at 7:37 PM, Diego De La Vega > wrote: > >> Hi. This is my first question in this group. >> >> My problem is that I have to program a survey application and I would >> like to have a hin

Re: How to use Django forms for surveys

2016-10-19 Thread James Schneider
On Sun, Oct 16, 2016 at 7:37 PM, Diego De La Vega wrote: > Hi. This is my first question in this group. > > My problem is that I have to program a survey application and I would like > to have a hint about forms. > > The survey is +200 questions long and is divided in multiple subjects > (every s

Re: How to use Django forms for surveys

2016-10-19 Thread Petite Abeille
> On Oct 17, 2016, at 4:37 AM, Diego De La Vega wrote: > > The main problem is how to do for showing the relevant fields and not the > unwanted. Use TypeForm and call it a day :D https://www.typeform.com/help/what-is-logic-jump/ -- You received this message because you are subscribed to t

Re: How to use Django forms for surveys

2016-10-19 Thread Diego De La Vega
I think you understood every word I wrote and every problem I had to face. I will see what ed-questionnaire has to offer, but I think that I must code very much. Now I'm doing the survey with the Delphi-like Lazarus IDE (because I know Pascal very well) and it's easy to follow the control of the

Re: How to use Django forms for surveys

2016-10-17 Thread Asad Jibran Ahmed
Hi, This is a complicated question and I'll do my best to answer it well, but please forgive me if I miss somethings or say something inaccurate. I had a similar project a while back and I did think about a possible solution, something that might be of use to you. If you want to use something pre

How to use Django forms for surveys

2016-10-17 Thread Diego De La Vega
Hi. This is my first question in this group. My problem is that I have to program a survey application and I would like to have a hint about forms. The survey is +200 questions long and is divided in multiple subjects (every subject is independent from the others) and mainly consists of numeri

Re: Hello - need help on accessing current user in django forms.

2016-09-27 Thread Ricardo Daniel Quiroga
> Hello, >> >> I need filter a queryset based on current user in Django forms. >> >> kindly help me if you find any. >> >> Thanks, >> >> Naresh >> > -- > You received this message because you are subscribed to the Google Groups > "D

Re: Hello - need help on accessing current user in django forms.

2016-09-23 Thread Tim Graham
et based on current user in Django forms. > > kindly help me if you find any. > > Thanks, > > Naresh > -- 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, s

Hello - need help on accessing current user in django forms.

2016-09-23 Thread Naresh Kumar
Hello, I need filter a queryset based on current user in Django forms. kindly help me if you find any. Thanks, Naresh -- 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 i

Re: Easiest way to ajax enable django forms

2016-07-14 Thread Derek
Not surprisingly, someone (well, more than one someone, actually) has already done this: https://realpython.com/blog/python/django-and-ajax-form-submissions/ or http://stackoverflow.com/questions/14099038/an-easy-way-to-submit-django-forms-using-ajax-jquery or https://aliteralmind.wordpress.com

Re: Easiest way to ajax enable django forms

2016-07-14 Thread ludovic coues
A JS library like Jquery or plain javascript. Listen to event, intercept & cancel them, make the query to django, insert or remove the appropriate item. 2016-07-13 20:25 GMT+02:00 J Singh : > I want functionality such as add/delete line items to an order , do not want > a form resubmit every time

Easiest way to ajax enable django forms

2016-07-13 Thread J Singh
I want functionality such as add/delete line items to an order , do not want a form resubmit every time an item is added . What is the best way to do this without having to use angular/ react etc -- You received this message because you are subscribed to the Google Groups "Django users" group.

  1   2   3   >