Re: Correct pattern to call external api during form saving

2017-08-21 Thread James Schneider
On Mon, Aug 21, 2017 at 5:16 AM, Chris Wedgwood wrote: > Hi > > My requirement is > > 1)User adds postcode to form > 2)I call external api with postcode to get details of the > postcode,local authority,MP etc > 3) save this data into another model > My question is what is

Re: 1.11: Value error on related user name during save of user model

2017-08-21 Thread James Schneider
On Mon, Aug 21, 2017 at 7:50 AM, Axel Rau wrote: > While upgrading from 1.9 to 1.11, ForwardManyToOneDescriptor.__set__() > tries to assign a string (description of the related instance) to the > related user name field > of user model. > > class

1.11: Value error on related user name during save of user model

2017-08-21 Thread Axel Rau
While upgrading from 1.9 to 1.11, ForwardManyToOneDescriptor.__set__() tries to assign a string (description of the related instance) to the related user name field of user model. class AbstractEmailUser(AbstractBaseUser, PermissionsMixin, FieldlistForDetailTemplateMixin): localemail =

Re: Correct pattern to call external api during form saving

2017-08-21 Thread Jani Tiainen
Hi. First you need to decide is it crucial that api gets called no matter of what and do you need to report result of call back to user. If yes you want to store task of calling somewhere (database) and do the actual calling at background worker job. There exist several ways to do it but for

Correct pattern to call external api during form saving

2017-08-21 Thread Chris Wedgwood
Hi My requirement is 1)User adds postcode to form 2)I call external api with postcode to get details of the postcode,local authority,MP etc 3) save this data into another model My question is what is the correct pattern for doing this? Where should I call the api? Should this be done before the

Integrate and use AdminLTE2 template as frontend separate from django admin backend

2017-08-21 Thread ledzgio
I have to buld a django app which is used internally in a company, only employees can access the app using username and password. Now, since it is only used internally, I don't want to write HTML code myself but I want to use the bootstrap template AdminLTE2 as frontend which should be

'ModelFormOptions' object has no attribute 'label'

2017-08-21 Thread Lachlan Musicman
Hi All, I'm seeing this error when I start my uwsgi > Exception Type: AttributeError Exception Value: > > 'ModelFormOptions' object has no attribute 'label' > Exception Location: /opt/virtualenvs/traceback/lib/python3.4/site-packages/django/forms/models.py in _get_foreign_key, line 1023