vendredi 27 août 2021

how can I install django website on localhost with bash export

I'm new to django programming, I have downloaded the discord website from git hub https://github.com/python-discord/site.

I am trying to install this website for the last 5-6 hours. I searched for an answer everywhere, unfortunately I can't find a clear answer.

I will write my steps so far: Downloaded the source code

  1. Started venv, started new project and then copied all files to the folder.
  2. Added conf folder and inside secret.json

now i am stuck at 4:

  1. Add export DJANGOPROJECT_DATA_DIR=~/.djangoproject (without the backticks) to your ~/.bashrc (or ~/.zshrc if you're using zsh, ~/.bash_profile if you're on macOS and using bash) file and then run source ~/.bashrc (or source ~/.zshrc, or source ~/.bash_profile) to load the changes. I added the line: export DJANGOPROJECT_DATA_DIR=~/Desktop/website/site-main (this is my website folder path) at the end of the .bashrc file.

But I get nothing beside: 'source' is not recognized as an internal or external command, operable program or batch file.

I changed the command to set for windows but nothing happen.

enter image description here

    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable



Aucun commentaire:

Enregistrer un commentaire