Init hacking
This commit is contained in:
commit
62243b568d
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/static/
|
25
manage.py
Executable file
25
manage.py
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from djangoldp.conf import ldpsettings
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
ldpsettings.configure('settings.yml')
|
||||||
|
|
||||||
|
try:
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
except ImportError:
|
||||||
|
# The above import may fail for some other reason. Ensure that the
|
||||||
|
# issue is really that Django is missing to avoid masking other
|
||||||
|
# exceptions on Python 2.
|
||||||
|
try:
|
||||||
|
import django
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError(
|
||||||
|
"Couldn't import Django. Are you sure it's installed and "
|
||||||
|
"available on your PYTHONPATH environment variable? Did you "
|
||||||
|
"forget to activate a virtual environment?"
|
||||||
|
)
|
||||||
|
raise
|
||||||
|
execute_from_command_line(sys.argv)
|
0
server/__init__.py
Normal file
0
server/__init__.py
Normal file
BIN
server/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
server/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
BIN
server/__pycache__/admin.cpython-39.pyc
Normal file
BIN
server/__pycache__/admin.cpython-39.pyc
Normal file
Binary file not shown.
BIN
server/__pycache__/models.cpython-39.pyc
Normal file
BIN
server/__pycache__/models.cpython-39.pyc
Normal file
Binary file not shown.
BIN
server/__pycache__/urls.cpython-39.pyc
Normal file
BIN
server/__pycache__/urls.cpython-39.pyc
Normal file
Binary file not shown.
BIN
server/__pycache__/wsgi.cpython-39.pyc
Normal file
BIN
server/__pycache__/wsgi.cpython-39.pyc
Normal file
Binary file not shown.
2
server/admin.py
Normal file
2
server/admin.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
from djangoldp.admin import DjangoLDPAdmin
|
31
server/migrations/0001_initial.py
Normal file
31
server/migrations/0001_initial.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Generated by Django 2.2.18 on 2021-02-05 10:22
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import djangoldp.fields
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Todo',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('urlid', djangoldp.fields.LDPUrlField(blank=True, null=True, unique=True)),
|
||||||
|
('is_backlink', models.BooleanField(default=False, help_text='set automatically to indicate the Model is a backlink')),
|
||||||
|
('allow_create_backlink', models.BooleanField(default=True, help_text='set to False to disable backlink creation after Model save')),
|
||||||
|
('name', models.CharField(max_length=255)),
|
||||||
|
('deadline', models.DateTimeField()),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
'default_permissions': ('add', 'change', 'delete', 'view', 'control'),
|
||||||
|
'depth': 0,
|
||||||
|
},
|
||||||
|
),
|
||||||
|
]
|
17
server/migrations/0002_auto_20210315_1108.py
Normal file
17
server/migrations/0002_auto_20210315_1108.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 2.2.19 on 2021-03-15 10:08
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('server', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='todo',
|
||||||
|
options={'default_permissions': ['add', 'change', 'delete', 'view', 'control']},
|
||||||
|
),
|
||||||
|
]
|
16
server/migrations/0003_delete_todo.py
Normal file
16
server/migrations/0003_delete_todo.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Generated by Django 2.2.19 on 2021-03-15 10:12
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('server', '0002_auto_20210315_1108'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Todo',
|
||||||
|
),
|
||||||
|
]
|
0
server/migrations/__init__.py
Normal file
0
server/migrations/__init__.py
Normal file
BIN
server/migrations/__pycache__/0001_initial.cpython-39.pyc
Normal file
BIN
server/migrations/__pycache__/0001_initial.cpython-39.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
server/migrations/__pycache__/0003_delete_todo.cpython-39.pyc
Normal file
BIN
server/migrations/__pycache__/0003_delete_todo.cpython-39.pyc
Normal file
Binary file not shown.
BIN
server/migrations/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
server/migrations/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
2
server/models.py
Normal file
2
server/models.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from django.db import models
|
||||||
|
from djangoldp.models import Model
|
12
server/urls.py
Normal file
12
server/urls.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from django.conf import settings
|
||||||
|
from django.conf.urls import include, url
|
||||||
|
from django.conf.urls.static import static
|
||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r"^", include("djangoldp.urls")),
|
||||||
|
url(r"^admin/", admin.site.urls),
|
||||||
|
]
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
17
server/wsgi.py
Normal file
17
server/wsgi.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from django.conf import settings as django_settings
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
from djangoldp.conf import ldpsettings
|
||||||
|
|
||||||
|
if not django_settings.configured:
|
||||||
|
ldpsettings.configure()
|
||||||
|
|
||||||
|
application = get_wsgi_application()
|
||||||
|
|
||||||
|
try:
|
||||||
|
from djangoldp.activities.services import ActivityQueueService
|
||||||
|
|
||||||
|
ActivityQueueService.start()
|
||||||
|
except:
|
||||||
|
pass
|
22
settings.yml
Normal file
22
settings.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
dependencies:
|
||||||
|
|
||||||
|
ldppackages:
|
||||||
|
|
||||||
|
server:
|
||||||
|
DEBUG: true
|
||||||
|
ALLOWED_HOSTS:
|
||||||
|
- "*"
|
||||||
|
SECRET_KEY: "ak$t4x@9pcs$ypwt_m38)vcg^m=q@j7*2rs2gu7%h0wwcv)(y2"
|
||||||
|
DATABASES:
|
||||||
|
default:
|
||||||
|
ENGINE: django.db.backends.postgresql_psycopg2
|
||||||
|
NAME: djangoldp
|
||||||
|
USER: postgres
|
||||||
|
PASSWORD: passw0rd
|
||||||
|
LDP_RDF_CONTEXT: https://cdn.happy-dev.fr/owl/hdcontext.jsonld
|
||||||
|
ROOT_URLCONF: server.urls
|
||||||
|
STATIC_ROOT: static
|
||||||
|
MEDIA_ROOT: media
|
||||||
|
INSTALLED_APPS:
|
||||||
|
- server
|
||||||
|
- djangoldp_crypto
|
Loading…
Reference in New Issue
Block a user