djangoldp_urls.py 756 Bytes
Newer Older
1
from django.conf import settings
2
from django.conf.urls import url, include
3

4
from djangoldp.tests.models import Skill, JobOffer, Message, Conversation, Dummy, Task
Jean-Baptiste's avatar
Jean-Baptiste committed
5 6 7
from djangoldp.views import LDPViewSet

urlpatterns = [
8 9
    url(r'^messages/', LDPViewSet.urls(model=Message, permission_classes=[], fields=["@id", "text", "conversation"], nested_fields=['conversation'])),
    url(r'^conversations/', LDPViewSet.urls(model=Conversation, nested_fields=["message_set"], permission_classes=())),
10
    url(r'^tasks/', LDPViewSet.urls(model=Task, permission_classes=())),
11
    url(r'^users/', LDPViewSet.urls(model=settings.AUTH_USER_MODEL, permission_classes=[])),
12
    url(r'^dummys/', LDPViewSet.urls(model=Dummy, permission_classes=[], lookup_field='slug',)),
13 14
]