I wanna create a website using django framework , I don’t know how to divide the website into several apps… Help me.
In advance , thanks a lot
by the way , I’m new to web development
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Django works by matching a URL pattern to some code that you have written in views.py.
In your case, you are pointing the same pattern (^$) to two view methods. Django will stop when it finds a match, so when you switch the patterns around, it will always match the first entry in the list.
If you change your patterns to:
Now when you type htt://localhost:8000/two home2 will be executed, and when you type http://localhost:8000/ home1 will be executed.