1👍
The extra arguments to your function are taken from your path configuration.
You set URL patterns; if you include elements in the URL pattern those will be passed on to your view as extra arguments:
urlpatterns = patterns('',
url(r'^accounts/(?P<name>\w+)/(?P<some_custom_element>\w+)$', views. get_accounts),
# ...
)
In the above example the view is configured to listen to any URL starting with accounts/
and including two more elements; those are passed to your view as arguments.
In other words, it is not POST or GET request data that is being passed in to those arguments.
You probably want to re-read the Django tutorial on this subject.
You’d use extra parameters in your path to create friendly, bookmarkable URLs. The path /users/1553537/giorgi-tsiklauri
is a lot more readable and friendly than /users?id=1553537
.
0👍
Read this Wikipedia article:
Semantic URLs, also sometimes referred to as clean URLs, RESTful URLs, user-friendly URLs, or SEO-friendly URLs, are Uniform Resource Locators (URLs) intended to improve the usability and accessibility of a website or web service by being immediately and intuitively meaningful to non-expert users
- [Answer]-Installing mod_wsgi for apache VC11 build on windows
- [Answer]-Not able to parse the remainder in django template
- [Answer]-How to get the same date result from Model.objects.create and Model.objects.get in Django?
- [Answer]-Django; Why empty_label is not shown in ModelChoiceField?