Confused on how to run new polls app from advanced tutorial

I just finished the official django tutorial and got my polling application working. I went on to the packaging steps and got it to install on my ubuntu laptop as a user (not in a venv) but then I hit a wall. I have no idea how to get the server to run after install. I see it when I check my pip list, but the only way to run it during the tutorial was to call the manage.py and that was in a parent directory that the tutorial had me leave alone during packaging. I feel like this is something very basic I’m overlooking and not finding the right google-fu commands to get the answers.
To answer the obvious question: Yes, I’m also fairly new to Ubuntu, python, AND coding in general.

Please Provide your files structure.

first its important to create a virtual environment to create your project and install all the required packages inside this virtual environment after activating it.

Yes - when you create a package for the app, it’s only the app that gets installed. The rest of your project needs to continue to exist.

It would be easier if you described in detail your current directory structure of your project and what it is about the packaging that is confusing you.

I had a virtual environment when I went through and created the app, and the development server still runs fine in that environment. It sounds like there must be a web platform on the system it gets installed on to facilitate the running of the web app. I think I have a lot more reading to do. Here is the folder structure from the whole tutorial, and the directory in the yellow box is all that the tutorial showed to package up.

Correct - it’s the polls app that you’re creating a package from.

The purpose of that part of the tutorial is to show how to package an app - not a complete project.

The concept is that by packaging an app, you are then creating an app that you can use in multiple projects.

On another site, someone pointed me to this: Setting up Django and your web server with uWSGI and nginx — uWSGI 2.0 documentation
Looks like the parts I would need running as a foundation to plug my app into, so thanks for the replies and help.

Thank you Ken, this is my first attempt in this type of thing. I will try the django web server tutorial and see if I can get this plugged in there

Deployment of a project is a completely different issue.

In addition to the link you’ve posted, you should also read:

along with the links on those pages for more detailed information.

Note: Proper deployment of a Django application is frequently considered to be one of the most confusing aspects of Django because of all the “moving parts” involved.

2 Likes