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', '[0-9a-fA-F]+')`

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" wrote: > Hi :). > > Ye

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 co

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 s

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` > instance,

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 >

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 th

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 likel

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 wor

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. Lookin

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 would