Re: Django Channels, Nginx, Daphne - Not working?

2017-05-03 Thread Andrew Godwin
Well, if daphne is serving you webpages, then the channel layer is working fine (everything goes over it, including HTTP). However, if you are just using Daphne for websockets, then it may not be working at all - which is the case? And are the worker and daphne processes running on the same machine

Re: How can I access obj in admin.py

2017-05-03 Thread Stephen J. Butler
You want to override get_inline_instances: https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_inline_instances On Wed, May 3, 2017 at 12:33 AM, Mike Dewhirst wrote: > I want to adjust inlines based on a property of the object. > > class SubstanceAdmin(a

Re: port 80 **** Hit EOF while fetching headers

2017-05-03 Thread James Schneider
Our server has 24 Cores and 192G memory, should be big enough to handle this kind of load? BTW, one more thing I want to mention is that we are using host based docker, possible any config or limitation there? While I'm not familiar with your particular error, it's possible that your problem is i

Django with generic odbc database

2017-05-03 Thread Diego Gazzo
Good morning, In the Company i'm working on, we are currently using an Enterprise database called ADABAS (Software AG product). This database expose a standard ODBC interface. My question: is there a way to call a generic odbc database from django? We found the django-pyodbc but seem to be availa

Django authentication security check against LDAP

2017-05-03 Thread Uzair Tariq
While studying the Authentication Views in Django I came across some of the build in views including password reset view. I got hang of its basic working mechanism while reading the documentation I encountered the line promoting the use of *set_unusable_password()* in Djagno authentication agai

Re: Django with generic odbc database

2017-05-03 Thread Jani Tiainen
As long as there exists Python DB-API for your database (maybe there is some generic odbc driver) you can use it. Of course you won't be able to use Django ORM with it. On 03.05.2017 11:18, Diego Gazzo wrote: Good morning, In the Company i'm working on, we are currently using an Enterprise d

Re: Link to download

2017-05-03 Thread Sixtine Vernhes
It's work with the use of media :) Thanks for the help ! Le mardi 2 mai 2017 18:13:01 UTC+2, Antonis Christofides a écrit : > > You cannot get a file outside of your project unless you symlink it inside > the project. This is also a Very Bad Thing(TM) as it may allow attackers to > request arb

Re: pass context to overridden templates

2017-05-03 Thread cjdcordeiro
Probably the best would be overriding the app's default class based view, but when I look at it (https://github.com/django-notifications/django-notifications/blob/master/notifications/views.py#L29) it doesn't have a get_context method or anything I can play with to change the default context..

how to include template

2017-05-03 Thread Thiago Luiz Parolin
I have a project that has a folder structure like this: Project1 / --Templates / Base.html Error.html --App1 Templates / --App1 / App1.html How can i include error.html in app1.html? I am trying using {% include

Re: how to include template

2017-05-03 Thread Dartos
Hi, You need to set the template directories option in your project's settings file. See here: https://docs.djangoproject.com/en/1.11/topics/templates/#configuration There's an example in the above link: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates',

Re: Django Channels, Nginx, Daphne - Not working?

2017-05-03 Thread Alex Elson
I am trying to only use Daphne for websockets I believe, following the deployment tutorial in the Channel documentation. And yes I am running both processes on the same machine. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Django Channels, Nginx, Daphne - Not working?

2017-05-03 Thread Alex Elson
Here is my nginx default configuration if that could be it. server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; charset utf-8; index index.html index.htm index.nginx-debian.html; server_name _; location /

Re: Django with generic odbc database

2017-05-03 Thread JHeasly
I've had a good experience with the mxODBC Django Database Engine . (The web page says you can use the ORM, but elsewhere it clarifies that's only if you're using MS SQL Server 2005, 2008 and 2012.) But as Jani says, you do have to do all the

Re: how to include template

2017-05-03 Thread Thiago Luiz Parolin
Thank you... All is working now i was seeing in the wrong page of documentation.. 2017-05-03 12:01 GMT-03:00 Dartos : > Hi, > > You need to set the template directories option in your project's settings > file. > > See here: > https://docs.djangoproject.com/en/1.11/topics/templates/#configur

Re: Link to download

2017-05-03 Thread Tim Chase
On 2017-05-02 19:11, Antonis Christofides wrote: > response = HttpResponse(csvfile.read(), content_type='text/csv') Beware that, if your content can get huge (some of our reports can run to hundreds of megabytes), you might want to investigate something like the "sendfile" alternatives or spew it

Re: Link to download

2017-05-03 Thread Dan Tagg
You might want to check out WhiteNoise ( https://whitenoise.readthedocs.io/en/stable/) perhaps in conjunction with a CDN On 3 May 2017 at 19:35, Tim Chase wrote: > On 2017-05-02 19:11, Antonis Christofides wrote: > > response = HttpResponse(csvfile.read(), content_type='text/csv') > > Beware tha

[Channels] Recommended quantity of workers

2017-05-03 Thread Renato Oliveira
Hi Is there any recommendation on how many `runworker` processes should we run on production? I'm having many 403 responses on frontend and ChannelFull on backend. Saw here on the mailing list that adding new workers might help. Indeed it helped, tested already with 10 for now, but would like to

Re: [Channels] Recommended quantity of workers

2017-05-03 Thread Andrew Godwin
The number you need depends on the kind of site you have and the type of traffic - much like "how many WSGI servers should I run?" there is no right answer. You'll need to look at how different numbers of workers affect your median response times and number of timeouts and adjust appropriately. Th

Re: [Channels] Recommended quantity of workers

2017-05-03 Thread Renato Oliveira
Andrew* Renato Oliveira Co-founder & Software Engineer +55 81 987855061 www.labcodes.com.br On Wed, May 3, 2017 at 5:09 PM, Renato Oliveira < renatooliveira@gmail.com> wrote: > Thanks Andrews! > > Also thanks for your hard work on channels! Awesome piece of software. > > > > > > Renato

Re: [Channels] Recommended quantity of workers

2017-05-03 Thread Renato Oliveira
Thanks Andrews! Also thanks for your hard work on channels! Awesome piece of software. Renato Oliveira Co-founder & Software Engineer +55 81 987855061 www.labcodes.com.br On Wed, May 3, 2017 at 5:06 PM, Andrew Godwin wrote: > The number you need depends on the kind of site you have and

Re: [Channels] Recommended quantity of workers

2017-05-03 Thread James Schneider
Is there any recommendation on how many `runworker` processes should we run on production? There is no real guideline to provide. The "correct" number is a function of hardware, traffic, and the amount of processing needed to fulfill requests. That number may change over time as the app is furthe

Re: Error was: cannot import name 'GDALRaster in Window 8.1

2017-05-03 Thread Prashant Verma
Hey Mate, I am trying to get over by this error. Although, It's little complicated to work in the windows environment. By the way, I am trying to follow this process https://libregis.org/2011/03/10/how-to-install-and-configure-postgis-raster-on-windows/, however, I am stuck at the raster2pgs

Re: How can I access obj in admin.py

2017-05-03 Thread Mike Dewhirst
On 3/05/2017 5:12 PM, Stephen J. Butler wrote: You want to override get_inline_instances: https://docs.djangoproject.com/en/1.11/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_inline_instances Many thanks Stephen - works nicely. And thanks again to all you Django devs :) M On Wed, M

Re: port 80 **** Hit EOF while fetching headers

2017-05-03 Thread zhenwuhe0611
Thanks James for your help. Yeah, you are right, Python is not multi-thread supported, but, I felt it should be thread safe in this scenario. I did further dig and found error message in apache error log showing [mpm_event:error] [pid 36398:tid 139973512394496] AH00485: scoreboard is full, not

Django project similar to "Upwork"

2017-05-03 Thread Wilfred Gutierrez
Hi all, I have to develop in Django a web application similar to "Freelancer" or "Upwork" to be used in my region, please could you recommend some packages or apps that help me to make my project faster and / or give me help on this topic . Thanks in advance. -- You received this message b