Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Marc Tamlyn
Fwiw, I spent a little time investigating this a couple of years ago. I would like to see Django officially bless the idea of alternative URL systems, and provide the "full" regex system and preferably at least one "simple" system - even if all that system supports is integers and slugs. This

Re: Working towards a simpler GCBV implementation?

2016-09-15 Thread Asif Saifuddin
Hi Tom, I am basically +1 to see this change in the django core. The package is 3 years old and should be tested enough. If you/other core team members thinks that now is a good time to include it to core and deprecation of older API, then I will be willing to work and send PR for this.

Re: missing feature, View permission for django admin

2016-09-15 Thread Olivier Dalang
Dear List, In the meantime, there are two failing builds (default and windows) for the PR . I can't see what the error is because the links to the build output is a 404 and I wasn't able to setup a

Re: Feature request: Generate module docstrings from startproject and startapp actions

2016-09-15 Thread Aymeric Augustin
Hello Matthew, I understand the suggestion, however, I’m afraid it priorizes the needs of the wrong audience. Experienced developers or teams who care about docstrings and pylint can use a custom project template for this use case. Conversely, newcomers who are still learning Django would

Feature request: Generate module docstrings from startproject and startapp actions

2016-09-15 Thread Matthew Laney
Hi, Going through my code with pylint, I found that there is no way to filter by the type of missing docstring. I.e. missing-docstring catches functions, classes, methods, and modules. As a result, it gives a warning on for every default Django file. Accordingly, I would like to suggest that

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Sjoerd Job Postmus
On Thursday, September 15, 2016 at 10:38:09 AM UTC+2, Michal Petrucha wrote: > > > As cool as this idea sounds, I really don't think the URL dispatcher > is a correct component to make database queries. FWIW, I've seen > similar magic implemented in view decorators, and the thing I remember >

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Michal Petrucha
On Thu, Sep 15, 2016 at 12:56:16AM -0700, Sjoerd Job Postmus wrote: > I'm not sure if I agree. > > On the one hand I would like to say: > > "I agree. For instance, if the type is `hex`, it would be really weird if > it were to be cast to an int. For `uuid`, would you expect a `UUID` >

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Florian Apolloner
On Thursday, September 15, 2016 at 8:28:07 AM UTC+2, Emil Stenström wrote: > > Tim Graham: Does this change your view that this should be done outside of > core? Do you buy the argument that beginners are unlikely to install third > party packages when learning django? > Imo it should still

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Sjoerd Job Postmus
I'm not sure if I agree. On the one hand I would like to say: "I agree. For instance, if the type is `hex`, it would be really weird if it were to be cast to an int. For `uuid`, would you expect a `UUID` instance, or just a string?" but alternatively, ... "Wouldn't it be really cool if you

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Anthony King
In my opinion, it should remain a string. That's the behaviour it is now, and it'll mean it can remain as a 3rd party package. Perhaps to show it isn't being cast, it could be renamed to "integer", which would avoid confusion On 15 Sep 2016 8:03 a.m., "Sjoerd Job Postmus"

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Sjoerd Job Postmus
Hi :). Yes, I also added the other syntax yesterday evening, so the syntax is now fully supported. (But it does not yield an int!!). Currently only `'int'` is registered as a valid type, with the regex r'[0-9]+'. More can be registered using `django_simple_url.register('hex',

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Emil Stenström
On Tuesday, 13 September 2016 21:54:49 UTC+2, ludovic coues wrote: > > There is third party module providing third party url function. Surlex > [1] have been mentionned. But any third party solution will need to > provide function compatible with django.conf.urls.url. > Line 64 of

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Emil Stenström
See Sjoerd's code in a later reply to this thread, let's start experimenting there. /E On Tuesday, 13 September 2016 22:17:34 UTC+2, Ares Ou wrote: > > Emil, > > Please count me in if you'd like to start a new DEP. I'm also > very interested to take this new challenge. And maybe we > should

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Emil Stenström
Great initiative! I really think you should use the flask syntax instead of the rails one that I first suggested. Seems this is the consensus from this thread, and that makes it more likely to get it to core one day. /Emil On Wednesday, 14 September 2016 11:02:23 UTC+2, Sjoerd Job Postmus