Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup PostgreSQL #9

Merged
merged 2 commits into from
Jan 13, 2020
Merged

Setup PostgreSQL #9

merged 2 commits into from
Jan 13, 2020

Conversation

nurmerey
Copy link
Contributor

@nurmerey nurmerey commented Dec 23, 2019

PR for issue #2

Note: to run and test this locally, you need to do the following parts of the above tutorial:

  1. Install PostgreSQL
  2. Skip sections "create database" and "update settings"
  3. Installing PostgreSQL package for Python. If using Mac OS Mojave and have issue installing pip install psycopg2, then try sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
  4. run python manage.py migrate
  5. You should see the following default Django tables in the DB (using the app Postico to see the db):
    Screenshot 2019-12-23 15 21 27

@@ -21,6 +21,7 @@


# SECURITY WARNING: don't run with debug turned on in production!
SECRET_KEY = 'dulwepf_b#@eh19w)==v+pxvw$u$2gbxpwoevmzg)h-pl1mded'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kellim was right, it doesn't run without the secret key.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmhm, ok. We should still not have have the secret_key on Github, but ideally in an env variable. Same for the database details below.

Would you be comfortable setting that up, @nurmerey, or would you prefer I do that?
Considering this is only for local development at this point, I'm fine keeping it for now such that you are able to move on. I'd create a story to switch the project over to use environment variables though, before we deploy it.

Let me know what you prefer, @nurmerey? 😃

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@natsteinmetz Would python-dotenv be acceptable for using in development? https://preslav.me/2019/01/09/dotenv-files-python/

Copy link
Contributor Author

@nurmerey nurmerey Jan 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@natsteinmetz I have created a separate story for the secret key and db details - #14

@nurmerey nurmerey mentioned this pull request Dec 28, 2019
2 tasks
@nurmerey nurmerey requested a review from kellim January 1, 2020 03:26
@nurmerey nurmerey self-assigned this Jan 10, 2020
@nurmerey nurmerey merged commit 28a8ded into master Jan 13, 2020
@nurmerey nurmerey deleted the postgres branch January 13, 2020 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants