Re: Challenge teaching Django to beginners: urls.py

2016-09-14 Thread Florian Apolloner
Hi Emil,

On Tuesday, September 13, 2016 at 9:50:22 PM UTC+2, Emil Stenström wrote:
>
> and more experienced users are expected to switch over to using regexes 
> directly to get the exact behavior they want. 
>

How so? Personally I would use this quite quickly since a few builtin types 
would cover 99%. While I can write regex in sleep nowadays, I still find it 
kinda tedious to redefine what "slug" means in every URL I wanna match 
something… I am sure others think the same.
 

> Beginners likely won't look at all the different options and choose one 
> based on it's merits, they'll pick whatever their teacher suggests they 
> use. Also installing an extra package when setting up django feels a bit 
> strange.
>

I think the eco system is far enough to support that, after all south lived 
long and well as external package. Either way, DEP or not, having an 
implementation out there would definitely help.

Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6ea6cd5d-8870-4596-852d-e3b59110af8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Challenge teaching Django to beginners: urls.py

2016-09-14 Thread sjoerdjob
Hi all,

Since it seemed like an interesting idea to me, I started development of a 
third-party plugin.

It's currently at:
https://github.com/sjoerdjob/django-simple-url

Since I only started today, I have no readme/setup.py yet. Will come later 
this week I hope.

Current usage is

from django_simple_url import simple_url

urlpatterns = [
simple_url('hello/world/', hello_world_view),
simple_url(':year/:month/', posts_for_month_view),
]

It works proper with includes (not adding a $ to the URL), and leaf views 
(adding a $ to the URL).

Maybe this week, or early next week I will also add support for the 
'' syntax.

Kind regards,
Sjoerd Job

On Tuesday, September 13, 2016 at 9:40:47 PM UTC+2, Tim Graham wrote:
>
> I would like to see if this could be done as a third-party project (allow 
> "pluggable URLs" which could use any syntax). If not, then let's accept a 
> patch to Django to support it. Over time, if there's some strong consensus 
> about a particular third-party package, then we could bring it in to core. 
> I think this approach is less controversial then Django adopting some new, 
> untested syntax right now.
>
> On Tuesday, September 13, 2016 at 3:33:25 PM UTC-4, Emil Stenström wrote:
>>
>> So it looks to me that the consensus is that this IS in fact a good idea, 
>> to supply a simpler, regex-free method to define URL:s. 
>>
>> It also seems that the best liked version is something that's similar to 
>> what flask uses: /articles///.
>>
>> I've never written a DEP before, but it sounds like a fun challenge. I'll 
>> try to look at existing DEPs for a pattern and then apply that.
>>
>> Does anyone have something in particular that they would like to add to 
>> the DEP? I figure I'll try to keep this first version as simple as 
>> possible, while maintaining extension points for features that can be added 
>> later on.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b8eb67eb-a8d6-4d29-ba2f-7886c61b9773%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Channels Load Testing Results

2016-09-14 Thread Chris Foresman
Yes. Honestly, just explain what these results mean in words, because I 
cannot turn these graphs into anything meaningful on my own.



On Monday, September 12, 2016 at 8:41:05 PM UTC-5, Robert Roskam wrote:
>
> Hey Chris,
>
> The goal of these tests is to see how channels performs with normal HTTP 
> traffic under heavy load with a control. In order to compare accurately, I 
> tried to eliminate variances as much as possible. 
>
> So yes, there was one worker for both Redis and IPC setups. I provided the 
> supervisor configs, as I figured those would be helpful in describing 
> exactly what commands were run on each system.
>
> Does that help bring some context? Or would you like for me to elaborate 
> further on some point?
>
> Thanks,
> Robert
>
>
> On Monday, September 12, 2016 at 2:38:59 PM UTC-4, Chris Foresman wrote:
>>
>> Is this one worker each? I also don't really understand the implication 
>> of the results. There's no context to explain the numbers nor if one result 
>> is better than another.
>>
>> On Sunday, September 11, 2016 at 7:46:52 AM UTC-5, Robert Roskam wrote:
>>>
>>> Hello All,
>>>
>>> The following is an initial report of Django Channels performance. While 
>>> this is being shared in other media channels at this time, I fully expect 
>>> to get some questions or clarifications from this group in particular, and 
>>> I'll be happy to add to that README anything to help describe the results.
>>>
>>>
>>> https://github.com/django/channels/blob/master/loadtesting/2016-09-06/README.rst
>>>
>>>
>>> Robert Roskam
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c4c9c95f-07b0-4a8d-bb1b-468893ac9e31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Contributing to Django

