GreenRoof
GreenRoof

Reputation: 150

Deploying Django App on PythonAnywhere without using GitHub

I need to deploy a Django app on pythonanywhere, but I wish I could upload the code without using GitHub because I don't have private repositories and I don't want my codes to be exposed to the public.

How can I deploy my Django app on pythonanywhere without using GitHub?

Upvotes: 2

Views: 1819

Answers (2)

anjaneyulubatta505
anjaneyulubatta505

Reputation: 11665

Deploying a Django project on PythonAnywhere is a lot like running a Django project on your own PC. You'll use a virtualenv, just like you probably do on your own PC, you'll have a copy of your code on PythonAnywhere which you can edit and browse and commit to version control.

The main thing that's different is that, instead of using the Django dev server with manage.py runserver and viewing your site on localhost, you'll create what we call a Web app via the Web tab in our UI, and then configure it with a WSGI file whose job is simply to import your Django project.

And then your site will be live on the real, public Internet. woo!

Here's an overview of the steps involved.

  1. Upload your code to PythonAnywhere
  2. Set up a virtualenv and install Django and any other requirements
  3. Set up your web app using the manual config option
  4. Add any other setup (static files, environment variables etc)

See the documentation of python anywhere

Ref: https://help.pythonanywhere.com/pages/DeployExistingDjangoProject/

Upvotes: 0

dstrants
dstrants

Reputation: 7705

According to their documentation, you can upload your project as zip to pythonanywhere. Have in mind that if the project is big enough you have to split it into parts.

Steps

  • Make a zip file ( split it to parts if needed)
  • Uploaded to pythonanywhere using the Files Tab
  • Use the bash console and the unzip command to decompress it
  • Done

More Info here

Upvotes: 2

Related Questions