Using urls.py and views.py as names is not mandatory in the app, the "urls.py" is referenced in the urls.py of the project, and can have any name you want, but these are convention names and useful for other people reading your code
models.py is a tad more special because models need to be auto discovered by Django, but it is also customizable Other than that, you can create all the modules and packages you deem appropiate for four needs. On 1/8/17, sas3...@g.rit.edu <sas3...@g.rit.edu> wrote: > First off, I'd like to say that I am a huge noob to Django in general so I > apologize if it's a dumb question, and second the title's vague because > it's hard to concisely phrase this question so allow me to clarify. > Throughout the tutorials we are told to make several specifically-named > python modules in either our app directory or the project directory, such > as "urls.py", "views.py", "models.py" etc and put our code in there, or we > generate python modules via commands, like with "makemigrations". The names > > follow conventions, like that both the project and app url modules are > named "urls.py", and need to be put in specific locations to work properly. > > It is never said explicitly if the only python modules we are ever meant to > > make are these modules - "urls.py", "tests.py", "admin.py", etc. - and we > are never meant to write a module like "foo.py" and put code in there. Is > this the case? Should all python code for our Django website only be put in > > the modules seen in the tutorials? > > Thank you for your patience > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/726ff65a-033f-48a6-843d-16213ac1dd95%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei2dfGBiJx%2BQNKwtSmhD1AYqL%3DgGLZYL7Bmz0qBV1rkoxw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.