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

2017-05-02 Thread Alex Elson
I have "socket = new Websocket("ws:// ...", "socket.onopen," and "socket.send" commands in my Javascript code, and although the Javascript works, it seems to not be able to run these commands, or it is unable to access my functions in consumer.py, althought it works flawlessly if I run my proj

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

2017-05-02 Thread Alex Elson
Andrew, it doesn't seem to have fixed my problem. I type the following command, and am able to connect to my public ip, and although my page loads, only the frontend does anything. Channels does not work. $ daphne -b 0.0.0.0 firstproject.asgi:channel_layer 2017-05-03 06:11:51,196 INFO Starti

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

2017-05-02 Thread Antonis Christofides
Hi, Your server most probably can handle the load. It depends of course on how intensive the processing is. The kind of error you are getting (port 80 Hit EOF while fetching headers) suggests that the problem is not in Django but in Apache, or maybe you are hitting some operating system limit

How can I access obj in admin.py

2017-05-02 Thread Mike Dewhirst
I want to adjust inlines based on a property of the object. class SubstanceAdmin(admin.ModelAdmin): class SolidInline(admin.StackedInline): pass class LiquidInline(admin.StackedInline): pass class GasInline(admin.StackedInline): pass inlines = get_inlines

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

2017-05-02 Thread Andrew Godwin
Aha, it looks like your daphne instance is only listening on localhost: 2017-05-02 07:01:04,853 INFO Starting server attcp:port=8000:interface=127.0.0.1, channel layer firstproject.asgi:channel_layer. Try binding to all interfaces by passing -b 0.0.0.0 to Daphne when it starts. Andrew On

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

2017-05-02 Thread zhenwuhe0611
Thanks for your response. 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? thanks again. On Monday, May 1, 2017 at 11:06:39 PM UTC

pass context to overridden templates

2017-05-02 Thread cjdcordeiro
Hi guys, I'm using django-notification-hq, so my app's urls.py has: ... url(r'^inbox/', include(notifications.urls, namespace='notifications')), ... I've modified those default templates but I am unable to pass context to them. I found this: https://github.com/django-crispy-forms/django-

Django Channels, Nginx, Daphne - Not working?

2017-05-02 Thread Alex Elson
I am using Google Cloud to host my Django project, and I'm trying to run it with Nginx. I open two instances of the terminal, one with the command "python manage.py runworker" and the other with "daphne firstproject.asgi:channel_layer". I am able to connect to my public ip, and the page loads t

Re: Split an existing app up into multiple apps.

2017-05-02 Thread Derek
There is a post on SO which seems to address this: http://stackoverflow.com/questions/42059381/django-migrate-change-of-app-name-active-project Maybe try renaming before you split; but moving models to a new app should be the same kind of process as renaming. On Monday, 1 May 2017 17:15:07 UTC+

Re: Different models in child and Parent Templates

2017-05-02 Thread chuck . horowitz
So what would you like the ContactView to populate *into *the nav bar? Without a data model, there is nothing to render. Remember that {% include 'blog/navbar.html' %} will not access/render that "url", it will simply paste in the contents of that file(template) into the template before render

Python package to accept payments in Internet

2017-05-02 Thread Victor Porton
I have created a full featured package to accept payments in Internet (currently supports PayPal). It has especially great support for recurring payments. Here it is: http://freesoft.portonvictor.org/django-debits.xml I hope we with community work will turn it into an universal payment gateway

Re: Link to download

2017-05-02 Thread Antonis Christofides
> 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 arbitrary files. You /can/ get a file outside your project. Whether this is a bad thing or not depends on why and how. I also don't th

Re: Different models in child and Parent Templates

2017-05-02 Thread jithu s jacob
{% include 'blog/navbar.html' %} RECENT POSTS {%block content %} {% endblock%} class HomeView(ListView): template_name='blog/home.html' model=Blog class BlogView(DetailView): template_name='blog/blog.html' model=Blog class Contact

