Re: Does not displayed radio button in tutorial04

2022-10-26 Thread Snsk Mats
Hi Member, I solved this problem. I missed some of the content of the following sections. https://docs.djangoproject.com/en/4.1/intro/tutorial02/#playing-with-the-api In particular, the following statements. # Create three choices. >>> q.choice_set.create(choice_text='Not much', votes=0) >>> q

Does not displayed radio button in tutorial04

2022-09-11 Thread Mats
Hi, Member I am going through the tutorial at docs.djangoproject.com." I am implementing a form in "Writing your first Django app, part 4" but when I enter the code as per the tutorial, the radio buttons on the form do not appear. https://docs.djangoproject.com/en/4.1/intro/tutorial04/ I thin

Re: django widget radio button error save is not touch

2020-09-07 Thread José Luis Ruiz
at the middle of the page On Sunday, September 6, 2020 at 8:51:02 PM UTC-4 sacrac wrote: > Hi, i have a problem when save a field in radio button > in my models have this > CHOICES_OPTIONS = ( > (1, 'Yes'), > (2, 'No'), > ) > > class MyModels(...)

django widget radio button error save is not touch

2020-09-06 Thread carlos
Hi, i have a problem when save a field in radio button in my models have this CHOICES_OPTIONS = ( (1, 'Yes'), (2, 'No'), ) class MyModels(...): myfield = models.IntegerField(choices=CHOICES_OPTIONS, null=True, blank=True) class MyModelsForm() myfield = form

Trying to add radio button and store its value in database.. Django

2019-06-02 Thread abb
https://stackoverflow.com/questions/56407153/radio-button-with-default-selection-in-django Not understanding where am i going wrong here. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Radio button

2015-12-16 Thread Billu
The question wasn't clear { to me }. Could you give any link to a similar site. As for sending data about which radio button was chosen, you could generate name for radio button and when the form is submitted, it sends the data via POST. On Wednesday, 16 December 2015 01:11:23 UTC

Radio button

2015-12-15 Thread piasek piasek
I would like prepare django form for several entries for one model. Let's assume I have model Photo where I upload and save image. >From model I will takie 10 entries and for each of image I would like generate forms to set title, description, check if photo is active. That part I have it and is w

Re: New to django,need help! just trying to retrieve values from a template to a view.py (ie user may input text, make choice selection, select a radio button value)

2013-11-01 Thread Jimmy Pants
Expanding on Daniel Roseman's suggestion, I recommend the Web Fundamentals course at www.codecademy.com - totally free, and pretty good, covers CSS stylesheets as well. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: New to django,need help! just trying to retrieve values from a template to a view.py (ie user may input text, make choice selection, select a radio button value)

2013-10-31 Thread mmrs151
So what is the problem, really? On Wednesday, 30 October 2013 20:17:17 UTC, pete wrote: > > Hi > New to django,need help! just trying to retrieve values from a template > to a view.py (ie user may input text, make choice selection, select a > radio button value) > like to

Re: New to django,need help! just trying to retrieve values from a template to a view.py (ie user may input text, make choice selection, select a radio button value)

2013-10-31 Thread Daniel Roseman
On Wednesday, 30 October 2013 20:17:17 UTC, pete wrote: > Hi > New to django,need help! just trying to retrieve values from a template > to a view.py (ie user may input text, make choice selection, select a > radio button value) > like to know the poll list section, market se

New to django,need help! just trying to retrieve values from a template to a view.py (ie user may input text, make choice selection, select a radio button value)

2013-10-30 Thread pete
Hi New to django,need help! just trying to retrieve values from a template to a view.py (ie user may input text, make choice selection, select a radio button value) like to know the poll list section, market selection, coupon code, and discount text, and poll choice selection from radio

Re: Show deactived radio button on a form

2011-12-30 Thread Mario Gudelj
I think you may need a HTML or JS solution here. Check out this SO post http://stackoverflow.com/questions/1953017/why-cant-radio-buttons-be-readonly Cheers, On 31 December 2011 05:29, CrabbyPete wrote: > I have the following form: > > DEAL_CHOICES = [ >('Standard','Standard'),

