Some code to help kick off things
server | ||
.gitignore | ||
example-settings.yml | ||
manage.py | ||
README.md |
startinblox-startinoff
Quick-start: Gettin' started with Startin'blox
- Sign up for an account on https://git.startinblox.com
- Add your SSH key here: https://git.startinblox.com/profile/keys
- Create a project folder, I'll use
export PROJECT_FOLDER=~/Projects/Autonomic/StartinBlox/
-- all subsequent steps are run from$PROJECT_FOLDER
- (Optional) Create a Python virtual environment using your preferred method,
or e.g.
$ python3 -m venv $PROJECT_FOLDER/venv $ source $PROJECT_FOLDER/venv/bin/activate
- Check out the
djangoldp
code:$ git clone git@git.startinblox.com:djangoldp-packages/djangoldp.git
$ pip install psycopg2 pycryptodomex # is this still needed? ```and install it: ``` $ cd $PROJECT_FOLDER/djangoldp $ pip install -e .
- Check out this very repository:
$ git clone https://git.autonomic.zone/decentral1se/startinblox-startinoff
- Install dependencies:
$ djangoldp install
- Run database migrations:
$ python manage.py migrate
- Launch the development server:
$ python manage.py runserver $ # Or, alternatively: $ djangoldp runserver
Quick start 2: this time, it's Hubl!
Architecture 🏗
djangoldp
is a Django app which you plug into a Django project. So, if you're
hacking on djangoldp
or related apps, then you need a Django project to test it.
When you follow this setup
guide,
you get asked to run djangoldp initserver myldpserver
(where I changed
myldpserver
to startinblox-startinoff
) and what spits out is what you also
see in this repository but with a working settings.yml
file.
user@machine:/path/to/startinblox$ tree -L 1
.
├── djangoldp
└── startinblox-startinoff (run ./manage.py commands here which uses your djangoldp code)
2 directories, 0 files
Using Postgres instead of SQLite
In the early days, we were using PostgreSQL, and we may yet need to return to its warm embrace. To do so:
- Install and start Postgres
- Mac OSX: https://www.postgresql.org/download/macosx/, or
brew install postgresql
, thenbrew services start postgresql
- Fedora:
dnf install postgresql-server && sudo systemctl enable postgresql.service && sudo systemctl start postgresql.service
- Mac OSX: https://www.postgresql.org/download/macosx/, or
- Create a user and a database:
$ createuser djangoldp $ createdb -O djangoldp djangoldp
(you may needsudo -u postgres
or-U postgres
on both of these commands, depending on your local security set-up) - Edit
settings.yml
if you need to remove the postgres user or change the password
Troubleshooting / top tips
- Remember to activate your virtual environment, if you're using one, before
running any Python /
manage.py
/djangoldp
commands