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

2017-01-28 Thread 'Peter Müller' via Django users
I do not think that "Each view is responsible for doing one of two things: Returning an > HttpResponse object containing the content for the requested page, or > raising an exception such as Http404. The rest is up to you." > is easy for a beginner to understand. Also the tutorial directly

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

2017-01-28 Thread Vijay Khemlani
> A quick one is e.g. that there is no explanation of what a view is and what > > its purpose is. "The code above maps URLs, as simple regular expressions, to the location of Python callback functions (“views”)" "Each view is responsible for doing one of two things: Returning an HttpResponse

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

2017-01-28 Thread 'Peter Müller' via Django users
If I could I would gladly rewrite the tutorial. But sadly I do not have enough time to do so. However I think it is bad since it not only completely disregards the zen of py but also its own principles (DRY etc.) If you need concrete examples I can name you tons. A quick one is e.g. that there

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

2017-01-27 Thread Melvyn Sopacua
https://github.com/django/django/pulls The tutorial has a very logical order, going from the database abstraction up to the template layer and beyond. But feel free to rewrite it and submit it to the project. I never follow tutorials to the letter - for example back when I did it in Django

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

2017-01-27 Thread 'Peter Müller' via Django users
What do you mean by PR? Am Freitag, 27. Januar 2017 18:32:23 UTC+1 schrieb Melvyn Sopacua: > > On Monday 16 January 2017 07:49:00 'Peter Müller' via Django users wrote: > > > > > Also I used the tutorial just that I abstracted the concept since I > > > think the tutorial is more than bad. > >

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

2017-01-27 Thread Melvyn Sopacua
On Monday 16 January 2017 07:49:00 'Peter Müller' via Django users wrote: > Also I used the tutorial just that I abstracted the concept since I > think the tutorial is more than bad. Awaiting your PRs. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google

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

2017-01-27 Thread 'Peter Müller' via Django users
But if I do a direct import via python's import statement. it will execute the content of the file before loading apps and that raises that error. No matter what you import you *have* to use django's import system. Also it just works fine now. Am Dienstag, 17. Januar 2017 23:05:10 UTC+1 schrieb

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

2017-01-17 Thread Vijay Khemlani
The only "custom include" in Django is for loading other url files The rest of the imports are typical Python module / packages On 1/17/17, 'Peter Müller' via Django users wrote: > Ah I now see the problem. However I tried to remove the entry in the > __init__.py

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

2017-01-17 Thread 'Peter Müller' via Django users
Ah I now see the problem. However I tried to remove the entry in the __init__.py file Python is then unable to find *any *module in that directory. Don't ask me why that is. Also I noticed that django has its completely own import ecosystem. So I used django.conf.urls.include to include a new

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: Am I stupid or is there an essential error in Django 1.10 Docs?

2017-01-16 Thread 'Peter Müller' via Django users
e views file. > > > > *From:* 'Peter Müller' via Django users [mailto:django...@googlegroups.com > ] > *Sent:* Monday, January 16, 2017 2:23 PM > *To:* Django users > *Subject:* Re: Am I stupid or is there an essential error in Django 1.10 > Docs? > > > > Well else

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

2017-01-16 Thread Matthew Pava
: Monday, January 16, 2017 2:23 PM To: Django users Subject: Re: Am I stupid or is there an essential error in Django 1.10 Docs? 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

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: 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

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

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

2017-01-15 Thread Mike Dewhirst
On 16/01/2017 5:01 AM, 'Peter Müller' via Django users 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 You don't need to create your own user

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

2017-01-15 Thread 'Peter Müller' via Django users
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 template with data from that model. To do this (according to Django 1.10