diff --git a/.gitignore b/.gitignore index 3fcea8c..1eb686b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ dist/html/* # Files index.html +config.php issues.md diff --git a/README.md b/README.md index b525995..1faf661 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ HD app is the magic tool that allows the Happy Dev network to thrive in a decent ## Install (Ubuntu) * `git clone --recurse-submodules https://git.happy-dev.fr/happy-dev/hd-app.git` * `cd hd-app` - * `apt install npm` * `npm install -g grunt-cli` * `npm install` diff --git a/config-sample.php b/config-sample.php new file mode 100644 index 0000000..9e8c1d0 --- /dev/null +++ b/config-sample.php @@ -0,0 +1,8 @@ + index.html +grunt +ssh happy-dev_alex@ssh-happy-dev.alwaysdata.net "cd hd-app; rm -Rf ./*; mkdir -p src/fonts; mkdir -p dist/css;" +scp -r index.html happy-dev_alex@ssh-happy-dev.alwaysdata.net:~/hd-app/ +scp -r dist/css/ happy-dev_alex@ssh-happy-dev.alwaysdata.net:~/hd-app/dist/ +scp -r src/fonts/ happy-dev_alex@ssh-happy-dev.alwaysdata.net:~/hd-app/src/ diff --git a/index.php b/index.php index 6abe397..c2dd514 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ @@ -12,20 +12,14 @@ Happy Dev App - - - - - - - - - - - - - - + diff --git a/src/html/dependencies-dev.php b/src/html/dependencies-dev.php new file mode 100644 index 0000000..d444715 --- /dev/null +++ b/src/html/dependencies-dev.php @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/html/dependencies-prod.php b/src/html/dependencies-prod.php new file mode 100644 index 0000000..20bbd3e --- /dev/null +++ b/src/html/dependencies-prod.php @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/models.py b/src/server/models.py similarity index 100% rename from src/models.py rename to src/server/models.py diff --git a/src/server/urls.py b/src/server/urls.py new file mode 100644 index 0000000..4164c20 --- /dev/null +++ b/src/server/urls.py @@ -0,0 +1,30 @@ +"""hdappserver URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url, include +from django.contrib import admin +from djangoldp.views import LDPViewSet +from .models import Member, Skill, Project, Client, Cell, Channel + +urlpatterns = [ + url(r'^admin/', admin.site.urls), + url(r'^members/', LDPViewSet.urls(model=Member, nested_field="skills")), + url(r'^skills/', LDPViewSet.urls(model=Skill)), + url(r'^projects/', LDPViewSet.urls(model=Project, nested_field="team")), + url(r'^clients/', LDPViewSet.urls(model=Client)), + url(r'^cells/', LDPViewSet.urls(model=Cell)), + url(r'^channels/', LDPViewSet.urls(model=Channel, nested_field="members")), +] +