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
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
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 to
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)
surname=models.CharField(
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 data.
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&user_input=GuitarBuilder&choose_item=title
I'm trying
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
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 Ap
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 and
> storing it in a da
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 th
.by "validate" I meant to say that I want it be be *valid
> HTML*.
>
> cs
>
> On Apr 9, 12:06 am, Chris Seberino wrote:
>
> > I'm using Django authentication for myhttp://phil4.com/sign_inpage.
>
> > You notice all the Django form input elements generated
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 wrote:
> I'm using Django authentication for myhttp://phil4.com/sign_inpage.
>
> You notice all the Django form input elements generated on that page
>
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 beca
> > still remains. Any insight here?
> >>> >
> >>> > >> >> ps: you can also google some pages which use the IntegerField
> to
> >>> > >> >> save the choices.
> >>> >
> >>> > >> >> B
ES = (
>> > >> >> > ('BR: Bug Report', 'Bug Report'),
>> > >> >> > ('UN: Unknown Problem', 'Unknown Problem'),
>> > >> >> > )
>> > >> >> > typ
x27;),
> > >> >> > )
> > >> >> > type = models.CharField(max_length=1, choices=REPORT_CHOICES)
> > >> >> > submitter = models.CharField(max_length=200,
> default='Anonymous')
> > >> >> > ...
> > >> >&
> >> > INCIDENT_CHOICES = (
> >> >> > ('SF: Seg Fault', 'SegFault'),
> >> >> > ('ML: Memory Leak', 'Memory Leak'),
> >> >> > ('MC: Memory Corruption', 'Mem
rField(max_length=1, choices=INCIDENT_CHOICES)
>> >> > #description of the incident
>> >> > description = models.CharField(max_length=2)
>> >> > ...
>> >> > ...
>> >> > [/code]
>> >> >
>> >>
> ...
> >> > ...
> >> > [/code]
> >> >
> >> > 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 actu
t; > input, not actually processing anything I get "Select a valid choice. SF:
> > Seg Fault is not one of the available choices." .
> >
> > The HTML page code looks like below:
> > [code]
> > Submit a report
> > {% if new_report_form %}
> >
> >
> &
>
> {{ new_report_form.non_field_errors }}
>
> {{ new_report_form.type.errors }}
> Type of Report:
> {{ new_report_form.type }}
>
>
> {{ new_incident_form.type.errors }}
> Type of Inc
{{ new_report_form.non_field_errors }}
{{ new_report_form.type.errors }}
Type of Report:
{{ new_report_form.type }}
{{ new_incident_form.type.errors }}
Type of Incident:
{{ new_incident_form.type }}
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 mes
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, 10:49
On Wednesday 01 October 2008 01:35:55 am Merrick wrote:
> All is not lost if a user enters an invalid code I still want to do
> something with just the url, but I cannot get
> form.cleaned_data.get('url'). Any ideas how to get the url inputted
> and to clean it inside the ValueError branch of code
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 form.cle
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 %}*** {{ form.name.
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 cg
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 Keit
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 it
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 th
31 matches
Mail list logo