Re: Django runserver, the header doesn't contain connection:keep-alive

2016-12-01 Thread emepe
On Thursday, December 1, 2016 at 6:42:38 AM UTC-3, 韦然 wrote: > > Dear all, > > The current header is: > > HTTP/1.0 200 OK > > Date: Thu, 01 Dec 2016 08:33:29 GMT > > Server: WSGIServer/0.1 Python/2.7.12 > > X-Frame-Options: SAMEORIGIN > > Content-Type: text/xml > > > The docs states clearly that

Re: Django runserver, the header doesn't contain connection:keep-alive

2016-12-01 Thread 韦然
Thanks. I will try other production servers. 在 2016年12月1日星期四 UTC+8下午9:32:09,emepe写道: > > On Thursday, December 1, 2016 at 6:42:38 AM UTC-3, 韦然 wrote: >> >> Dear all, >> >> The current header is: >> >> HTTP/1.0 200 OK >> >> Date: Thu, 01 Dec 2016 08:33:29 GMT >> >> Server: WSGIServer/0.1

Re: GeoDjango with Docker

2016-12-01 Thread Jani Tiainen
Hi, Basically what you need is to pick base distro you want to use. Installing PostGIS package usually brings in all the spatial libs Django expects so you're covered by that part. The rest is just putting Django served from your container. So there is not much stuff involved. On

Re: GeoDjango with Docker

2016-12-01 Thread Dan Tagg
Cookie cutter is pretty awesome. Don't know whether it works with GeoDjango though. https://github.com/pydanny/cookiecutter-django Dan On 1 December 2016 at 13:32, hunter.cur...@gmail.com < hunter.cur...@gmail.com> wrote: > Hi Tadeo, I've recently gone through this exercise myself, and

Re: makemigrations generates new migration when nothing has changed

2016-12-01 Thread Bruno A.
I've seen that happening when calling a callable as one of the keyword argument rather than passing the callable itself. Typical example: class TimeFramedModel(models.Model): created = models.DateTimeField(default=timezone.now*()*) Instead of: class TimeFramedModel(models.Model):

Re: GeoDjango with Docker

2016-12-01 Thread hunter.cur...@gmail.com
Hi Tadeo, I've recently gone through this exercise myself, and documented my progress in three posts: https://geoanalytic.github.io/a-production-ready-web-mapping-toolkit-part-1/ https://geoanalytic.github.io/a-production-ready-web-mapping-toolkit-part-2/

Re: GeoDjango with Docker

2016-12-01 Thread Reza Shalbafzadeh
Hi Tadeo GeoDjango is very similar to Django and you can modify existing Django dockerfiles to build your own images have a look at this links realpython django docker example postgis django dockerfile

Re: Initial data with migrations vs fixtures

