Merge branch 'update/author-field' into 'master'
update: add author url field See merge request startinblox/djangoldp-packages/djangoldp-notifications!5
This commit is contained in:
commit
3f2c0fbf1e
@ -1,10 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2019-01-15 10:40
|
||||
# Generated by Django 1.11 on 2019-02-28 01:14
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import djangoldp.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -20,7 +21,7 @@ class Migration(migrations.Migration):
|
||||
name='Notification',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('author_user', models.URLField()),
|
||||
('author_user', djangoldp.fields.LDPUrlField()),
|
||||
('object', models.URLField()),
|
||||
('type', models.CharField(max_length=255)),
|
||||
('summary', models.TextField()),
|
||||
|
@ -4,6 +4,7 @@
|
||||
# from threading import Thread
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from djangoldp.fields import LDPUrlField
|
||||
from django.db.models.signals import post_save
|
||||
from django.dispatch import receiver
|
||||
from django.contrib.auth.models import User
|
||||
@ -11,7 +12,7 @@ from django.contrib.admin.models import LogEntry
|
||||
|
||||
class Notification(models.Model):
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='inbox')
|
||||
author_user = models.URLField()
|
||||
author_user = LDPUrlField()
|
||||
object = models.URLField()
|
||||
type = models.CharField(max_length=255)
|
||||
summary = models.TextField()
|
||||
|
@ -2,9 +2,9 @@
|
||||
from django.conf.urls import url
|
||||
from .models import Notification, Subscription
|
||||
from djangoldp.views import LDPViewSet
|
||||
from djangoldp.permissions import InboxPermissions
|
||||
#from djangoldp.permissions import InboxPermissions
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^notifications/', LDPViewSet.urls(model=Notification, permission_classes=(InboxPermissions,))),
|
||||
url(r'^notifications/', LDPViewSet.urls(model=Notification)), #permission_classes=(InboxPermissions,))),
|
||||
url(r'^subscriptions/', LDPViewSet.urls(model=Subscription)),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user