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" <sjoerd...@sjec.nl> wrote:

> Hi :).
>
> Yes, I also added the other syntax yesterday evening, so the <int:year>
> 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]+')`.
>
> One downside (still) is that it does not get cast to an int. Although I'm
> not really sure if I find it logical that it gets cast.
>
> I don't really have that much time to work on it, but I'm hoping to add
> the `setup.py` either later today or shortly after the weekend.
>
> Kind regards,
> Sjoerd Job
>
> On Thursday, September 15, 2016 at 8:20:03 AM UTC+2, Emil Stenström wrote:
>>
>> 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
>>> '<int:year>' 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/<int:year>/<int:month>/.
>>>>>
>>>>> 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/d11376c9-8a6f-45bd-940d-
> bc72589bf8e4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/d11376c9-8a6f-45bd-940d-bc72589bf8e4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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/CALs0z1bz7NyuSL%2B43M1zZqSfsZTV0fgZx_aYGJp79kpsAgGhiw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to