Show deactived radio button on a form

2011-12-30 Thread CrabbyPete
I have the following form: DEAL_CHOICES = [ ('Standard','Standard'), ('Sponsored','Sponsored'), ('Trial' ,'Trial') ] class ApplyForm(forms.Form): deal_type= forms.ChoiceField( required = True,

Re: Radio button with nested widget

2011-10-20 Thread Kurtis Mullins
he following form: a first ChoiceField with values > "mode 1", "mode 2" or "manual". > > Depending on its value I need to show a FileUpload field (mode1 or mode2) > or some CharFields (mode3). > > I'm trying to mimic a desktop GUI, where you can thr

Radio button with nested widget

2011-10-20 Thread Leonardo Giordani
Hi all, I'm trying to implement the following form: a first ChoiceField with values "mode 1", "mode 2" or "manual". Depending on its value I need to show a FileUpload field (mode1 or mode2) or some CharFields (mode3). I'm trying to mimic a desktop GUI, w

Re: Preselected Radio button

2011-05-28 Thread Ndungi Kyalo
thanks bruno. and thanks for the advice on tuples too. On 25 May 2011 17:30, "bruno desthuilliers" wrote: > On May 25, 4:12 pm, Ndungi Kyalo wrote: >> Am trying to pre-select a radio button created with the django.forms library : >> >> choices = forms

Re: Preselected Radio button

2011-05-25 Thread bruno desthuilliers
On May 25, 4:12 pm, Ndungi Kyalo wrote: > Am trying to pre-select a radio button created with the django.forms library : > >     choices = forms.ChoiceField( >         widget = forms.RadioSelect(), >         choices = [ >             ['a', 'i liked it'],

Preselected Radio button

2011-05-25 Thread Ndungi Kyalo
Am trying to pre-select a radio button created with the django.forms library : choices = forms.ChoiceField( widget = forms.RadioSelect(), choices = [ ['a', 'i liked it'], ['b', 'i did not like it'] ],

Re: Input element radio button group across rows of change list view in Admin?

2011-05-02 Thread creecode
Hello all, If you happen to know of an existing app w/online source that has an admin interface similar to what I want, pointers appreciated! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goo

Input element radio button group across rows of change list view in Admin?

2011-04-30 Thread creecode
Hello all, I'm attempting to create a change list view in the Admin where the first column is a single radio button. I want the radio buttons to be a group that is shared across the rows. I want the change list view to show the Save button so that the form can be posted. When the fo

Re: Loop over a form's choices (radio button) and render it

2010-08-24 Thread pravasi
If you have a function as below in the SelectForm class you can get a iterable renderer for the radio button field.I am not very sure about whether you have a initial value or value in your situation. def get_selectfield_renderer(self): field = self.fields['select

Re: Loop over a form's choices (radio button) and render it

2010-08-23 Thread Bill Freeman
Andreas, I'll give it a try, but it won't be soon. Other projects are hot. Bill On Sun, Aug 22, 2010 at 9:07 AM, Andreas Pfrengle wrote: > Hello Bill, > > thanks for the code. It took half the weekend, but finally I built > upon this to get a radiobutton-iterator. This was a bit more > complic

Re: Loop over a form's choices (radio button) and render it

2010-08-22 Thread Andreas Pfrengle
Hello Bill, thanks for the code. It took half the weekend, but finally I built upon this to get a radiobutton-iterator. This was a bit more complicated, since the RadioInput widget has no own render-method, so I needed to introduce a helper class that derives from RadioInput. I've put the code her

Re: Loop over a form's choices (radio button) and render it

2010-08-16 Thread Bill Freeman
Ok. I have permission from my boss, and have cleaned it up a bit. See: http://djangosnippets.org/snippets/2151/ Bill On Sat, Aug 14, 2010 at 7:25 AM, Andreas Pfrengle wrote: > Hello Bill, > > thanks for your answer. However, I've never written a template filter > yet. Would you present the co

Re: Loop over a form's choices (radio button) and render it

2010-08-14 Thread Andreas Pfrengle
Hello Bill, thanks for your answer. However, I've never written a template filter yet. Would you present the code of your checkboxiterator? Is there sth. on djangosnippets? Andreas -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Loop over a form's choices (radio button) and render it

2010-08-11 Thread Bill Freeman
Non-trivial. I would up writing a template filter to do this. You have to use undocumented, I believe, interfaces. I called my filter checkboxiterator, so usage looks something like: {% for pseudocheckbox in some_multi_select_field|checkboxiterator %} It iterates over a set of instances of a

Re: Loop over a form's choices (radio button) and render it

2010-08-11 Thread Andreas Pfrengle
Just to push it up again... any ideas? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: Loop over a form's choices (radio button) and render it

2010-08-07 Thread Andreas Pfrengle
Thinking about it, instead of the radio button it would be even better if I could select just the whole datarow. But I have no idea how to do it :-? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Loop over a form's choices (radio button) and render it

2010-08-07 Thread Andreas Pfrengle
Hello, what I want to do is to add a radio button into the last column of a data table. The user shall be able to select exactly one of the table's rows. I was thinking about defining a SelectForm with one 'select'-field (ChoiceField) with a RadioSelect-widget. In the template, I

customize the radio button diplay order in templates

2009-08-30 Thread Lokesh
Hi, Need help in understanding the template rendering for radio/check buttons 1. Is it possible to display the radio/check buttons in horizontal or customized(as per user interest) order. 2. How do I get the control on the radio button attribute/variable in templates. (Instead of just printing

Re: Creating radio button search app

2009-07-22 Thread Joshua Russo
On Wed, Jul 22, 2009 at 10:39 PM, Joshua Russo wrote: > On Wed, Jul 22, 2009 at 10:58 AM, Divesh Gidwani wrote: > >> >> Also, what kind of views do I need? I'm really confused about that >> part. > > > If you want to mimic the current application you will need to create custom > views and forms. I

Re: Creating radio button search app

2009-07-22 Thread Joshua Russo
On Wed, Jul 22, 2009 at 10:58 AM, Divesh Gidwani wrote: > > Also, what kind of views do I need? I'm really confused about that > part. If you want to mimic the current application you will need to create custom views and forms. It's really easy once you get the idea, but it's taken me a couple o

Re: Creating radio button search app

2009-07-22 Thread Divesh Gidwani
Also, what kind of views do I need? I'm really confused about that part. If somebody has snippets of their code that they may have written, it'll be great to see how its done. Thanks. Divesh --~--~-~--~~~---~--~~ You received this message because you are subscrib

Creating radio button search app

2009-07-22 Thread Divesh Gidwani
s' def __unicode__(self): return self.firstname How can I get those radio button like search fields? How to bring up the search? Any suggestions, or resources would be helpful. Thanks in advance! --~--~-~--~~~---~--~~ You received this message b

Boolean field as radio button?

2009-06-19 Thread Masarliev
Hi all, sorry for my bad english. I have db model class that is shown in django admin as inline but boolean fields are checkboxes. how can i replace them with radio buttons --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: radio button assignment as filter in search

2009-03-09 Thread Alex Gaynor
On Mon, Mar 9, 2009 at 12:10 PM, Jesse wrote: > > The problem is that the python converts the andor value to a > character, even though the radio button is presenting it as numeric. > I needed to place quotes around the number: > if andor == '1' and then it works. Hop

Re: radio button assignment as filter in search

2009-03-09 Thread Jesse
The problem is that the python converts the andor value to a character, even though the radio button is presenting it as numeric. I needed to place quotes around the number: if andor == '1' and then it works. Hope this helps someone else. --~--~-~--~~~---~--

Re: radio button assignment as filter in search

2009-03-09 Thread Jesse
Template: {% for pathology in pathology_list %} {{ pathology.pathology }} {% endfor %} There are actually three search selects(pathology, commodity, technology) The user can do and/or for a mix or match of the three, which is why I need the and/or option in the views.py.

Re: radio button assignment as filter in search

2009-03-09 Thread Alex Gaynor
On Mon, Mar 9, 2009 at 11:04 AM, Jesse wrote: > > Hello, > > I have a radio button in template for a search "AND" or "OR" > selection, with the name andor1 values 1 (or) and 2 (and) > > > > In the views.py: > def Bypub(request): >and

radio button assignment as filter in search

2009-03-09 Thread Jesse
Hello, I have a radio button in template for a search "AND" or "OR" selection, with the name andor1 values 1 (or) and 2 (and) In the views.py: def Bypub(request): andor1 = request.POST['andor1'] list=[] andlist=[] for publication in pub1:

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Max
Thanks!! It works now! Max --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to dja

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Daniel Roseman
On Jan 6, 12:20 pm, Max wrote: > Hello, > > Using the tutorial for detail.view, I changed the radio button to a > drop down.  I kept the view the same as the tutorial.   > Seehttp://dpaste.com/106018/ > > When I select the choice on the drop down, I receive the error say

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Karen Tracey
On Tue, Jan 6, 2009 at 12:20 PM, Max wrote: > > Hello, > > Using the tutorial for detail.view, I changed the radio button to a > drop down. I kept the view the same as the tutorial. See > http://dpaste.com/106018/ > > When I select the choice on the drop down, I rece

Changing tutorial radio button to drop down

2009-01-06 Thread Max
Hello, Using the tutorial for detail.view, I changed the radio button to a drop down. I kept the view the same as the tutorial. See http://dpaste.com/106018/ When I select the choice on the drop down, I receive the error saying I didn't make a choice. I have a mistake in either the

newforms - display only one radio button of a group?

2008-07-10 Thread J Meier
t;). They chose between the two using a radio button. I've implemented this radio button as a ChoiceField with the RadioSelect widget. Now I'd like to hand-layout the form, so that one of the radio buttons is next to the structured inputs, and the other is next to the freeform input. I can write

Re: Javascript, Access Radio Button Elements

2008-02-25 Thread Little_Grungy
; > I have a form definition for two radio buttons named choices. I want > > to loop through the radio buttons to perform a check with javascript > > in the rendered html page, however due to the radio button _id's that > > are rendered by the template, I cannot access them w

Re: Javascript, Access Radio Button Elements

2008-02-21 Thread Michael Newman
definition for two radio buttons named choices. I want > > to loop through the radio buttons to perform a check with javascript > > in the rendered html page, however due to the radio button _id's that > > are rendered by the template, I cannot access them with javascript >

Re: Javascript, Access Radio Button Elements

2008-02-21 Thread Daniel Roseman
On 21 Feb, 18:57, Little_Grungy <[EMAIL PROTECTED]> wrote: > Hi, > > I have a form definition for two radio buttons named choices. I want > to loop through the radio buttons to perform a check with javascript > in the rendered html page, however due to the radio button _id&

Re: Javascript, Access Radio Button Elements

2008-02-21 Thread Michael Newman
taken care of. I hope that helps. On Feb 21, 1:57 pm, Little_Grungy <[EMAIL PROTECTED]> wrote: > Hi, > > I have a form definition for two radio buttons named choices. I want > to loop through the radio buttons to perform a check with javascript > in the rendered html page, howev

Javascript, Access Radio Button Elements

2008-02-21 Thread Little_Grungy
Hi, I have a form definition for two radio buttons named choices. I want to loop through the radio buttons to perform a check with javascript in the rendered html page, however due to the radio button _id's that are rendered by the template, I cannot access them with javascript

Re: How to customize display of radio-button group?

2006-02-14 Thread Waylan Limberg
On 2/14/06, Leeuw van der, Tim <[EMAIL PROTECTED]> wrote: > > > > I have a field in my model that is entered, in a form, using a group of > radio-buttons. However, I don't like the display of those radio-buttons: I > want them side by side, rather than as a bulleted-list below each other. > > > >

How to customize display of radio-button group?

2006-02-14 Thread Leeuw van der, Tim
I have a field in my model that is entered, in a form, using a group of radio-buttons. However, I don’t like the display of those radio-buttons: I want them side by side, rather than as a bulleted-list below each other.   Is that possible? How would I achieve that? (Except for custom-codi