How to run cloned Django project? How to run cloned Django project? python python

How to run cloned Django project?


First off, you are getting that error because you are starting a project within the same directory as the cloned project, this directory already contains an app with the name ig_miner_app hence the name conflict.

As regards steps to running the project by other users , this should work.

clone the project

git clone https://github.com/erinallard/instagram_miner.git 

create and start a a virtual environment

virtualenv env --no-site-packagessource env/bin/activate

Install the project dependencies:

pip install -r requirements.txt

create a file named "secrets.sh"

touch secrets.sh (mac and linux)

obtain a secret from MiniWebTool key and add to secrets.sh

export SECRET_KEY='<secret_key>'

add secrets.sh to .gitignore file

create a postgres db and add the credentials to settings.py

DATABASES = {    'default': {        'ENGINE': 'django.db.backends.postgresql_psycopg2',        'NAME': 'db_name',        'USER': 'name',        'PASSWORD': '',        'HOST': 'localhost',        'PORT': '',    }}

then run

python manage.py migrate

create admin account

python manage.py createsuperuser

then

python manage.py makemigrations ig_miner_app

to makemigrations for the app

then again run

python manage.py migrate

to start the development server

python manage.py runserver

and open localhost:8000 on your browser to view the app.

I believe this should get the app up and running on others' machines. Let me know if you get stuck on any of these steps so I make edits, if not, you can just use it and add any other relevant info I might not have added.


Hey @allardbrain and welcome to the Wonderful World of Development ^_^

While my hope is that this issue has been resolved by now, if I may, let's revisit something real quick-- I'm sure others have made and,are currently making this mistake.

I tried 'django-admin startproject ig_miner_app . but am getting this error code:

"CommandError: " yadda yadda yadda ...

Django actually has AMAZING Documentation. The guys behind it were actually Writers and Journalists and not your typical CS guys.

What I'm trying to say is, when learning something new, read the Documentation; run through the To-Do App Tutorial. Here's why..

django-admin startproject

This has already been satisfied if you are pulling a working copy of a pre-existing Application. Your concern should be with this file first and foremost ...

requirements.txt

This is where the devDependencies state their demands,if you will , similar to your basic

package.json 

Anyway, I'm only saying this because I spent the first few years of my career stubborn and often catching myself skimming through docs and, at the end of the day creating headaches for myself and the poor bastards tasked with overseeing my bumbling arse :-) Great times,those ...

Cheers Everyone


try to pass the app name to the migrate command:

manage.py migrate ig_miner_app