diff --git a/.gitignore b/.gitignore index a7d59b0..3c18e84 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .DS_Store .idea node_modules/ -pgaweb/settings_local.py \ No newline at end of file +pgaweb/settings_local.py +*.pyc +static/COMPILED/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..f6ca619 --- /dev/null +++ b/README.md @@ -0,0 +1,67 @@ +PGAdmin Website + +# Installation instructions + +## Install Python dependencies +Run the command: + +```bash +pip install -r requirements.txt +``` + +## Create local settings file +Create a the file pgaweb/settings_local.py from pgaweb/settings.py changing the needed options to run locally. +For connection complaints inquiring about postgres "running locally and accepting connections on Unix domain socket...", +you'll need to change the `HOST` from the postgres data directory to `localhost`. + + +## Database setup + +### Create a new database + +Create a new database using the command + +```bash +createdb pgaweb +``` + +### Migrate database + +```bash +./manage.py migrate +``` + +### Populate the table + +You will at least need to: + +```bash +./manage.py loaddata ./versions/fixtures/versions.json +``` + +If you want to see the other content in the site running locally, +you will need to repeat this for the other fixtures: + +```bash +./manage.py loaddata ./download/fixtures/packages.json +./manage.py loaddata ./download/fixtures/distributions.json +./manage.py loaddata ./download/fixtures/versions.json +./manage.py loaddata ./download/fixtures/downloads.json +./manage.py loaddata ./faq/fixtures/categories.json +./manage.py loaddata ./faq/fixtures/faqs.json +./manage.py loaddata ./news/fixtures/news.json +``` + +## Install frontend requirements + +```bash +pushd static +yarn install +popd +``` + +# Start the application + +```bash +./manage.py runserver +``` diff --git a/static/yarn.lock b/static/yarn.lock new file mode 100644 index 0000000..18a2e2a --- /dev/null +++ b/static/yarn.lock @@ -0,0 +1,25 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +bootstrap@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.3.7.tgz#5a389394549f23330875a3b150656574f8a9eb71" + +font-awesome@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" + +font-mfizz@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/font-mfizz/-/font-mfizz-2.3.0.tgz#f12582680d2f3d1fc111e94a44c0b57b3b5d5c05" + +fotorama@^4.6.4: + version "4.6.4" + resolved "https://registry.yarnpkg.com/fotorama/-/fotorama-4.6.4.tgz#7376961b6c7eeccb6c76411aceba7795ffe22eae" + dependencies: + jquery ">=1.8" + +jquery@>=1.8, jquery@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787"