2016-09-14 Thread Andromeda Yelton
https://docs.djangoproject.com/en/1.10/internals/contributing/ :)

On Sun, Sep 11, 2016 at 4:29 PM,  wrote:

> Hi everyone!
>
> I found Django interesting and so, I want to contribute to it. I am
> learning OOP , web development. I have done a course in C language. My
> mathematics is good. Please suggest in detail, how can I contribute and
> where and how to start? I haven't contributed anything till now but have a
> urge to do so. Please give directions in the sense  what to learn. Your
> help is highly appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-developers/9b38a592-dfa6-4e50-8207-
> dcf44e711bc3%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Andromeda Yelton
Vice President/President-Elect, Library & Information Technology
Association: http://www.lita.org
http://andromedayelton.com
@ThatAndromeda 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFE1XCb70E3UNxjhVe9dztaZEUYCpG1hApV%2B3B60srTCMTrUtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Withdrawing Channels from 1.10

2016-09-14 Thread Pietro Spagnulo
Just want to share my emotional support for your astonishing job. God bless 
you.

On Tuesday, May 10, 2016 at 6:40:01 PM UTC+2, Andrew Godwin wrote:
>
> Hi everyone,
>
> I'm going to withdraw the Channels patch for consideration for 1.10; 
> there's a lot more concern and uncertainty around it than I had 
> anticipated, given the reaction up until this point, and it's clear I have 
> some more work to do at convincing the community and proving the design.
>
> Instead, I will take the path-most-trodden for me and large Django 
> features, which is to run it as an external package, compatible with 1.8 
> through 1.10 (which the package already is), and let it mature and develop 
> outside of core, before coming round to look again at inclusion for 1.11 or 
> 2.0.
>
> My reasons are thus:
>
>  - Trying to push it into 1.10 is either going to delay the release or 
> result in a rush job. We have time-based releases for a reason, and 
> stopping "big-name features" from sinking a release is one of those reasons.
>
>  - There are numerous objections to the design, some well-founded. I'd 
> like to take time to prove out these decisions (or, indeed, refine them) 
> with channels in a more production situation and after a battery of load 
> testing and analysis.
>
>  - Being almost purely an addition to Django, even though it technically 
> inserts a new layer, makes it more well-suited to live externally than many 
> other features. While the external package will have to monkey-patch a few 
> things, it'll be relatively minor.
>
>  - The faster release cycle an external package can bring will almost 
> certainly be useful.
>
> However, the step I'd like to take instead is moving Channels and its 
> associated project repos (daphne, asgiref, asgi_redis, asgi_ipc) under the 
> Django organisation on GitHub and discussing them openly in Django blog 
> posts, documentation and other places as the Django project's official way 
> to get WebSockets working - after all, we are paying people to work on it, 
> and I still remain convinced we need a solution.
>
> I think this is a good mid-step, and given that you would have had to `pip 
> install` extra dependencies to get django.channels to run anyway, no more 
> complicated to use. I'd also propose that these external projects have 
> their own, shorter backwards-compatibility and security guarantees, 
> essentially running on a quicker, lighter version of the main release cycle.
>
> That discussion is upcoming, but I wanted to retract the patch now because 
> I don't want us to get to the 15th May and be unsure about what's going on, 
> and there's plenty of other work we need to do to prep for the alpha.
>
> Sorry about the drama I've stirred up these last few weeks; I had 
> misjudged the situation, and was more confident in the design and code than 
> I maybe should have been. A lot of the goals I want to achieve with 
> Channels can be done as an external package for now, and hopefully it will 
> prove the correct decision to take.
>
> Andrew
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/d5d81498-3ee7-4c00-af9f-75b9a5d16e92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sonar for the Django rpoject

