Help Replicating a Django App Repo

22 views
Skip to first unread message

Erin A

unread,
May 7, 2016, 6:28:32 PM5/7/16
to Django users
Hello,

I am a junior software engineer and am quite new to Django. I built this app and am working on a README to explain to others how to fork, clone and setup the app on their own machines. I've gotten stuck while trying to re-create the steps.

This is the order in which I've drawn up the steps:

1. Fork and clone the repo
2. Source a virtual environment
3. Pip install requirements.txt
4. Obtain access_token and secret_key and store in secrets.sh
5. Setup a Postgres DB, create user & database

This is where I get stuck. 

I tried migrating the app but there are no migrations to apply.
I tried 'django-admin startproject ig_miner_app . but am getting this error code:

"CommandError: /Users/Erin/Desktop/CodeByEAllard/project/instagram_miner/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files"

If I can get this sorted out, I should just be able to run the server like normal, right?

I'm sure I'm missing something (or many things) but don't know what they are. Does any have suggestions for how to get the server to run?

Thank you!

Erin Allard

Avraham Serour

unread,
May 8, 2016, 5:45:03 AM5/8/16
to django-users
if you are cloning a project it means you are not starting one from zero.
so you already have a manage.py file, you don't need to run startproject


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83e916c1-cf32-4e95-83b5-1d5da686bca0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gergely Polonkai

unread,
May 8, 2016, 1:36:49 PM5/8/16
to Django users

Hello,

1. Clone the repo (success)
2. Install pip requirements (mention using virtualenv, but don't make it a requirement; pip install -r requirements.txt in a venv succeeded)
3. Set the SECRET_KEY environment variable (I think you shouldn't make creating secret.sh a requirement, just suggest it; setting env variables in a production environment may be very different, like editing the server's configuration files)
4. Set up your database and set the password (where? In settings.py? There's no env variable for that here, and if you don't run PgSQL locally, it is very likely you *will* have a password)
4. Run python manage.py migrate (succeeded both with SQLite3 and PostgreSQL)

All in all: works for me ☺

One suggestion: unless you do some raw SQL magic, you should not make a specific database a hard requirement. Your app seems to work well with SQLite (long time performance is a different story, though).

Best wishes!

Gergely

PS: add some tests. python manage.py test feels lonely without them 😉

--
Reply all
Reply to author
Forward
0 new messages