are parameters compulsary in an url pattern?

12 views
Skip to first unread message

kk

unread,
Oct 7, 2015, 12:10:54 AM10/7/15
to django...@googlegroups.com
Dear all,
I just wish to know if I must have all the parameters from my form as a
part of the url pattern?
I need to use only the request so was wondering if that is the case?
I have seen tutorials and all of them come with url parameters
I don't need a url like /articles/2013/03 etc.
I am writing a accounting/ inventory system and don't need a blogging
kind of application or a news room kind of stuff which Django is mostly
known for.
My forms will contain all the data and I can access all that in a view
through the request object I guess?
so a pattern like r(^setaccount'), views/account/setaccount must work.
is this correct or do I always need to pass parameters?
Which is the best time to use parameters apart from the request object?
Happy hacking.
Krishnakant.

Tim Graham

unread,
Oct 7, 2015, 8:41:25 AM10/7/15
to Django users
If you can accomplish what you need without passing parameters, there is certainly no requirement to do so.

Have you read: https://docs.djangoproject.com/en/stable/topics/http/urls/ ?
Reply all
Reply to author
Forward
0 new messages