Hint: You can adjust the default video playback speed in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Django Files

In this lesson, you’re going to take another look at your project to see a few of the important files that you’re going to work with a lot:

  • manage.py: You won’t go inside this file, but it’s kind of the command center of your project, so a lot of commands that you run are going to sit inside this file.

  • myproject: Inside of the management app, which is the one you start with when you first create your project, there are two files that you’re going to work with. urls.py is used to route forward to your other app. settings.py has project-wide settings.

Inside example_app, the projects app you’ll be creating, you’ll have a few files. The most important ones are urls.py, views.py, and models.py.

Comments & Discussion

reblark on Oct. 24, 2019

Well, that’s interesting. It looks like you are adding video segments to this tutorial as we speak. I went through the table of contents and found 3 new files that I had never seen. For instance, the Django Apps video is really welcome. It’s one of those things that you have to figure out for yourself, but an explanation like you have presented is very useful and welcome. I am impressed.

Martin Breuss RP Team on Oct. 26, 2019

Those were the videos I mentioned earlier that got lost during the upload to our platform. They were always meant to be part of the course, they just temporarily and accidentally fell into a digital crevasse :) 🏔📼🏔

Should be all fixed now!

reblark on Oct. 29, 2019

When you create virtual environment, it looks like the manage.py app is moved into the virtual environment folder. Is that right?

Martin Breuss RP Team on Oct. 30, 2019

No, creating a virtual environment doesn’t move any of your files around. All it does is create a folder (e.g. named .env, like here).

Also, you’ll want to create the virtual environment before you create your Django app. Therefore, at the time that you are making the virtual environment, there shouldn’t yet be a manage.py file in your folder.

Does that answer your question?

reblark on Oct. 30, 2019

Mostly, but I am a bit uncertain. I am now on my third iteration. Your response to my question about multiple projects was exactly what I was looking for. I am not sure that I have asked you the right question here. If you do “deactivate,” that just turns off the virtual environment and then when you do “clear” that just clears all the lines in the cli history. Then to get back into the virtual environment you have to “activate” again? Yes? And what happens if you don’t activate again?

Martin Breuss RP Team on Oct. 30, 2019

Yes, exactly. If you deactivate you exit the virtual environment. If you want to get back in that safe and contained environment that it provides, as well as have access to Django and other libraries you installed there, you’ll have to activate it again with:

source your_env_name/bin/activate

clear in your terminal only gives you a blank screen for visual purposes. If you scroll up, everything you typed is actually still there.

Become a Member to join the conversation.