Re: Django MongoEngine rest api app post request.POST.get('id')

2016-09-28 Thread Peter of the Norse
Are you doing request.POST.get(’taxi_id’) here? Because that will return a string. And in that case, id would be each letter in the actual ID. Try switching it to request.POST.getlist(’taxi_id’). > On Sep 27, 2016, at 9:43 AM, samer sarker wrote: > > for id in taxi_id: > taxi = Tax

Cache-Control header for Flat Pages

2016-09-28 Thread Web Architect
Hi, We are using Django Flat pages for some static pages like About us, privacy policy etc. We are using Web Accelerator (like Varnish) in front of Django. Hence, would like to set the Cache-Control Header to cache the flat pages. I am not able to figure how to do that for flat pages. Tried us

Re: Django modelform not saving foreignkey

2016-09-28 Thread Jonty Needham
Ignore this. Field was in excluded_fields which I thought only stopped the display of fields, but actually stops the data from that field getting into the model. On Wed, Sep 28, 2016 at 4:59 PM, Jonty Needham wrote: > I have the following code which is supposed to create a MyConfig object. > Ho

Django modelform not saving foreignkey

2016-09-28 Thread Jonty Needham
I have the following code which is supposed to create a MyConfig object. However, it doesn't as the app_model is always returned as None. The idea is to choose from a select few contenttypes and then add a key, and the resulting config will trigger a bunch of services. However whenever I save the

Re: django server

2016-09-28 Thread Sergiy Khohlov
please send output of python manage.py run server Many thanks, Serge +380 636150445 skype: skhohlov On Wed, Sep 28, 2016 at 5:06 PM, NOOREEN wrote: > Problem in launching django server in ubuntu 14.04.How to resolve the > given issue? > > -- > You received this message because you are subscr

Re: Django MongoEngine rest api app post request.POST.get('id')

2016-09-28 Thread Armando Licurgo
observ this: .objects(id=id). Armando Licurgo 2016-09-27 12:43 GMT-03:00 samer sarker : > for id in taxi_id: > taxi = TaxiMaster.objects(id=id).first() > > temp = BookedTaxi( > taxi_id=id, > driver_id=taxi.user_id, > is_seen=0, >