Re: transforming form input

2020-07-09 Thread Kai Kobschätzki
Hi Benjamin and Clive, thanks a lot for your response! My explanation was mistakable because I tried to simplify it. My reals use case is accountancy (German-GAAP). If I get an accounting record I have two accounts, for example telephone costs and bank. If my company is liable to VAT I have to

Re: transforming form input

2020-07-08 Thread Benjamin Schollnick
What I generally do is use https://pypi.org/project/nameparser/ While Clive is correct, I haven’t seen name parser fail at breaking it apart correct so far. - Benjamin > On Jul 8, 2020, at 6:43 PM, Clive Bruton wrote: > > > On 7 Jul 2020, at 22:58, Kai Kobschätzki wrote: > >> I

Re: transforming form input

2020-07-08 Thread Clive Bruton
On 7 Jul 2020, at 22:58, Kai Kobschätzki wrote: I render one input field surname. And if the user writes one string in the input field it should be saved to surname (so forename is None). If the user writes two strings (separated through a white space) than the first part should be saved

transforming form input

2020-07-07 Thread Kai Kobschätzki
Hi: Although I spent time with researching I have no starting point for solving my problem. Perhaps someone of you could give me a tip.. I have a simple model.py, e.g. class AdressData(models.Model):     forename=models.CharField(max_length=20,null=True,blank=True)   

Writing a text file from Form input

2019-09-08 Thread Michal Pavliš
Hello, so i'm writing a program that uploads invoices to an accounting webapp based on order info from Wordpress. At one point, the code takes an order number, fetches order data using the WP REST API and is supposed to write a .txt file in a specified location containing mentioned order

class view with filter on form input

2019-02-11 Thread Bob Bobsled
Hi, I have form on a search page called SearchForm where the user selects items to search. The rest part creates a URI which appears as below from the selected items to search. http://archive/ephemera/searchresult/?choose_collection=Macmillan_input=GuitarBuilder_item=title I'm trying to write a

Form input: "unlimited list," what does the backend look like?

2016-10-18 Thread Andrew Emory
I want to get user data where is use a ChoiceSelect field. And if the user selects an option another one pops up giving them the same choices again. I understand that I would do this with JavaScript on the front end. But, it is unclear to me what kind of architecture and model fields I should

Re: form input

2011-05-01 Thread DJ Ango
in models.py you define your database fields: The use a ModelForm: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#modelform Or try the generic create/update/delete views: http://docs.djangoproject.com/en/dev/ref/generic-views/?from=olddocs#create-update-delete-generic-views On

Re: form input

2011-04-30 Thread Kenny Meyer
As a newbie I recommend you taking the Django tutorial. Here's the part about forms: http://docs.djangoproject.com/en/dev/intro/tutorial04/ Kenny On Sat, Apr 30, 2011 at 7:24 PM, Pulkit Mehrotra wrote: > can anyone tell me the precise way of taking an input from a

form input

2011-04-30 Thread Pulkit Mehrotra
can anyone tell me the precise way of taking an input from a form and storing it in a database or provide a good link where i can find one i am a newbie so please help me thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: How adjust Django form input elements generated so they don't have "/>" at end and hence will VALIDATE?

2011-04-08 Thread Chris Seberino
wrote: > By the wayby "validate" I meant to say that I want it be be *valid > HTML*. > > cs > > On Apr 9, 12:06 am, Chris Seberino <cseber...@gmail.com> wrote: > > > I'm using Django authentication for myhttp://phil4.com/sign_inpage. > > &g

Re: How adjust Django form input elements generated so they don't have "/>" at end and hence will VALIDATE?

2011-04-08 Thread Chris Seberino
By the wayby "validate" I meant to say that I want it be be *valid HTML*. cs On Apr 9, 12:06 am, Chris Seberino <cseber...@gmail.com> wrote: > I'm using Django authentication for myhttp://phil4.com/sign_inpage. > > You notice all the Django form input elements gener

How adjust Django form input elements generated so they don't have "/>" at end and hence will VALIDATE?

2011-04-08 Thread Chris Seberino
I'm using Django authentication for my http://phil4.com/sign_in page. You notice all the Django form input elements generated on that page don't validate (They have a "/>" at the end rather than just ">".) How fix!? cs -- You received this message because you ar

Re: newbie problem with accepting form input

