Compare commits

...

2 Commits

Author SHA1 Message Date
3wc 6937dd6ba0 Git ignore database 2021-06-02 14:45:10 +02:00
3wc 4fee460ea5 Update README 2021-06-02 14:44:47 +02:00
2 changed files with 160 additions and 30 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
settings.yml
static/
**/__pycache__
/db.sqlite3

129
README.md
View File

@ -33,6 +33,10 @@
```
$ python manage.py migrate
```
9. Create an RSA key for OAuth:
```
$ python manage.py creatersakey
```
9. Launch the development server:
```
$ python manage.py runserver
@ -42,6 +46,123 @@
## Quick start 2: this time, it's Hubl!
_(in another terminal, don't need to load virtualenv)_
```
git clone https://git.startinblox.com/applications/hubl
cd hubl
npm install
```
Then, add the following as `config.json` in your hubl folder.
```
{
"client": {
"name": "Sample of a functional Hubl",
"logo": "https://cdn.startinblox.com/logos/webp/hubl.webp"
},
"components": [{
"type": "registering",
"parameters": {
"authority": "http://localhost:8000/",
"authorityName": "dataserver"
},
"endpoints": {
"get": "http://localhost:8000/open-communities/"
},
"route": false
},
{
"type": "notification",
"route": false
},
{
"type": "admin",
"route": false
},
{
"type": "about"
},
{
"type": "communities",
"route": false
},
{
"type": "dashboard",
"endpoints": {
"get": "http://localhost:8000/dashboards/"
}
},
{
"type": "profileDirectory",
"endpoints": {
"get": "http://localhost:8000/users/",
"skills": "http://localhost:8000/skills/",
"uploads": "http://localhost:8000/upload/"
},
"route": "members"
},
{
"type": "jobBoard",
"endpoints": {
"get": "http://localhost:8000/job-offers/",
"post": "http://localhost:8000/job-offers/",
"skills": "http://localhost:8000/skills/"
},
"route": "job-offers"
},
{
"type": "projects",
"endpoints": {
"get": "http://localhost:8000/projects/",
"post": "http://localhost:8000/projects/",
"captains": "http://localhost:8000/users/",
"users": "http://localhost:8000/users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
},
{
"type": "circles",
"endpoints": {
"get": "http://localhost:8000/circles/",
"post": "http://localhost:8000/circles/",
"owners": "http://localhost:8000/users/",
"users": "http://localhost:8000/users/",
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
}
},
{
"type": "chat",
"endpoints": {
"xmpp": "wss://xmpp-dev.startinblox.com/xmpp-websocket"
},
"route": "messages"
},
{
"type": "analytics",
"parameters": {
"type": "matomo",
"url": "https://matomo.startinblox.com/",
"id": "2"
},
"route": false
}
]
}
```
Then install Node dependencies:
```
npm install
```
and launch the server with:
```
npm run watch
```
## Architecture 🏗
@ -86,3 +207,11 @@ its warm embrace. To do so:
* Remember to activate your virtual environment, if you're using one, before
running any Python / `manage.py` / `djangoldp` commands
* `django.db.migrations.exceptions.InconsistentMigrationHistory: Migration guardian.0001_initial is applied before its dependency djangoldp_account.0001_initial on database 'default'.`
* try `rm db.sqlite3` in your hublserver folder.
* `ImportError: cannot import name 'base64url_decode' from 'jwt.utils'`
* try `pip uninstall jwt` and `pip install pyjwt`
* `No module named 'oidc_provider.lib.utils.dpop'`
* Make sure you're in the right virtualenv!