2016-12-01 Thread Tim Graham
Calling loaddata in a migration will work until you modify the model's fields. You can read more on Trac: https://code.djangoproject.com/ticket/24778 On Thursday, December 1, 2016 at 12:09:49 PM UTC-5, Tom Evans wrote: > > Hi all > > We're moving a project over to the latest release (well,

Re: GeoDjango with Docker

2016-12-01 Thread Tadeo C
Wow! Your posts looks amazingly detailed and comprehensive. I'm going to follow them careful. I can use Ubuntu for the meanwhile, no problem. Thank you very much for sharing this worthy material! On Thursday, December 1, 2016 at 12:52:52 PM UTC-3, hunter...@gmail.com wrote: > > Hi Tadeo, I've

Re: GeoDjango + PostGIS Docker Stack

2016-12-01 Thread Tadeo C
I'm sorry I reposted this question because I could not find the previous one. Thanks for the answers! On Thursday, December 1, 2016 at 2:41:06 PM UTC-3, Tadeo C wrote: > > Hi, I'm trying to setup a stack of Docker containers (GeoDjango + PostGIS > + Nginx) to develop a GeoDjango application,

inline parent value

2016-12-01 Thread Roberto Russi
hi, I have 3 models: class Orders(models.Model): brand = models.ForeignKey( Brands, verbose_name = "Brand", null=True, blank=True, related_name="ord_brand" ) dateord = models.DateField("Date") numbord =

Inline master

2016-12-01 Thread Roberto Russi
I have 3 models: class Products(models.Model): brand = models.ForeignKey( Brands, verbose_name = "Brand", ) code = models.CharField("Code", max_length=25, ) descr = models.CharField("Description",

Initial data with migrations vs fixtures

2016-12-01 Thread 'Tom Evans' via Django users
Hi all We're moving a project over to the latest release (well, we're at 1.7 now, but that's the end goal anyway) and replacing South migrations with Django migrations. It looks like that fixtures are no longer thought of as the correct way of providing initial data. Is this because

Re: wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-01 Thread Daniel Roseman
On Thursday, 1 December 2016 13:16:07 UTC, NoviceSortOf wrote: > > > > Hi All, > > After hours of looking for solutions, here on Stackoverflow, GitHub, > Django site and other forums, > and seeing that at least 2 other posts related to what per web chatter > appears to be a known > bug in Django

Questions about templates from a novice - Question #1

2016-12-01 Thread jim_anderson
Hi, A few intro words first. I am an experienced programmer and worked on a few python projects for maybe 3 years around 2000. Most of my other programming has been in c, c++, and java - maybe too many years. My current project is a web based project using Python 3.5.2 and Django 1.9.7. I

Channels, Websockets and 'Backpressure'

2016-12-01 Thread hanks...@gmail.com
Can someone help me understand the concept of websocket “backpressure” in a Django Channels project? What is it? How do diagnose it? At what level of the stack does it occur? How do I cure it? The docs are a little hazy on this. I wired up a quick Channels project for my mid-sized website.

Re: Questions about templates from a novice - Question #1

2016-12-01 Thread Dan Tagg
Hi Jim, I would really recommend looking at https://ccbv.co.uk/projects/Django/1.9/ There are diagrams to show the hierarchy of inheritance and mixins, plus all the properties and methods are there to see and explore. The place to start is the dispatch method, as_view is called first but you

Re: Channels, Websockets and 'Backpressure'

2016-12-01 Thread Andrew Godwin
"Backpressure" is designed exactly for what you describe, which is when clients are making requests of the server faster than you can handle them. Each channel has a maximum capacity of messages (100 by default), beyond which trying to add a new one results in an error. Webservers, when they see

Re: Channels, Websockets and 'Backpressure'

2016-12-01 Thread Andrew Godwin
On Thu, Dec 1, 2016 at 12:48 PM, Hank Sims wrote: > Thanks, Andrew. A few follow-up questions: > > 1. How would one go about increasing the default maximum queue size? I saw > some reference to this when I was researching the problem yesterday, but I > couldn't find the

Re: Channels, Websockets and 'Backpressure'

2016-12-01 Thread Hank Sims
Thanks, Andrew. A few follow-up questions: 1. How would one go about increasing the default maximum queue size? I saw some reference to this when I was researching the problem yesterday, but I couldn't find the setting that would change it. 2. Shouldn't there be a way to resolve the

Re: Channels, Websockets and 'Backpressure'

2016-12-01 Thread Hank Sims
> > You set it in the channel layer configuration in Django, like this: > https://github.com/django/asgi_redis/#usage > Ah, thank you. Sorry I missed that. > How would you propose this worked? The only alternative to closing the > socket is to buffer the messages in memory and retry sending

[ANNOUNCE] Django bugfix releases issued: 1.10.4, 1.9.12, and 1.8.17

2016-12-01 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2016/dec/01/bugfix-releases/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an

GeoDjango + PostGIS Docker Stack

2016-12-01 Thread Tadeo C
Hi, I'm trying to setup a stack of Docker containers (GeoDjango + PostGIS + Nginx) to develop a GeoDjango application, preferably Alpine based. I can't find a docker-compose.yml fille nor images that allows me to get the three containers up and running. Does anyone has experience with this?

Re: Channels, Websockets and 'Backpressure'

2016-12-01 Thread Andrew Godwin
On Thu, Dec 1, 2016 at 1:03 PM, Hank Sims wrote: > You set it in the channel layer configuration in Django, like this: >> https://github.com/django/asgi_redis/#usage >> > > Ah, thank you. Sorry I missed that. > > >> How would you propose this worked? The only alternative to

Re: How does django pass data through post?

2016-12-01 Thread Jordan W
Daniel, you nailed it! I didn't have the name specified. Adding that makes it propagate through! On Monday, November 28, 2016 at 6:34:19 PM UTC-6, Jordan W wrote: > > Hi, > > I have been working on a small project for myself and some friends, and I > seem to have hit a hitch in getting it to

Django runserver, the header doesn't contain connection:keep-alive

2016-12-01 Thread 韦然
Dear all, The current header is: HTTP/1.0 200 OK Date: Thu, 01 Dec 2016 08:33:29 GMT Server: WSGIServer/0.1 Python/2.7.12 X-Frame-Options: SAMEORIGIN Content-Type: text/xml And the process code is : from django.shortcuts import render from django.http import HttpResponse import

Re: Django runserver, the header doesn't contain connection:keep-alive

2016-12-01 Thread Avraham Serour
Don't use runserver fur production, use nginx with uwsgi On Dec 1, 2016 11:42 AM, "韦然" wrote: > Dear all, > > The current header is: > > HTTP/1.0 200 OK > > Date: Thu, 01 Dec 2016 08:33:29 GMT > > Server: WSGIServer/0.1 Python/2.7.12 > > X-Frame-Options: SAMEORIGIN > >

wsgiref - When does the complexity of question require posting to the Developers or other forums?

2016-12-01 Thread NoviceSortOf
Hi All, After hours of looking for solutions, here on Stackoverflow, GitHub, Django site and other forums, and seeing that at least 2 other posts related to what per web chatter appears to be a known bug in Django and the WSGI package, I'm wondering where to turn for useful advice regarding