diff --git a/.gitignore b/.gitignore index a7d59b0..bd70dc3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store .idea node_modules/ -pgaweb/settings_local.py \ No newline at end of file +pgaweb/settings_local.py +*.pyc diff --git a/README.md b/README.md new file mode 100644 index 0000000..53bd040 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +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. + + +## Create database: +### Select database type +#### Using SQLite + +Create the file that will be used to store the website database + + +#### Using Postgres + +Create a new database using the command + +```bash +createdb pgaweb +``` + +### Migrate database + +```bash +./manage.py migrate +``` + +### Add initial PGAdmin4 version + +```sql +insert into versions_version values(1, true, 'pgadmin4', '1', 1); +``` + + +## 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"