Re: Link to download

2017-05-02 Thread m712 - Developer
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 arbitrary files. What you should do instead is this: 1) Put Data/01/export.txt to the static/ folder inside your app (with the same folde

Re: Where is django-admin?

2017-05-02 Thread Pelle Pälsänger
Hi friends! It worked when I run $python django-admin.exe startproject mysite, not with django-admin.py. This is Windows 10.1. Python 3.6.1. BR. Stig Den torsdag 27 april 2017 kl. 15:22:13 UTC+2 skrev Pelle Pälsänger: > > Hi! > > I try to learn how to create web apps with django on windows10.

Re: Where is django-admin?

2017-05-02 Thread Pelle Pälsänger
Den torsdag 27 april 2017 kl. 15:22:13 UTC+2 skrev Pelle Pälsänger: > > Hi! > > I try to learn how to create web apps with django on windows10. > I have downloaded django1.11 ($git clone > https://github.com/django/django.git) and installed it ($py -m pip > install Django==1.11). > I follow >

Re: django-select2-forms

2017-05-02 Thread Dartos
Hi, Do you have "import select2" in models.py? Dartos On Tuesday, May 2, 2017 at 6:16:47 AM UTC-4, shahab emami wrote: > > hello > > I want to use django-select2-forms in my project . this package is here: > https://pypi.python.org/pypi/django-select2-forms/2.0.1 > > I followed the exact instruc

Re: Link to download

2017-05-02 Thread Sixtine Vernhes
This is in development. I try to send url of my file in views.py : return render(request, "export.html", {'out': urlOut}) and in my template I have the link : Lien du fichier but when I open it I have this link : http://127.0.0.1:8000/home/myuser/Data/01/export.txt and I want to hav

Re: Link to download

2017-05-02 Thread Antonis Christofides
Is this in production or development? What is the url that doesn't work? What happens when you try the url? Regards, A. Antonis Christofides http://djangodeployment.com On 2017-05-02 11:28, Sixtine Vernhes wrote: > Hi ! > > I try to create a link on Django who download a static csv file, but I

Re: Configurar Supervisor + Gunicorn + Nginx

2017-05-02 Thread Simon McConnell
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 On Tuesday, 2 May 2017 20:34:31 UTC+10, Ariel Gavegno wrote: > > Buenas, necesito saber como configurar Supervisor en un servidor Ubuntu, > de un proyecto Django 1.11. > Un

Link to download

2017-05-02 Thread Sixtine Vernhes
Hi ! I try to create a link on Django who download a static csv file, but I have no idea how to do. In my settings.py : STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static/"), ) and my file is in this directory Would anyone have an idea ? -- You received this

Configurar Supervisor + Gunicorn + Nginx

2017-05-02 Thread Ariel Gavegno
Buenas, necesito saber como configurar Supervisor en un servidor Ubuntu, de un proyecto Django 1.11. Un ejemplo sería de mucha ayuda. -- 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

django-select2-forms

2017-05-02 Thread shahab emami
hello I want to use django-select2-forms in my project . this package is here: https://pypi.python.org/pypi/django-select2-forms/2.0.1 I followed the exact instructions but It does not install here is things I did: 1: pip install django-select2-forms I can see select2 has been ins

Re: Generating HDF5 and downloading

2017-05-02 Thread Michal Petrucha
On Fri, Apr 28, 2017 at 03:38:36PM -0700, avill...@ucsc.edu wrote: > Hi everybody, > > I've successfully gotten a web app that takes user data, uses that to make > a query, and the outputs a CSV file. However, what I'd really like is to > output an HDF5 file. I googled around and there doesn't

Re: Django Sass verwenden

2017-05-02 Thread Andréas Kühne
Hi, Sorry my german is very rusty - but it looks like you need something to compile your sass files to css. Checkout this project for an example: https://github.com/andreyfedoseev/django-static-precompiler I use PyCharm as my IDE and it includes automatic conversion from scss files to css - so I