2016-09-14 Thread Ivan Sevastoyanov
Hello,

Here is my blog post 

 
about setting up SonarQube. I think it takes about 15 minutes, so you can 
run it yourself if you want (and if you have time of course). Have a good 
day!

Regards,
Ivan

On Friday, September 9, 2016 at 10:01:52 PM UTC+3, Ivan Sevastoyanov wrote:
>
> Hello,
>
> I installed some older versions of SonarQube and unfortunately the rules 
> are not the same and the report generated is not full. But I reviewed the 
> issues and I did not find any security issues or something that is 
> absolutely critical. There are 40 major issues that are marked as bugs. 
> Most common they are of this type - "Having two branches in the same if 
> structure with the same implementation is at best duplicate code, and at 
> worst a coding error. If the same logic is truly needed for both instances, 
> then they should be combined.". So I will write a blog post for setting up 
> SonarQube, sonar-scanner and Python plug-in and post it here. It takes not 
> more than 15 minutes, so you can see the issues yourself.
>
> Regards,
> Ivan
>
> On Tuesday, September 6, 2016 at 3:32:41 PM UTC+3, Ivan Sevastoyanov wrote:
>>
>> Hello,
>>
>> I'm back from the vacation.
>>
>> @Hanne Moa - As far as I know, you can skip packages, files and 
>> everything can be customized. It's the same with the rules. I did not 
>> prioritized the Sonar rules - they are the default ones and Sonar is 
>> detecting not only possible bugs and issues but code smells, some ideas for 
>> improving the readability and maintainability, etc. So I agree that these 
>> "criticals" are, in fact, not real "criticals" - they are not issues, they 
>> will not improve the performance, they are just a tip to improve the 
>> readability of the code. But you have the full power to customize the rules 
>> and choose which of them are blockers, criticals, major, minor and info.
>>
>> @Aymeric Augustin - Yes, it's easy to reproduce the results. 
>> Unfortunately, I installed the latest version of Sonar and some of the 
>> plug-ins for exporting into PDF and HTML are still not compatible. I can 
>> install some older version and put an old working plug-in into work. But 
>> I'm not sure if the rules will be the same or less than now. I will review 
>> the rules and will send an e-mail if I think some of them are security 
>> issues. Other I can do is to write a blog post how to install SonarQube and 
>> some of the plug-ins and how to configure them but I don't know when I will 
>> have enough time for doing that.
>>
>> @Alex Gaynor - You can see what I wrote to Hanne Moa.
>>
>> @James Bennett - You can see what I wrote to Hanne Moa. The rules should 
>> be prioritized but in my honest opinion I'm not the right person for doing 
>> that. I can copy/paste the rules here but I'm not sure that some of them 
>> are understandable from their short description.
>>
>> Regards,
>> Ivan
>>
>> On Monday, September 5, 2016 at 5:40:41 PM UTC+3, James Bennett wrote:
>>>
>>> On Wed, Aug 31, 2016 at 10:55 AM, Alex Gaynor  
>>> wrote:
>>>
 If these are what qualifies as critical, I don't think this is a good 
 use of our time.



>>> Agreed. If those are the critical things, then either Django is really 
>>> really good, or there are things it's missing. I suspect there are things 
>>> it's missing. 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/43af1adb-be38-4216-b11f-efd54eb1e887%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trac spam attack / spam filter reactivated

2016-09-14 Thread Zach
I'm also trying to cc myself on tickets only to get "Submission rejected as 
potential spam". Can we incorporate this 

 
?. I've had better luck completing that verification.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c7621a98-52d7-4bbc-acfd-0bd9b47f7de0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Trac spam attack / spam filter reactivated

2016-09-14 Thread Tim Graham
The difficulty is tuning the spam weights. We had spammers completing 
capchas and getting their posts through.

