Custom Query (27020 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (4 - 6 of 27020)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket Resolution Summary Owner Reporter
#29147 invalid Postgres JSONField missing to_python Williams Mendez Javier Buzzi
Description

Every other field implements a to_python except for JSONField:

https://github.com/django/django/blob/master/django/contrib/postgres/fields/hstore.py#L38 https://github.com/django/django/blob/master/django/contrib/postgres/fields/array.py#L102 https://github.com/django/django/blob/master/django/contrib/postgres/fields/ranges.py#L47

JSONField defaults to the value, meaning if you pass '{"object": "value"}' you get back '{"object": "value"}'. The same example in HStoreField, you pass in '{"object": "value"}' you get back {"object": "value"} -- makes the world of difference.

#29146 fixed re_path() examples are missing ^ and $ in regexes nobody Seohong Park
Description

An example about the usage of re_path() in 'URL dispatcher' document https://docs.djangoproject.com/en/2.0/topics/http/urls/ is misleading.

Since re_path() does not insert '$' at the end of URL parameter (on the contrast, path() inserts '^' and '$' at the beginning and the end of URL parameter),

re_path('articles/(?P<year>[0-9]{4})/(?P<month>[0-9]{2})/', views.month_archive) would not be mapped to any URL, because re_path('articles/(?P<year>[0-9]{4})/', views.year_archive) shades it.

(i.e. 'http://127.0.0.1:8000/articles/2018/12/' invokes views.year_archive, not views.month_archive)

This is misleading, because readers might think re_path also automatically inserts '^' and '$' to the parameter like path does.

I think it would be better to insert '$' at the end of each parameter of re_path() in the document.

Additionally, mentioning about the fact that path() automatically inserts '^' and '$' to the parameter also would be helpful.

#29143 invalid IntConverter does not accept negative integers Ashish Nitin Patil
Description

Paths like

'/int/<int:integer>/'

do not accept negative integers, i.e.

'/int/-2/'

fails with a 404, which it should not (since -2 is an integer).

PS - Attributed to this StackOverflow question for discovery and potential fix : https://stackoverflow.com/questions/48867977/django-2-url-path-matching-negative-value

1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.
Back to Top