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)