2010-12-15 Thread john doe
; > >> >> > Dear all, > >>> > >> >> >I am making a small Django app for a bug tracking > system > >>> > >> >> > to > >>> > >> get > >>> > >> >> >

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
; > >> >> > ('UN: Unknown Problem', 'Unknown Problem'), >> > >> >> > ) >> > >> >> > type = models.CharField(max_length=1, choices=REPORT_CHOICES) >> > >> >> > submitter = models.CharField(max_length=200, >> defa

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
s.ForeignKey(Report) > > >> >> > INCIDENT_CHOICES = ( > > >> >> > ('SF: Seg Fault', 'SegFault'), > > >> >> > ('ML: Memory Leak', 'Memory Leak'), > > >> >> > ('MC: Memory Corruption', 'Memory Corruption'), > > >> >> > ) > > >>

Re: newbie problem with accepting form input

2010-12-14 Thread Titan, Jer-ming Lin
> >   ) > >> >> >   type = models.CharField(max_length=1, choices=INCIDENT_CHOICES) > >> >> >   #description of the incident > >> >> >   description = models.CharField(max_length=2) > >> >> > ... > >> >> > ... > >> >&

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
#description of the incident >> >> > description = models.CharField(max_length=2) >> >> > ... >> >> > ... >> >> > [/code] >> >> > >> >> > I have generated a form wherein a user can enter a report, and >> multiple >> >&g

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
> I have generated a form wherein a user can enter a report, and > multiple > >> > incidents related to the report. When I use the function to accept the > >> > input, not actually processing anything I get "Select a valid choice. > >> > SF: > >> > S

Re: newbie problem with accepting form input

2010-12-13 Thread john doe
ype.errors }} > > Type of Report: > > {{ new_report_form.type }} > > > > > > {{ new_incident_form.type.errors }} > > Type of Incident: > > {{ new_incident_form.type

Re: newbie problem with accepting form input

2010-12-13 Thread Titan, Jer-ming Lin
Type of Report: >                 {{ new_report_form.type }} >             >     >             {{ new_incident_form.type.errors }} >                 Type of Incident: >                 {{ new_incident_form.type }} >             > ... > ... > [/code] > > The form.i

newbie problem with accepting form input

2010-12-13 Thread john doe
of Report: {{ new_report_form.type }} {{ new_incident_form.type.errors }} Type of Incident: {{ new_incident_form.type }} ... ... [/code] The form.is_valid() call is basically saying that there's a problem with validatin

Re: capture form input even after ValueError exists

2008-10-01 Thread Donn
On Wednesday, 01 October 2008 08:59:00 Merrick wrote: > Also how do I access the form submission if not through > cleaned_data.get? I have found this works, but I can't say in what cases: name = form.data['fullname'] \d --~--~-~--~~~---~--~~ You received this

Re: capture form input even after ValueError exists

2008-10-01 Thread Merrick
Yeah thanks, I guess I wasn't clear. I realize I don't have access to cleaned_data but I want to validate my url the same way as django does by default on a form - any pointers on how to accomplish that? Also how do I access the form submission if not through cleaned_data.get? On Sep 30,

capture form input even after ValueError exists

2008-09-30 Thread Merrick
My ModelForm has two input fields url and code, and I raise a ValidationError if the code contains anything other than letters, numbers and dashes. My logic looks something like this: if form.is_valid(): ... return render_to_response('new.html', {'code': new.code}) if ValueError: if

User form input as variable for form action?

2008-04-15 Thread Alex
Hi there, Does anyone know if it's possible to take data input into a form by a user and use this data as a variable within the same form to populate a form action? My form is as follows: Date: {{ form.date }} {% if form.date.errors %}*** {{

Re: Form input to csv + file upload

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: > > I have been searching for examples but everything that I see has a link to a > database. How to you 'get' the data from a form in django? What is the > equivalent of 'data = cgi.FieldStorage(keep_blank_values=1)' I would use > with a Python

Re: Form input to csv + file upload

2007-06-05 Thread Vincent Nijs
I have been searching for examples but everything that I see has a link to a database. How to you 'get' the data from a form in django? What is the equivalent of 'data = cgi.FieldStorage(keep_blank_values=1)' I would use with a Python cgi script? Thanks, Vincent On 6/5/07 7:22 PM, "Russell

Re: Form input to csv + file upload

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: > > Question: If I want to save the file to a directory and information about > the submitter (e.g., name and time of submission) directly to a csv file, > how would I do that in Django? Do you need 'newforms' to do that? In the > documentation

Form input to csv + file upload

2007-06-05 Thread Vincent Nijs
Below is an example of the type form I used to process with a python cgi script. Now I am trying to move everything over to Django. Question: If I want to save the file to a directory and information about the submitter (e.g., name and time of submission) directly to a csv file, how would I do