On Wednesday, September 14, 2016 at 6:29:40 PM UTC-4, Zach wrote:
>
> I'm also trying to cc myself on tickets only to get "Submission rejected 
> as potential spam". Can we incorporate this <
> https://security.googleblog.com/2014/12/are-you-robot-introducing-no-captcha.html>
>  
> ?. I've had better luck completing that verification.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/22a1630f-2e99-41a4-9952-e973283c929d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Challenge teaching Django to beginners: urls.py

2016-09-14 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 wrote:
>
> Hi all,
>
> Since it seemed like an interesting idea to me, I started development of a 
> third-party plugin.
>
> It's currently at:
> https://github.com/sjoerdjob/django-simple-url
>
> Since I only started today, I have no readme/setup.py yet. Will come later 
> this week I hope.
>
> Current usage is
>
> from django_simple_url import simple_url
>
> urlpatterns = [
> simple_url('hello/world/', hello_world_view),
> simple_url(':year/:month/', posts_for_month_view),
> ]
>
> It works proper with includes (not adding a $ to the URL), and leaf views 
> (adding a $ to the URL).
>
> Maybe this week, or early next week I will also add support for the 
> '' syntax.
>
> Kind regards,
> Sjoerd Job
>
> On Tuesday, September 13, 2016 at 9:40:47 PM UTC+2, Tim Graham wrote:
>>
>> I would like to see if this could be done as a third-party project (allow 
>> "pluggable URLs" which could use any syntax). If not, then let's accept a 
>> patch to Django to support it. Over time, if there's some strong consensus 
>> about a particular third-party package, then we could bring it in to core. 
>> I think this approach is less controversial then Django adopting some new, 
>> untested syntax right now.
>>
>> On Tuesday, September 13, 2016 at 3:33:25 PM UTC-4, Emil Stenström wrote:
>>>
>>> So it looks to me that the consensus is that this IS in fact a good 
>>> idea, to supply a simpler, regex-free method to define URL:s. 
>>>
>>> It also seems that the best liked version is something that's similar to 
>>> what flask uses: /articles///.
>>>
>>> I've never written a DEP before, but it sounds like a fun challenge. 
>>> I'll try to look at existing DEPs for a pattern and then apply that.
>>>
>>> Does anyone have something in particular that they would like to add to 
>>> the DEP? I figure I'll try to keep this first version as simple as 
>>> possible, while maintaining extension points for features that can be added 
>>> later on.
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/512b0eab-807f-45e2-9225-93a0e1a64686%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Challenge teaching Django to beginners: urls.py

