Django Installed - How to use?

4 posts / 0 new
Last post
#1 Thu, 08/23/2012 - 12:17
Svpernova09

Django Installed - How to use?

Operating system Ubuntu Linux 12.04 Webmin version 1.590
Virtualmin version 3.93.gpl GPL

I have installed Django via Install Scripts -> Django. I can login to the django admin just fine. How do I start adding apps to this Django project?

Trying to run through this tutorial: https://docs.djangoproject.com/en/1.4/intro/tutorial01/

I get stuck on the command "python manage.py startapp polls"

Here is the output:

test@test:~/public_html/testdjango$ ls manage.py testdjango test@test:~/public_html/testdjango$ python manage.py startapp polls Traceback (most recent call last): File "manage.py", line 8, in from django.core.management import execute_from_command_line ImportError: No module named django.core.management test@test:~/public_html/testdjango$

Thu, 08/23/2012 - 16:34
Svpernova09

Solved my issue, for those that may run into the same thing, run this:

export PYTHONPATH=/home/USERNAME/public_html/lib/python

Edit with the proper username for the virtual server.

Sat, 09/21/2019 - 06:45 (Reply to #2)
anjanabalakrishnan

Your answer is realy helpful.Also i can create and access inbuilt django project on virtualmin.But i can't access uploaded django project.how can i solve this.When i access it it shows page not found error.

Thu, 08/23/2012 - 13:06
andreychek

Thanks for letting us know how you fixed it!

I'll look into adding that information to the Install Script installation screen, so folks know that they may need to setup their apps with that variable.

-Eric

Topic locked