Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread Michal Petrucha
On Mon, Jan 16, 2017 at 12:23:09PM -0800, 'Peter Müller' via Django users wrote: > Am Montag, 16. Januar 2017 21:20:53 UTC+1 schrieb Daniel Roseman: > > The traceback shows that you are importing your views module in the > > __init__.py of your app. Don't do that. > > Well else python doesn't

Re: Odd problem: some database updates do not appear on other pages until server restart

2017-01-16 Thread Fred Stluka
Bob, On 8/19/16 8:02 AM, bobhaugen wrote: > On Friday, August 19, 2016 at 5:20:45 AM UTC-5, Michal Petrucha wrote: > > Moving the call to with_user to form.__init__ solved the problem in the form ModelChoiceField. > > These questions remain

Re: Django Channels: send message on Group from worker process

2017-01-16 Thread Andrew Godwin
Hi Joren, This is a deliberate design decision; consumers (the things you have in views.py) are meant to not block and return immediately. Any blocking action, including delaying, needs to be done outside of the consumer and then send a message to invoke the next logic needed. This is because

Re: Experimenting with Channels: sending messages from Django shell doesn't work

2017-01-16 Thread Andrew Godwin
Hi Joshua, This was actually a bug that was fixed in 1.0.2 - were you on an older version? If not, I'd like to make sure the bug didn't somehow reappear! Andrew On Mon, Jan 16, 2017 at 10:00 AM, Joshua Gardner wrote: > I'm going to answer my own question: > > Appears that

Re: Projects vs. apps

2017-01-16 Thread Mike Dewhirst
On 17/01/2017 9:44 AM, Thufir Hawat wrote: Not sure that I follow: What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and

Re: Channels - Unable to use redis as sharded cluster

2017-01-16 Thread Andrew Godwin
Hi Dadaso, You also opened this as a ticket on GitHub at https://github.com/django/channels/issues/485; I'll answer it there. Andrew On Mon, Jan 16, 2017 at 2:42 AM, Dadaso Zanzane < dadaso.zanz...@cuelogic.co.in> wrote: > Hi, > > I am using django channels for production. > > I have

Projects vs. apps

2017-01-16 Thread Thufir Hawat
Not sure that I follow: What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and apps for a particular website. A project can

Re: Need help with a school project

2017-01-16 Thread Ryan Nowakowski
On Sat, Jan 14, 2017 at 04:10:09PM -0800, Grant Holman wrote: > I need help starting a django project for a school project. I am brand new > to Django but have some experience with Python. > > I need to design web application where inputs are put onto a screen and > then inputted into a

Django Channels: send message on Group from worker process

2017-01-16 Thread Joren Inghelbrecht
Hi everyone, The idea is to run a background task on the worker.connect worker. While executing the task, I would like to send its progress to a connected client via the notifications Group. The problem: the messages sent to the notifications Group are delayed until the task on the worker

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread 'Peter Müller' via Django users
Yes Am Montag, 16. Januar 2017 22:33:57 UTC+1 schrieb Matthew Pava: > > You import views in your urls.py file. Your settings.py file has a > constant pointing to where the urls.py file is located for the project. > Your urls.py file is the one that actually utilizes the views file. > > > >

RE: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread Matthew Pava
You import views in your urls.py file. Your settings.py file has a constant pointing to where the urls.py file is located for the project. Your urls.py file is the one that actually utilizes the views file. From: 'Peter Müller' via Django users [mailto:django-users@googlegroups.com] Sent:

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread 'Peter Müller' via Django users
Stranvr ist the project made with startproject and db_testing is an app made with startapp. So: ProjectRoot -StranvrProject --urls.py --settings.py --wsgi.py -db_testing --views.py --__init__.py --models.py --admin.py --apps.py also the app is added to settings.py Am Montag, 16. Januar 2017

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread Andreas Kuhne
What does the project structure look like? Is Stranvr the name of the project? It looks to me like you haven't created an app - or have you called your app "db_testing" and the project "Stranvr"? Because you first have to create you project with "django-admin.py startproject " and then within

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread 'Peter Müller' via Django users
Well else python doesn't find the view.py file? Am Montag, 16. Januar 2017 21:20:53 UTC+1 schrieb Daniel Roseman: > > On Monday, 16 January 2017 15:53:56 UTC, Peter Müller wrote: >> >> For the traceback: http://pastebin.com/Wy7And6M >> And the views configuration: http://pastebin.com/q0V3bQay >>

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread Daniel Roseman
On Monday, 16 January 2017 15:53:56 UTC, Peter Müller wrote: > > For the traceback: http://pastebin.com/Wy7And6M > And the views configuration: http://pastebin.com/q0V3bQay > > > thanks > > Peter > The traceback shows that you are importing your views module in the __init__.py of your app.

Re: Experimenting with Channels: sending messages from Django shell doesn't work

2017-01-16 Thread Joshua Gardner
I'm going to answer my own question: Appears that I need to use the "immediately" keyword are to Channel or Group.send. On Monday, January 16, 2017 at 5:27:19 AM UTC-7, Joshua Gardner wrote: > > I'm in the process of developing a Websockets notifications system using > Channels. I've got a

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread 'Peter Müller' via Django users
For the traceback: http://pastebin.com/Wy7And6M And the views configuration: http://pastebin.com/q0V3bQay thanks Peter Am Montag, 16. Januar 2017 15:53:42 UTC+1 schrieb Daniel Roseman: > > On Sunday, 15 January 2017 18:03:54 UTC, Peter Müller wrote: >> >> Hello everybody. >> >> >> I just

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread 'Peter Müller' via Django users
Thank you for your help. Even though I understand the obvious reason to use the in-built User model I prefer to make one myself. Not because the integrated one is bad. It is just that it adds huge amounts of boilerplate and hidden django magic. And since users are basically just a name and an

Master-Detail Form help needed

2017-01-16 Thread jon
I have been struggling mightily with Master-Detail forms in Django. I have done a number of online tutorials but have yet to find a complete tutorial which completely explains models, views, templates, URL patterns related to master-detail forms. I use the Oracle toolsets where creating a

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread Daniel Roseman
On Sunday, 15 January 2017 18:03:54 UTC, Peter Müller wrote: > > Hello everybody. > > > I just began learning how to use django. So I wanted to include data from > the database in a testwebsite. > Therefore I made a new app and created a model called "user" and a view > that should fill a

Channels - Unable to use redis as sharded cluster

2017-01-16 Thread Dadaso Zanzane
Hi, I am using django channels for production. I have configured redis on AWS Elastic-cache as sharded cluster. File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py" , line 354, in execute_from_command_line utility.execute() File

Experimenting with Channels: sending messages from Django shell doesn't work

2017-01-16 Thread Joshua Gardner
I'm in the process of developing a Websockets notifications system using Channels. I've got a JsonWebsocketConsumer that adds the connection to a group for the Location (model) that the user belongs to. Connecting to that websocket with wscat, and trying to see if sending to that group works, I

Re: JS static file is not accessible in Django

2017-01-16 Thread anjalimk68
Hi Hashmi, I tried debugger tools which you mentioned. under js of console nothing is showing up it's empty. Please let me know how we can resolve this. On Wednesday, January 11, 2017 at 1:30:32 PM UTC+5:30, M Hashmi wrote: > RIght click on the page when local server is running and click