2016-09-14 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 dive into the code of URL resolver part of Django before 
> we actually kick off?
>
> Anyway, I myself as a experienced user also like this idea. But as 
> Tim and Ludovic mentioned, we might better research a bit first. 
> Understanding how third-party libraries implemented this kind of 
> simple URL could be very helpful.
>
> Thanks.
>
> Best regards,
> Ares Ou
>
> *Software Engineer / Full-Stack Python Developer*
>
> *Blog:* http://aresou.net  |  *Github:* https://github.com/aresowj
> *Stack Overflow:* http://stackoverflow.com/users/5183727/ares-ou
>
> Ares Ou
>
> On Tue, Sep 13, 2016 at 12:54 PM, 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 django/urls/revolvers.py is get_resolver. This function
>> return a RegexURLResolver, using is argument or the setting
>> ROOT_URLCONF as argument.
>>
>> This make impossible, for exemple, to have resolver giving to the view
>> an int argument.
>>
>> [1] http://codysoyland.com/2009/sep/6/introduction-surlex/
>>
>> 2016-09-13 21:40 GMT+02:00 Tim Graham >:
>> > I would like to see if this could be done as a third-party project 
>> (allow
>> > "pluggable URLs" which could use any syntax). If not, then let's accept 
>> a
>> > patch to Django to support it. Over time, if there's some strong 
>> consensus
>> > about a particular third-party package, then we could bring it in to 
>> core. I
>> > think this approach is less controversial then Django adopting some new,
>> > untested syntax right now.
>> >
>> > On Tuesday, September 13, 2016 at 3:33:25 PM UTC-4, Emil Stenström 
>> wrote:
>> >>
>> >> So it looks to me that the consensus is that this IS in fact a good 
>> idea,
>> >> to supply a simpler, regex-free method to define URL:s.
>> >>
>> >> It also seems that the best liked version is something that's similar 
>> to
>> >> what flask uses: /articles///.
>> >>
>> >> I've never written a DEP before, but it sounds like a fun challenge. 
>> I'll
>> >> try to look at existing DEPs for a pattern and then apply that.
>> >>
>> >> Does anyone have something in particular that they would like to add to
>> >> the DEP? I figure I'll try to keep this first version as simple as 
>> possible,
>> >> while maintaining extension points for features that can be added 
>> later on.
>> >>
>> > --
>> > You received this message because you are subscribed to the Google 
>> Groups
>> > "Django developers (Contributions to Django itself)" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an
>> > email to django-develop...@googlegroups.com .
>> > To post to this group, send email to django-d...@googlegroups.com 
>> .
>> > Visit this group at https://groups.google.com/group/django-developers.
>> > To view this discussion on the web visit
>> > 
>> https://groups.google.com/d/msgid/django-developers/37e44d86-696d-4b36-803a-0089232eedf9%40googlegroups.com
>> .
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>>
>> Cordialement, Coues Ludovic
>> +336 148 743 42
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers  (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com .
>> To post to this group, send email to django-d...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/CAEuG%2BTa-d_RsMqj5HbspEBdKUKemfBPvjBh2%2BdJmQjU04b-V7w%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c1e4d7a7-0a0e-4cf7-ae2f-ab9986a3a856%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Challenge teaching Django to beginners: urls.py

2016-09-14 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 django/urls/revolvers.py is get_resolver. This function 
> return a RegexURLResolver, using is argument or the setting 
> ROOT_URLCONF as argument. 
>
> This make impossible, for exemple, to have resolver giving to the view 
> an int argument. 
>
> [1] http://codysoyland.com/2009/sep/6/introduction-surlex/ 
>

I fully agree that this is a problem. If you write "/articles//" 
I think the expectation is that year will be sent in as an int, not a 
string. So the int serves as two different things: a validator and a 
typecast.

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? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/211d1691-0e13-4c3d-bf08-a24f9aa48432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Challenge teaching Django to beginners: urls.py

2016-09-14 Thread Curtis Maloney
Somewhere I have code to provide a "parse" based URL router.

Will dig it up now 1.10 has has shipped

On 14 September 2016 6:38:20 PM AEST, Florian Apolloner  
wrote:
>Hi Emil,
>
>On Tuesday, September 13, 2016 at 9:50:22 PM UTC+2, Emil Stenström
>wrote:
>>
>> and more experienced users are expected to switch over to using
>regexes 
>> directly to get the exact behavior they want. 
>>
>
>How so? Personally I would use this quite quickly since a few builtin
>types 
>would cover 99%. While I can write regex in sleep nowadays, I still
>find it 
>kinda tedious to redefine what "slug" means in every URL I wanna match 
>something… I am sure others think the same.
> 
>
>> Beginners likely won't look at all the different options and choose
>one 
>> based on it's merits, they'll pick whatever their teacher suggests
>they 
>> use. Also installing an extra package when setting up django feels a
>bit 
>> strange.
>>
>
>I think the eco system is far enough to support that, after all south
>lived 
>long and well as external package. Either way, DEP or not, having an 
>implementation out there would definitely help.
>
>Cheers,
>Florian
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "Django developers  (Contributions to Django itself)" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to django-developers+unsubscr...@googlegroups.com.
>To post to this group, send email to
>django-developers@googlegroups.com.
>Visit this group at https://groups.google.com/group/django-developers.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-developers/6ea6cd5d-8870-4596-852d-e3b59110af8c%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/B35D1655-D658-41FC-9EB5-83311B6C892C%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.