kepi and trilby_api both live under chapeau
(as chapeau.kepi and chapeau.trilby_api). Vast commit. It runs, but not all the tests have been converted to the new layout. Soon.trilby
|
@ -1,5 +1,5 @@
|
|||
*.pyc
|
||||
*.sw[op]
|
||||
*.sw?
|
||||
__pycache__
|
||||
.eggs
|
||||
.tox
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
include LICENSE
|
||||
include LICENSE.txt
|
||||
include README.md
|
||||
recursive-include django_chapeau *.py
|
||||
recursive-include django_chapeau/migrations *.py
|
||||
recursive-include django_chapeau/templates *.xml
|
||||
recursive-include chapeau *.py
|
||||
recursive-include chapeau *.xml
|
||||
|
|
|
@ -5,7 +5,7 @@ djcelery.setup_loader()
|
|||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
ROOT_URLCONF = 'chapeau.urls'
|
||||
ROOT_URLCONF = 'chapeau.chapeau.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ MIDDLEWARE = [
|
|||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django_kepi.middleware.add_headers',
|
||||
'chapeau.kepi.middleware.add_headers',
|
||||
]
|
||||
|
||||
INSTALLED_APPS = (
|
||||
|
@ -70,8 +70,8 @@ INSTALLED_APPS = (
|
|||
'django_fields',
|
||||
'polymorphic',
|
||||
|
||||
'django_kepi',
|
||||
'trilby_api',
|
||||
'chapeau.kepi',
|
||||
'chapeau.trilby_api',
|
||||
|
||||
)
|
||||
|
||||
|
@ -109,7 +109,7 @@ LOGGING = {
|
|||
},
|
||||
},
|
||||
'loggers': {
|
||||
'django_kepi': {
|
||||
'chapeau': {
|
||||
'handlers': ['console'],
|
||||
'level': 'DEBUG',
|
||||
},
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
from django.contrib import admin
|
||||
from django.urls import path, re_path, include
|
||||
from django.conf.urls.static import static
|
||||
import django_kepi.urls
|
||||
import trilby_api.urls
|
||||
import chapeau.kepi.urls
|
||||
import chapeau.trilby_api.urls
|
||||
from . import settings
|
||||
|
||||
urlpatterns = [
|
||||
path(r'admin/', admin.site.urls),
|
||||
# path('', kepi.views.FrontPageView.as_view()), # or something
|
||||
path(r'', include(django_kepi.urls)),
|
||||
path(r'', include(trilby_api.urls)),
|
||||
# path('', chapeau.tophat_ui.views.FrontPageView.as_view()), # or something
|
||||
path(r'', include(chapeau.kepi.urls)),
|
||||
path(r'', include(chapeau.trilby_api.urls)),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
|
|
|
@ -2,6 +2,6 @@ import os
|
|||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chapeau.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chapeau.chapeau.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 2.2.4 on 2019-09-15 19:11
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_kepi', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='acactor',
|
||||
name='f_preferredUsername',
|
||||
),
|
||||
]
|
|
@ -1,29 +0,0 @@
|
|||
# Generated by Django 2.2.4 on 2019-10-08 12:51
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_kepi', '0002_remove_acactor_f_preferredusername'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='acactor',
|
||||
name='f_name',
|
||||
field=models.TextField(default='', help_text='Your name, in human-friendly form. Something like "Alice Liddell".', verbose_name='name'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='acobject',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='acactor',
|
||||
name='f_summary',
|
||||
field=models.TextField(default='', help_text='Your biography. Something like "I enjoy falling down rabbitholes."', max_length=255, verbose_name='bio'),
|
||||
),
|
||||
]
|
|
@ -1,34 +0,0 @@
|
|||
# urls.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
"""
|
||||
These are URL patterns, to include from your app's urls.py.
|
||||
"""
|
||||
|
||||
from django.urls import path, re_path
|
||||
import django_kepi.views
|
||||
|
||||
urlpatterns = [
|
||||
re_path('^(?P<id>[0-9a-z]{8})$', django_kepi.views.ThingView.as_view()),
|
||||
path('users', django_kepi.views.AllUsersView.as_view()),
|
||||
path('users/<str:username>', django_kepi.views.ActorView.as_view()),
|
||||
path('users/<str:username>/inbox', django_kepi.views.InboxView.as_view(),
|
||||
{ 'listname': 'inbox', } ),
|
||||
path('users/<str:username>/outbox', django_kepi.views.OutboxView.as_view(),
|
||||
{ 'listname': 'outbox', } ),
|
||||
path('users/<str:username>/followers', django_kepi.views.FollowersView.as_view()),
|
||||
path('users/<str:username>/following', django_kepi.views.FollowingView.as_view()),
|
||||
path('sharedInbox', django_kepi.views.InboxView.as_view()),
|
||||
|
||||
# XXX We might want to split out the patterns that HAVE to be
|
||||
# at the root.
|
||||
|
||||
path('.well-known/host-meta', django_kepi.views.HostMeta.as_view()),
|
||||
path('.well-known/webfinger', django_kepi.views.Webfinger.as_view()),
|
||||
path('.well-known/nodeinfo', django_kepi.views.NodeinfoPart1.as_view()),
|
||||
path('nodeinfo.json', django_kepi.views.NodeinfoPart2.as_view()),
|
||||
]
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
__title__ = 'django_kepi'
|
||||
__title__ = 'chapeau.kepi'
|
||||
__version__ = '0.0.30'
|
||||
VERSION = __version__
|
||||
__author__ = 'Marnanel Thurman'
|
|
@ -1,6 +1,6 @@
|
|||
# admin.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -11,9 +11,9 @@ with kepi's models.
|
|||
|
||||
from django.contrib import admin
|
||||
from polymorphic.admin import *
|
||||
from django_kepi.models import *
|
||||
from django_kepi.validation import IncomingMessage
|
||||
import django_kepi.forms as kepi_forms
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.validation import IncomingMessage
|
||||
import chapeau.kepi.forms as kepi_forms
|
||||
|
||||
###################################
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import kepi.settings
|
||||
import chapeau.kepi.settings
|
||||
from django.core.management import get_commands, call_command
|
||||
from django.core.management.base import CommandError
|
||||
from django.conf import settings
|
|
@ -1,6 +1,6 @@
|
|||
# create.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon and library.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -8,11 +8,11 @@
|
|||
This module contains create(), which creates objects.
|
||||
"""
|
||||
|
||||
from django_kepi.models import *
|
||||
from chapeau.kepi.models import *
|
||||
import django.db.utils
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
def create(
|
||||
is_local_user=True,
|
||||
|
@ -46,8 +46,8 @@ def create(
|
|||
Don't confuse create() with objects of type Create!
|
||||
"""
|
||||
|
||||
from django_kepi.delivery import deliver
|
||||
from django_kepi.models.activity import AcActivity
|
||||
from chapeau.kepi.delivery import deliver
|
||||
from chapeau.kepi.models.activity import AcActivity
|
||||
|
||||
if value is None:
|
||||
value = {}
|
||||
|
@ -83,7 +83,7 @@ def create(
|
|||
|
||||
class_name = 'Ac'+value['type']
|
||||
try:
|
||||
import django_kepi.models as kepi_models
|
||||
import chapeau.kepi.models as kepi_models
|
||||
cls = getattr(locals()['kepi_models'], class_name)
|
||||
except AttributeError:
|
||||
logger.warn("There's no type called %s",
|
|
@ -1,6 +1,6 @@
|
|||
# crypto.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# delivery.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -11,8 +11,8 @@ to their audiences.
|
|||
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
from celery import shared_task
|
||||
from django_kepi.find import find, find_local, is_local
|
||||
import django_kepi.models
|
||||
from chapeau.kepi.find import find, find_local, is_local
|
||||
import chapeau.kepi.models
|
||||
from httpsig.verify import HeaderVerifier
|
||||
from urllib.parse import urlparse
|
||||
from django.http.request import HttpRequest
|
||||
|
@ -28,7 +28,7 @@ import httpsig
|
|||
from collections.abc import Iterable
|
||||
from . import PUBLIC_IDS
|
||||
|
||||
logger = logging.getLogger(name='django_kepi.delivery')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
def _rfc822_datetime(when=None):
|
||||
"""
|
||||
|
@ -55,7 +55,7 @@ def _find_local_actor(activity_form):
|
|||
the "attributedTo" field.
|
||||
"""
|
||||
|
||||
from django_kepi.models.acobject import AcObject
|
||||
from chapeau.kepi.models.acobject import AcObject
|
||||
|
||||
parts = None
|
||||
for fieldname in ['actor', 'attributedTo']:
|
||||
|
@ -216,8 +216,8 @@ def _activity_form_to_outgoing_string(activity_form):
|
|||
an HTTP response.
|
||||
"""
|
||||
|
||||
from django_kepi import ATSIGN_CONTEXT
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi import ATSIGN_CONTEXT
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
format_for_delivery = activity_form.copy()
|
||||
for blind_field in ['bto', 'bcc']:
|
||||
|
@ -403,8 +403,8 @@ def deliver(
|
|||
"""
|
||||
|
||||
try:
|
||||
activity = django_kepi.models.AcActivity.objects.get(id=activity_id)
|
||||
except django_kepi.models.AcActivity.DoesNotExist:
|
||||
activity = kepi.models.AcActivity.objects.get(id=activity_id)
|
||||
except kepi.models.AcActivity.DoesNotExist:
|
||||
logger.warn("Can't deliver activity %s because it doesn't exist",
|
||||
activity_id)
|
||||
return None
|
|
@ -1,6 +1,6 @@
|
|||
# find.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -15,12 +15,12 @@ from django.conf import settings
|
|||
import django.urls
|
||||
from urllib.parse import urlparse
|
||||
from django.http.request import HttpRequest
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.create import create
|
||||
from django.utils import timezone
|
||||
import json
|
||||
import mimeparse
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
def is_short_id(s):
|
||||
try:
|
||||
|
@ -150,7 +150,7 @@ def find_remote(url,
|
|||
its stated audiences. This is usually not what you want.
|
||||
"""
|
||||
|
||||
from django_kepi.models.acobject import AcObject
|
||||
from chapeau.kepi.models.acobject import AcObject
|
||||
|
||||
logger.debug('%s: find remote', url)
|
||||
|
||||
|
@ -284,7 +284,7 @@ def _short_id_lookup(number):
|
|||
|
||||
"""
|
||||
|
||||
from django_kepi.models import AcObject
|
||||
from chapeau.kepi.models import AcObject
|
||||
|
||||
try:
|
||||
result = AcObject.objects.get(
|
|
@ -1,6 +1,6 @@
|
|||
[
|
||||
{
|
||||
"model": "django_kepi.ActivityObject",
|
||||
"model": "kepi.ActivityObject",
|
||||
"pk": 1,
|
||||
"fields": {
|
||||
"a_type": "Object",
|
||||
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"model": "django_kepi.ActivityObject",
|
||||
"model": "kepi.ActivityObject",
|
||||
"pk": 2,
|
||||
"fields": {
|
||||
"a_type": "Object",
|
||||
|
@ -16,7 +16,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"model": "django_kepi.ActivityObject",
|
||||
"model": "kepi.ActivityObject",
|
||||
"pk": 3,
|
||||
"fields": {
|
||||
"a_type": "Person",
|
|
@ -1,6 +1,6 @@
|
|||
# forms.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -10,7 +10,7 @@ the admin interface. It's not very elaborate yet.
|
|||
"""
|
||||
|
||||
from django import forms
|
||||
import django_kepi.models as kepi_models
|
||||
import chapeau.kepi.models as kepi_models
|
||||
|
||||
class PersonAdminForm(forms.ModelForm):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django_kepi.models import *
|
||||
from chapeau.kepi.models import *
|
||||
from django.conf import settings
|
||||
import logging
|
||||
import os
|
||||
|
@ -7,7 +7,7 @@ import re
|
|||
|
||||
ENVIRON_USER = 'KEPI_USER'
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class KepiCommand(BaseCommand):
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand, objects_by_keywords
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand, objects_by_keywords
|
||||
import os
|
||||
import logging
|
||||
import json
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand
|
||||
import os
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand
|
||||
import os
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand
|
||||
import os
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand, objects_by_keywords
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand, objects_by_keywords
|
||||
from collections import abc
|
||||
import os
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
||||
|
@ -128,7 +128,7 @@ class Command(KepiCommand):
|
|||
|
||||
def _show_json(self, thing, *args, **options):
|
||||
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
print(as_json(thing.activity_form))
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.management import KepiCommand
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.management import KepiCommand
|
||||
import os
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Command(KepiCommand):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# middleware.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 2.2.4 on 2019-09-15 17:53
|
||||
# Generated by Django 2.2.4 on 2019-10-09 15:38
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
@ -20,7 +20,8 @@ class Migration(migrations.Migration):
|
|||
fields=[
|
||||
('id', models.CharField(default=None, editable=False, max_length=255, primary_key=True, serialize=False, unique=True)),
|
||||
('published', models.DateTimeField(default=django.utils.timezone.now)),
|
||||
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_django_kepi.acobject_set+', to='contenttypes.ContentType')),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_kepi.acobject_set+', to='contenttypes.ContentType')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
|
@ -68,24 +69,24 @@ class Migration(migrations.Migration):
|
|||
migrations.CreateModel(
|
||||
name='AcActivity',
|
||||
fields=[
|
||||
('acobject_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcObject')),
|
||||
('acobject_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcObject')),
|
||||
('f_actor', models.CharField(blank=True, default=None, max_length=255, null=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'activity',
|
||||
'verbose_name_plural': 'activities',
|
||||
},
|
||||
bases=('django_kepi.acobject',),
|
||||
bases=('kepi.acobject',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcActor',
|
||||
fields=[
|
||||
('acobject_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcObject')),
|
||||
('acobject_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcObject')),
|
||||
('privateKey', models.TextField(blank=True, null=True)),
|
||||
('f_name', models.TextField(help_text='Your name, in human-friendly form. Something like "Alice Liddell".', verbose_name='name')),
|
||||
('f_publicKey', models.TextField(blank=True, null=True, verbose_name='public key')),
|
||||
('auto_follow', models.BooleanField(default=True, help_text='If True, follow requests will be accepted automatically.')),
|
||||
('f_preferredUsername', models.CharField(help_text="Something short, like 'alice'.", max_length=255, verbose_name='username')),
|
||||
('f_summary', models.TextField(default='', help_text="Your biography. Something like 'I enjoy falling down rabbitholes.'", max_length=255, verbose_name='bio')),
|
||||
('f_summary', models.TextField(default='', help_text='Your biography. Something like "I enjoy falling down rabbitholes."', max_length=255, verbose_name='bio')),
|
||||
('icon', models.ImageField(help_text='A small square image used to identify you.', null=True, upload_to='', verbose_name='icon')),
|
||||
('header', models.ImageField(help_text="A large image, wider than it's tall, which appears at the top of your profile page.", null=True, upload_to='', verbose_name='header image')),
|
||||
],
|
||||
|
@ -93,12 +94,12 @@ class Migration(migrations.Migration):
|
|||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acobject',),
|
||||
bases=('kepi.acobject',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcItem',
|
||||
fields=[
|
||||
('acobject_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcObject')),
|
||||
('acobject_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcObject')),
|
||||
('f_content', models.CharField(blank=True, max_length=255)),
|
||||
('f_attributedTo', models.CharField(blank=True, max_length=255)),
|
||||
],
|
||||
|
@ -106,7 +107,7 @@ class Migration(migrations.Migration):
|
|||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acobject',),
|
||||
bases=('kepi.acobject',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ThingField',
|
||||
|
@ -114,7 +115,7 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('field', models.CharField(max_length=255)),
|
||||
('value', models.CharField(blank=True, default=None, max_length=255, null=True)),
|
||||
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_kepi.AcObject')),
|
||||
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kepi.AcObject')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -122,15 +123,15 @@ class Migration(migrations.Migration):
|
|||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('to_actor', models.CharField(max_length=255)),
|
||||
('from_status', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='django_kepi.AcObject')),
|
||||
('from_status', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='kepi.AcObject')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CollectionMember',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('member', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='django_kepi.AcObject')),
|
||||
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_kepi.Collection')),
|
||||
('member', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='kepi.AcObject')),
|
||||
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kepi.Collection')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
|
@ -139,304 +140,304 @@ class Migration(migrations.Migration):
|
|||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('field', models.PositiveSmallIntegerField(choices=[(1, 'audience'), (2, 'to'), (4, 'cc'), (114, 'bto'), (116, 'bcc')])),
|
||||
('recipient', models.CharField(max_length=255)),
|
||||
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_kepi.AcObject')),
|
||||
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kepi.AcObject')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcAccept',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcAdd',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcAnnounce',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcApplication',
|
||||
fields=[
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActor')),
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActor')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactor',),
|
||||
bases=('kepi.acactor',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcArticle',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcAudio',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcCreate',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcDelete',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcDocument',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcEvent',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcFollow',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcGroup',
|
||||
fields=[
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActor')),
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActor')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactor',),
|
||||
bases=('kepi.acactor',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcImage',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcLike',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcNote',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'note',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcOrganization',
|
||||
fields=[
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActor')),
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActor')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactor',),
|
||||
bases=('kepi.acactor',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcPage',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcPerson',
|
||||
fields=[
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActor')),
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActor')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'person',
|
||||
'verbose_name_plural': 'people',
|
||||
},
|
||||
bases=('django_kepi.acactor',),
|
||||
bases=('kepi.acactor',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcPlace',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcProfile',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcReject',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcRelationship',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcRemove',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcService',
|
||||
fields=[
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActor')),
|
||||
('acactor_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActor')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactor',),
|
||||
bases=('kepi.acactor',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcUndo',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcUpdate',
|
||||
fields=[
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcActivity')),
|
||||
('acactivity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcActivity')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acactivity',),
|
||||
bases=('kepi.acactivity',),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AcVideo',
|
||||
fields=[
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='django_kepi.AcItem')),
|
||||
('acitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kepi.AcItem')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'base_manager_name': 'objects',
|
||||
},
|
||||
bases=('django_kepi.acitem',),
|
||||
bases=('kepi.acitem',),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='thingfield',
|
||||
|
@ -445,7 +446,7 @@ class Migration(migrations.Migration):
|
|||
migrations.AddField(
|
||||
model_name='collection',
|
||||
name='owner',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='django_kepi.AcActor'),
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='kepi.AcActor'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='collection',
|
|
@ -3,17 +3,17 @@ from django.conf import settings
|
|||
from django.utils import timezone
|
||||
from polymorphic.models import PolymorphicModel
|
||||
from polymorphic.managers import PolymorphicManager
|
||||
from django_kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from django_kepi.models.thingfield import ThingField
|
||||
from django_kepi.models.mention import Mention
|
||||
from chapeau.kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from chapeau.kepi.models.thingfield import ThingField
|
||||
from chapeau.kepi.models.mention import Mention
|
||||
from .. import URL_REGEXP, SERIAL_NUMBER_REGEXP
|
||||
import django_kepi.side_effects as side_effects
|
||||
import chapeau.kepi.side_effects as side_effects
|
||||
import logging
|
||||
import random
|
||||
import warnings
|
||||
import re
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
######################
|
||||
|
||||
|
@ -144,7 +144,7 @@ class AcObject(PolymorphicModel):
|
|||
@property
|
||||
def activity_form(self):
|
||||
|
||||
from django_kepi.find import short_id_to_url
|
||||
from chapeau.kepi.find import short_id_to_url
|
||||
|
||||
result = {
|
||||
'id': self.url,
|
||||
|
@ -181,7 +181,7 @@ class AcObject(PolymorphicModel):
|
|||
|
||||
def __getitem__(self, name):
|
||||
|
||||
from django_kepi.find import find
|
||||
from chapeau.kepi.find import find
|
||||
|
||||
name_parts = name.split('__')
|
||||
name = name_parts.pop(0)
|
||||
|
@ -257,7 +257,7 @@ class AcObject(PolymorphicModel):
|
|||
)
|
||||
else:
|
||||
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
if self.pk is None:
|
||||
# See above
|
||||
|
@ -296,8 +296,8 @@ class AcObject(PolymorphicModel):
|
|||
|
||||
def run_side_effects(self):
|
||||
|
||||
from django_kepi.find import find
|
||||
from django_kepi.delivery import deliver
|
||||
from chapeau.kepi.find import find
|
||||
from chapeau.kepi.delivery import deliver
|
||||
|
||||
f_type = self.f_type.lower()
|
||||
|
||||
|
@ -402,7 +402,7 @@ class AcObject(PolymorphicModel):
|
|||
find() would ignore these.
|
||||
"""
|
||||
|
||||
from django_kepi.find import find
|
||||
from chapeau.kepi.find import find
|
||||
|
||||
logger.debug(' -- finding object with url %s', url)
|
||||
result = find(url,
|
|
@ -2,7 +2,7 @@ from django.db import models
|
|||
from . import acobject
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
######################
|
||||
|
||||
|
@ -23,8 +23,8 @@ class AcActivity(acobject.AcObject):
|
|||
|
||||
def go_into_outbox_if_local(self):
|
||||
|
||||
from django_kepi.models.collection import Collection
|
||||
from django_kepi.find import find
|
||||
from chapeau.kepi.models.collection import Collection
|
||||
from chapeau.kepi.find import find
|
||||
|
||||
if not self.is_local:
|
||||
return
|
|
@ -1,11 +1,11 @@
|
|||
from django.db import models
|
||||
from django.conf import settings
|
||||
from . import acobject
|
||||
import django_kepi.crypto
|
||||
import chapeau.kepi.crypto
|
||||
import logging
|
||||
import re
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
LIST_NAMES = [
|
||||
'inbox', 'outbox', 'followers', 'following',
|
||||
|
@ -84,7 +84,7 @@ class AcActor(acobject.AcObject):
|
|||
logger.info('%s: generating key pair.',
|
||||
self.url)
|
||||
|
||||
key = django_kepi.crypto.Key()
|
||||
key = kepi.crypto.Key()
|
||||
self.privateKey = key.private_as_pem()
|
||||
self.f_publicKey = key.public_as_pem()
|
||||
self.save()
|
||||
|
@ -122,7 +122,7 @@ class AcActor(acobject.AcObject):
|
|||
|
||||
elif name=='publicKey':
|
||||
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
self.f_publicKey = as_json(value,
|
||||
indent=None)
|
|
@ -3,7 +3,7 @@ from collections import defaultdict
|
|||
from .. import PUBLIC_IDS
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger('django_kepi')
|
||||
logger = logging.getLogger('chapeau')
|
||||
|
||||
FIELD_AUDIENCE = 0x01 # literally "audience"
|
||||
FIELD_TO = 0x02
|
||||
|
@ -28,7 +28,7 @@ AUDIENCE_FIELD_KEYS = set([v for (f,v) in FIELD_CHOICES])
|
|||
class Audience(models.Model):
|
||||
|
||||
parent = models.ForeignKey(
|
||||
'django_kepi.AcObject',
|
||||
'kepi.AcObject',
|
||||
on_delete = models.CASCADE,
|
||||
)
|
||||
|
|
@ -2,12 +2,12 @@ from django.db import models
|
|||
from django.conf import settings
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class Collection(models.Model):
|
||||
|
||||
owner = models.ForeignKey(
|
||||
'django_kepi.AcActor',
|
||||
'kepi.AcActor',
|
||||
on_delete = models.DO_NOTHING,
|
||||
)
|
||||
|
||||
|
@ -51,7 +51,7 @@ class Collection(models.Model):
|
|||
def get(cls, name,
|
||||
create_if_missing=True):
|
||||
|
||||
from django_kepi.models.actor import AcActor
|
||||
from chapeau.kepi.models.actor import AcActor
|
||||
|
||||
try:
|
||||
username, collectionname = name.split('/')
|
||||
|
@ -141,7 +141,7 @@ class CollectionMember(models.Model):
|
|||
)
|
||||
|
||||
member = models.ForeignKey(
|
||||
'django_kepi.AcObject',
|
||||
'kepi.AcObject',
|
||||
on_delete = models.DO_NOTHING,
|
||||
)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from django.db import models
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class Following(models.Model):
|
||||
|
|
@ -4,7 +4,7 @@ from .. import PUBLIC_IDS
|
|||
from django.conf import settings
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
######################
|
||||
|
||||
|
@ -23,7 +23,7 @@ class AcItem(acobject.AcObject):
|
|||
@property
|
||||
def visibility(self):
|
||||
|
||||
from django_kepi.find import find
|
||||
from chapeau.kepi.find import find
|
||||
|
||||
audiences = audience.Audience.get_audiences_for(self)
|
||||
logger.debug('%s: checking visibility in audiences: %s',
|
||||
|
@ -90,7 +90,7 @@ class AcItem(acobject.AcObject):
|
|||
@property
|
||||
def thread(self):
|
||||
|
||||
from django_kepi.find import find
|
||||
from chapeau.kepi.find import find
|
||||
|
||||
if hasattr(self, '_thread'):
|
||||
return self._thread
|
||||
|
@ -145,7 +145,7 @@ class AcItem(acobject.AcObject):
|
|||
|
||||
@property
|
||||
def mentions(self):
|
||||
from django_kepi.models.mention import Mention
|
||||
from chapeau.kepi.models.mention import Mention
|
||||
|
||||
logger.info('Finding Mentions for %s', self)
|
||||
return set([x.to_actor for x in
|
|
@ -1,14 +1,14 @@
|
|||
from django.db import models
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
######################
|
||||
|
||||
class Mention(models.Model):
|
||||
|
||||
from_status = models.ForeignKey(
|
||||
'django_kepi.AcObject',
|
||||
'kepi.AcObject',
|
||||
on_delete = models.DO_NOTHING,
|
||||
)
|
||||
|
|
@ -2,7 +2,7 @@ from django.db import models
|
|||
import logging
|
||||
import json
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class ThingField(models.Model):
|
||||
|
||||
|
@ -26,7 +26,7 @@ class ThingField(models.Model):
|
|||
)
|
||||
|
||||
parent = models.ForeignKey(
|
||||
'django_kepi.AcObject',
|
||||
'kepi.AcObject',
|
||||
on_delete = models.CASCADE,
|
||||
)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# side_effects.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -13,14 +13,14 @@ the new activity as a parameter.
|
|||
|
||||
import logging
|
||||
from django.conf import settings
|
||||
from django_kepi.find import find, is_local
|
||||
from django_kepi.delivery import deliver
|
||||
from chapeau.kepi.find import find, is_local
|
||||
from chapeau.kepi.delivery import deliver
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
def accept(activity):
|
||||
|
||||
from django_kepi.models.following import Following
|
||||
from chapeau.kepi.models.following import Following
|
||||
|
||||
obj = activity['object__obj']
|
||||
|
||||
|
@ -40,8 +40,8 @@ def accept(activity):
|
|||
|
||||
def follow(activity):
|
||||
|
||||
from django_kepi.models.following import Following
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.models.following import Following
|
||||
from chapeau.kepi.create import create
|
||||
|
||||
if not is_local(activity['object']):
|
||||
logger.info('Following a remote user has no local side-effects.')
|
||||
|
@ -82,7 +82,7 @@ def follow(activity):
|
|||
|
||||
def reject(activity):
|
||||
|
||||
from django_kepi.models.following import Following
|
||||
from chapeau.kepi.models.following import Following
|
||||
|
||||
obj = activity['object__obj']
|
||||
|
||||
|
@ -102,9 +102,9 @@ def reject(activity):
|
|||
|
||||
def create(activity):
|
||||
|
||||
import django_kepi.models as kepi_models
|
||||
from django_kepi.create import create as kepi_create
|
||||
from django_kepi.models.audience import AUDIENCE_FIELD_KEYS
|
||||
import chapeau.kepi.models as kepi_models
|
||||
from chapeau.kepi.create import create as kepi_create
|
||||
from chapeau.kepi.models.audience import AUDIENCE_FIELD_KEYS
|
||||
|
||||
raw_material = activity['object'].copy()
|
||||
|
||||
|
@ -157,7 +157,7 @@ def create(activity):
|
|||
|
||||
def it_is_relevant(something, activity):
|
||||
|
||||
from django_kepi.models import Audience
|
||||
from chapeau.kepi.models import Audience
|
||||
|
||||
logger.debug('Checking whether the new object is relevant to us.')
|
||||
|
Przed Szerokość: | Wysokość: | Rozmiar: 95 KiB Po Szerokość: | Wysokość: | Rozmiar: 95 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 8.2 KiB Po Szerokość: | Wysokość: | Rozmiar: 8.2 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 8.3 KiB Po Szerokość: | Wysokość: | Rozmiar: 8.3 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 8.7 KiB Po Szerokość: | Wysokość: | Rozmiar: 8.7 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 9.9 KiB Po Szerokość: | Wysokość: | Rozmiar: 9.9 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 9.9 KiB Po Szerokość: | Wysokość: | Rozmiar: 9.9 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 58 KiB Po Szerokość: | Wysokość: | Rozmiar: 58 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 5.3 KiB Po Szerokość: | Wysokość: | Rozmiar: 5.3 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 9.1 KiB Po Szerokość: | Wysokość: | Rozmiar: 9.1 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 58 KiB Po Szerokość: | Wysokość: | Rozmiar: 58 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 124 KiB Po Szerokość: | Wysokość: | Rozmiar: 124 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 129 KiB Po Szerokość: | Wysokość: | Rozmiar: 129 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 18 KiB Po Szerokość: | Wysokość: | Rozmiar: 18 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 272 KiB Po Szerokość: | Wysokość: | Rozmiar: 272 KiB |
Przed Szerokość: | Wysokość: | Rozmiar: 9.1 KiB Po Szerokość: | Wysokość: | Rozmiar: 9.1 KiB |
|
@ -0,0 +1,34 @@
|
|||
# urls.py
|
||||
#
|
||||
# Part of an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
"""
|
||||
These are URL patterns, to include from your app's urls.py.
|
||||
"""
|
||||
|
||||
from django.urls import path, re_path
|
||||
import chapeau.kepi.views as kepi_views
|
||||
|
||||
urlpatterns = [
|
||||
re_path('^(?P<id>[0-9a-z]{8})$', kepi_views.ThingView.as_view()),
|
||||
path('users', kepi_views.AllUsersView.as_view()),
|
||||
path('users/<str:username>', kepi_views.ActorView.as_view()),
|
||||
path('users/<str:username>/inbox', kepi_views.InboxView.as_view(),
|
||||
{ 'listname': 'inbox', } ),
|
||||
path('users/<str:username>/outbox', kepi_views.OutboxView.as_view(),
|
||||
{ 'listname': 'outbox', } ),
|
||||
path('users/<str:username>/followers', kepi_views.FollowersView.as_view()),
|
||||
path('users/<str:username>/following', kepi_views.FollowingView.as_view()),
|
||||
path('sharedInbox', kepi_views.InboxView.as_view()),
|
||||
|
||||
# XXX We might want to split out the patterns that HAVE to be
|
||||
# at the root.
|
||||
|
||||
path('.well-known/host-meta', kepi_views.HostMeta.as_view()),
|
||||
path('.well-known/webfinger', kepi_views.Webfinger.as_view()),
|
||||
path('.well-known/nodeinfo', kepi_views.NodeinfoPart1.as_view()),
|
||||
path('nodeinfo.json', kepi_views.NodeinfoPart2.as_view()),
|
||||
]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# validation.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -17,11 +17,11 @@ import uuid
|
|||
import re
|
||||
from django.conf import settings
|
||||
from urllib.parse import urlparse
|
||||
import django_kepi.find
|
||||
import chapeau.kepi.find
|
||||
import django.core.exceptions
|
||||
from httpsig.verify import HeaderVerifier
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class IncomingMessage(models.Model):
|
||||
|
||||
|
@ -157,8 +157,8 @@ def _run_validation(
|
|||
that was generated by validate().
|
||||
"""
|
||||
|
||||
from django_kepi.delivery import deliver
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.delivery import deliver
|
||||
from chapeau.kepi.create import create
|
||||
|
||||
logger.info('%s: begin validation',
|
||||
message_id)
|
||||
|
@ -179,7 +179,7 @@ def _run_validation(
|
|||
return None
|
||||
|
||||
try:
|
||||
actor = django_kepi.find.find(message.actor)
|
||||
actor = kepi.find.find(message.actor)
|
||||
except json.decoder.JSONDecodeError as jde:
|
||||
logger.info('%s: invalid JSON; dropping: %s',
|
||||
message, jde)
|
|
@ -22,4 +22,4 @@ ACTIVITY_STORE passes another object to the object represented by the URL.
|
|||
For example, passing a "Like" object to ``https://yourserver/users/alice/inbox`` would add
|
||||
the "Like" to Alice's inbox.
|
||||
|
||||
django_kepi.find() makes extensive use of the ACTIVITY methods.
|
||||
kepi.find() makes extensive use of the ACTIVITY methods.
|
|
@ -1,6 +1,6 @@
|
|||
# views/activitypub.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -13,23 +13,23 @@ Everything ends up here if it doesn't have a particular
|
|||
place to go.
|
||||
"""
|
||||
|
||||
from django_kepi import ATSIGN_CONTEXT
|
||||
import django_kepi.validation
|
||||
from django_kepi.find import find, is_local, short_id_to_url
|
||||
from chapeau.kepi import ATSIGN_CONTEXT
|
||||
import chapeau.kepi.validation
|
||||
from chapeau.kepi.find import find, is_local, short_id_to_url
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
import django.views
|
||||
from django.http import HttpResponse, JsonResponse, Http404
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.conf import settings
|
||||
from django_kepi.models import *
|
||||
from django_kepi.validation import validate
|
||||
from chapeau.kepi.models import *
|
||||
from chapeau.kepi.validation import validate
|
||||
from collections.abc import Iterable
|
||||
import logging
|
||||
import urllib.parse
|
||||
import json
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
PAGE_LENGTH = 50
|
||||
PAGE_FIELD = 'page'
|
||||
|
@ -339,7 +339,7 @@ class ActorView(ThingView):
|
|||
|
||||
def activity_store(self, request, *args, **kwargs):
|
||||
|
||||
from django_kepi.models.collection import Collection
|
||||
from chapeau.kepi.models.collection import Collection
|
||||
|
||||
inbox_name = Collection.build_name(
|
||||
username = kwargs['username'],
|
||||
|
@ -464,7 +464,7 @@ class UserCollectionView(KepiView):
|
|||
listname,
|
||||
*args, **kwargs):
|
||||
|
||||
from django_kepi.models.collection import Collection, CollectionMember
|
||||
from chapeau.kepi.models.collection import Collection, CollectionMember
|
||||
|
||||
logger.debug('Finding user %s\'s %s collection',
|
||||
username, listname)
|
||||
|
@ -496,7 +496,7 @@ class UserCollectionView(KepiView):
|
|||
listname,
|
||||
*args, **kwargs):
|
||||
|
||||
from django_kepi.models.collection import Collection, CollectionMember
|
||||
from chapeau.kepi.models.collection import Collection, CollectionMember
|
||||
|
||||
logger.debug('Finding user %s\'s %s collection',
|
||||
username, listname)
|
||||
|
@ -568,7 +568,7 @@ class InboxView(UserCollectionView):
|
|||
def activity_store(self, request,
|
||||
username=None, *args, **kwargs):
|
||||
|
||||
from django_kepi.delivery import deliver
|
||||
from chapeau.kepi.delivery import deliver
|
||||
|
||||
if username is None:
|
||||
logger.info(' -- storing into the shared inbox')
|
|
@ -1,6 +1,6 @@
|
|||
# views/host_meta.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -14,7 +14,7 @@ import django.views
|
|||
from django.shortcuts import render
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class HostMeta(django.views.View):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# views/nodeinfo.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -14,12 +14,12 @@ import django.views
|
|||
from django.conf import settings
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse
|
||||
from django_kepi import __version__
|
||||
from chapeau.kepi import __version__
|
||||
import logging
|
||||
import re
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class NodeinfoPart1(django.views.View):
|
||||
"""
|
|
@ -1,6 +1,6 @@
|
|||
# views/webfinger.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -13,14 +13,14 @@ for the full details.
|
|||
import django.views
|
||||
from django.conf import settings
|
||||
from django.shortcuts import render
|
||||
from django_kepi.models.actor import AcActor
|
||||
from chapeau.kepi.models.actor import AcActor
|
||||
from django.http import HttpResponse
|
||||
import logging
|
||||
import re
|
||||
import json
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
class Webfinger(django.views.View):
|
||||
"""
|
|
@ -1,7 +1,7 @@
|
|||
from django_kepi.create import create
|
||||
from django_kepi.validation import IncomingMessage, validate
|
||||
from django_kepi.models import AcObject, AcActor
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.validation import IncomingMessage, validate
|
||||
from chapeau.kepi.models import AcObject, AcActor
|
||||
from chapeau.kepi.utils import as_json
|
||||
from django.conf import settings
|
||||
import django.test
|
||||
import httpretty
|
||||
|
@ -33,7 +33,7 @@ PUBLIC = "https://www.w3.org/ns/activitystreams#Public"
|
|||
|
||||
CONTEXT_URL = "https://www.w3.org/ns/activitystreams"
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
def create_local_person(name='jemima',
|
||||
load_default_keys_from='tests/keys/keys-0003.json',
|
||||
|
@ -368,7 +368,7 @@ def remote_user(url, name,
|
|||
|
||||
def remote_object_is_recorded(url):
|
||||
|
||||
from django_kepi.models import AcObject
|
||||
from chapeau.kepi.models import AcObject
|
||||
|
||||
try:
|
||||
result = AcObject.objects.get(id=url)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from io import StringIO
|
||||
from django.test import TestCase
|
||||
from django.core.management import call_command
|
||||
from django_kepi.models import *
|
||||
from chapeau.kepi.models import *
|
||||
from .. import create_local_person
|
||||
|
||||
class KepiPostTest(TestCase):
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from django.test import TestCase
|
||||
from tests import create_local_note, create_local_person
|
||||
from django_kepi.create import create
|
||||
from django_kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from django_kepi.models.mention import Mention
|
||||
from django_kepi.models.item import AcItem
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from chapeau.kepi.models.mention import Mention
|
||||
from chapeau.kepi.models.item import AcItem
|
||||
from .. import create_local_person
|
||||
import logging
|
||||
import json
|
||||
|
@ -12,7 +12,7 @@ from django.conf import settings
|
|||
REMOTE_ALICE = 'https://somewhere.example.com/users/alice'
|
||||
LOCAL_FRED = 'https://testserver/users/fred'
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestCreate(TestCase):
|
||||
|
||||
|
@ -306,7 +306,7 @@ class TestCreate(TestCase):
|
|||
|
||||
def test_when_sender_is_followed_by_local_users(self):
|
||||
|
||||
from django_kepi.models.following import Following
|
||||
from chapeau.kepi.models.following import Following
|
||||
|
||||
local_user = create_local_person()
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from tests import create_local_note, create_local_person
|
||||
from unittest import skip
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.create import create
|
||||
from django.test import TestCase
|
||||
|
||||
class TestLike(TestCase):
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
from django.test import TestCase
|
||||
from tests import create_local_note, create_local_person
|
||||
from unittest import skip
|
||||
from django_kepi.create import create
|
||||
from django_kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.models import *
|
||||
import logging
|
||||
|
||||
SENDER_ID = 'https://example.com/actor'
|
||||
SENDER_DOMAIN = 'example.com'
|
||||
SENDER_FOLLOWERS = 'https://example.com/followers'
|
||||
|
||||
logger = logging.getLogger(name='tests')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
# XXX Why does this only test updating of profiles?
|
||||
# XXX I thought we should update items as well.
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# test_activity.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
from django.test import TestCase
|
||||
from django_kepi.models import AcObject, AcActivity
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.models import AcObject, AcActivity
|
||||
from chapeau.kepi.create import create
|
||||
from unittest import skip
|
||||
from . import remote_object_is_recorded, create_local_person
|
||||
import logging
|
||||
|
||||
logger = logging.Logger("django_kepi")
|
||||
logger = logging.Logger(name='chapeau')
|
||||
|
||||
REMOTE_ID_1 = 'https://users.example.com/activity/1'
|
||||
REMOTE_ID_2 = 'https://users.example.com/item/2'
|
||||
|
@ -39,7 +39,7 @@ class TestAcObject(TestCase):
|
|||
|
||||
def test_remote_no_id(self):
|
||||
|
||||
from django_kepi.models import AcObject
|
||||
from chapeau.kepi.models import AcObject
|
||||
|
||||
create(
|
||||
f_type = "Create",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.test import TestCase
|
||||
from django_kepi.models import Audience
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.models import Audience
|
||||
from chapeau.kepi.create import create
|
||||
from . import create_local_person, REMOTE_FRED, REMOTE_JIM
|
||||
|
||||
class TestAudience(TestCase):
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
from django.test import TestCase, Client
|
||||
from unittest import skip
|
||||
from django_kepi.models import *
|
||||
from chapeau.kepi.models import *
|
||||
import datetime
|
||||
import json
|
||||
from django_kepi.find import find
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.find import find
|
||||
from chapeau.kepi.utils import as_json
|
||||
from . import *
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('django_kepi')
|
||||
logger = logging.Logger('chapeau')
|
||||
|
||||
EXAMPLE_SERVER = 'http://testserver'
|
||||
JSON_TYPE = 'application/activity+json; charset=utf-8'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# test_deliver.py
|
||||
#
|
||||
# Part of kepi, an ActivityPub daemon and library.
|
||||
# Part of chapeau, an ActivityPub daemon.
|
||||
# Copyright (c) 2018-2019 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
|
@ -9,10 +9,10 @@
|
|||
|
||||
from django.test import TestCase, Client
|
||||
from django.conf import settings
|
||||
from django_kepi.delivery import deliver
|
||||
from django_kepi.create import create
|
||||
from django_kepi.models import AcObject
|
||||
import django_kepi.views
|
||||
from chapeau.kepi.delivery import deliver
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.models import AcObject
|
||||
import chapeau.kepi.views as kepi_views
|
||||
from unittest.mock import Mock, patch
|
||||
from . import *
|
||||
import logging
|
||||
|
@ -24,7 +24,7 @@ import requests
|
|||
# FIXME test caching
|
||||
# FIXME test invalid keys
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
REMOTE_PATH_NAMES = {
|
||||
'/users/fred/inbox': 'fred',
|
||||
|
@ -93,7 +93,7 @@ class TestDelivery(TestCase):
|
|||
privateKey = keys['private'])
|
||||
create_local_person(name='bob')
|
||||
|
||||
@patch.object(django_kepi.views.activitypub.ActorView, 'activity_store')
|
||||
@patch.object(kepi_views.activitypub.ActorView, 'activity_store')
|
||||
@httpretty.activate
|
||||
def _test_delivery(self,
|
||||
fake_local_request,
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
from django.test import TestCase
|
||||
from django_kepi.find import find
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.find import find
|
||||
from chapeau.kepi.create import create
|
||||
from django.conf import settings
|
||||
from . import *
|
||||
import httpretty
|
||||
import json
|
||||
import logging
|
||||
from django_kepi.utils import as_json
|
||||
from chapeau.kepi.utils import as_json
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
REMOTE_URL = 'https://remote.example.net/fnord'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import json
|
|||
HOST_META_URL = 'https://altair.example.com/.well-known/host-meta'
|
||||
HOST_META_MIME_TYPE = 'application/xrd+xml'
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestHostMeta(TestCase):
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import json
|
|||
HOST_META_URL = 'https://altair.example.com/.well-known/host-meta'
|
||||
HOST_META_MIME_TYPE = 'application/xrd+xml'
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestHostMeta(TestCase):
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ NODEINFO_PART_1_URL = 'http://testserver/.well-known/nodeinfo'
|
|||
NODEINFO_PART_2_URL = 'http://testserver/nodeinfo.json'
|
||||
MIME_TYPE = 'application/json; profile=http://nodeinfo.diaspora.software/ns/schema/2.0#'
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestNodeinfo(TestCase):
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from django.test import TestCase
|
||||
from unittest import skip
|
||||
from django_kepi.create import create
|
||||
from django_kepi.models import *
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.models import *
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(name='tests')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestPolymorph(TestCase):
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.conf import settings
|
||||
from django.test import TestCase, Client
|
||||
from django_kepi.create import create
|
||||
from chapeau.kepi.create import create
|
||||
from . import create_local_person
|
||||
import httpretty
|
||||
import logging
|
||||
|
@ -12,7 +12,7 @@ OUTBOX_PATH = '/users/alice/outbox'
|
|||
|
||||
MIME_TYPE = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
VICTORIA_WOOD = {
|
||||
"type": "Create",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
from django.test import TestCase
|
||||
from unittest import skip
|
||||
from tests import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from django_kepi.models.mention import Mention
|
||||
from django_kepi.models.item import AcItem
|
||||
from django_kepi.models.following import Following
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from chapeau.kepi.models.mention import Mention
|
||||
from chapeau.kepi.models.item import AcItem
|
||||
from chapeau.kepi.models.following import Following
|
||||
from django.test import Client
|
||||
from urllib.parse import urlparse
|
||||
import httpretty
|
||||
|
@ -43,7 +43,7 @@ OBJECT_FORM = {
|
|||
MIME_TYPE = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
|
||||
INVALID_UTF8 = b"\xa0\xa1"
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestInbox2(TestCase):
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
from django.test import TestCase
|
||||
from unittest import skip
|
||||
from tests import *
|
||||
from django_kepi.create import create
|
||||
from django_kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from django_kepi.models.mention import Mention
|
||||
from django_kepi.models.item import AcItem
|
||||
from django_kepi.models.acobject import AcObject
|
||||
from django_kepi.models.activity import AcActivity
|
||||
from chapeau.kepi.create import create
|
||||
from chapeau.kepi.models.audience import Audience, AUDIENCE_FIELD_NAMES
|
||||
from chapeau.kepi.models.mention import Mention
|
||||
from chapeau.kepi.models.item import AcItem
|
||||
from chapeau.kepi.models.acobject import AcObject
|
||||
from chapeau.kepi.models.activity import AcActivity
|
||||
from django.test import Client
|
||||
from urllib.parse import urlparse
|
||||
import httpretty
|
||||
|
@ -44,7 +44,7 @@ CREATE_FORM = {
|
|||
'object': OBJECT_FORM,
|
||||
}
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestOutbox(TestCase):
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from django.test import TestCase, Client
|
||||
from django_kepi.validation import IncomingMessage, validate
|
||||
from django_kepi.models import AcObject
|
||||
from chapeau.kepi.validation import IncomingMessage, validate
|
||||
from chapeau.kepi.models import AcObject
|
||||
from unittest import skip
|
||||
import httpretty
|
||||
from . import *
|
||||
|
@ -13,7 +13,7 @@ import json
|
|||
# FIXME test caching
|
||||
# FIXME test invalid keys
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
ACTIVITY_ID = "https://example.com/04b065f8-81c4-408e-bec3-9fb1f7c06408"
|
||||
INBOX_HOST = 'europa.example.com'
|
||||
|
|
|
@ -3,7 +3,7 @@ from . import *
|
|||
import logging
|
||||
import json
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
def _response_to_dict(response):
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ WEBFINGER_BASE_URL = 'https://altair.example.com/.well-known/webfinger'
|
|||
WEBFINGER_URL = WEBFINGER_BASE_URL + '?resource={}'
|
||||
WEBFINGER_MIME_TYPE = 'application/jrd+json; charset=utf-8'
|
||||
|
||||
logger = logging.getLogger(name='django_kepi')
|
||||
logger = logging.getLogger(name='chapeau')
|
||||
|
||||
class TestWebfinger(TestCase):
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.contrib.auth.forms import UserChangeForm, UserCreationForm
|
||||
import trilby_api.models as models
|
||||
import chapeau.trilby_api.models as models
|
||||
|
||||
class TrilbyUserChangeForm(UserChangeForm):
|
||||
class Meta(UserChangeForm.Meta):
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Generated by Django 2.2.4 on 2019-10-04 20:57
|
||||
# Generated by Django 2.2.4 on 2019-10-09 15:38
|
||||
|
||||
import chapeau.trilby_api.models
|
||||
from django.conf import settings
|
||||
import django.contrib.auth.models
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
import trilby_api.models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -36,8 +36,8 @@ class Migration(migrations.Migration):
|
|||
('note', models.CharField(default='', max_length=255)),
|
||||
('linked_url', models.URLField(default='', max_length=255)),
|
||||
('moved_to', models.CharField(blank=True, default='', max_length=255)),
|
||||
('_avatar', models.ImageField(blank=True, default=None, upload_to=trilby_api.models.avatar_upload_to)),
|
||||
('_header', models.ImageField(blank=True, default=None, upload_to=trilby_api.models.header_upload_to)),
|
||||
('_avatar', models.ImageField(blank=True, default=None, upload_to=chapeau.trilby_api.models.avatar_upload_to)),
|
||||
('_header', models.ImageField(blank=True, default=None, upload_to=chapeau.trilby_api.models.header_upload_to)),
|
||||
('public_key', models.CharField(editable=False, max_length=255)),
|
||||
('private_key', models.CharField(editable=False, max_length=255)),
|
||||
('default_sensitive', models.BooleanField(default=False)),
|
||||
|
|
|
@ -8,8 +8,8 @@ from django.core.exceptions import ObjectDoesNotExist
|
|||
from django.contrib.staticfiles.storage import StaticFilesStorage
|
||||
from django.core.files.images import ImageFile
|
||||
from django.conf import settings
|
||||
from trilby_api.crypto import Key
|
||||
from django_kepi import implements_activity_type
|
||||
from chapeau.trilby_api.crypto import Key
|
||||
from chapeau.kepi import implements_activity_type
|
||||
|
||||
#############################
|
||||
|
||||
|
@ -235,7 +235,7 @@ class TrilbyUser(AbstractUser):
|
|||
Blocks another user. The other user should
|
||||
henceforth be unaware of our existence.
|
||||
"""
|
||||
blocking = django_kepi.models.Blocking(
|
||||
blocking = kepi.models.Blocking(
|
||||
blocking=self.actor,
|
||||
blocked=someone.actor)
|
||||
blocking.save()
|
||||
|
@ -244,13 +244,13 @@ class TrilbyUser(AbstractUser):
|
|||
"""
|
||||
Unblocks another user.
|
||||
"""
|
||||
django_kepi.models.Blocking.objects.filter(
|
||||
kepi.models.Blocking.objects.filter(
|
||||
following=self.actor,
|
||||
follower=someone.actor,
|
||||
).delete()
|
||||
|
||||
def is_blocking(self, someone):
|
||||
return django_kepi.models.Blocking.objects.filter(
|
||||
return kepi.models.Blocking.objects.filter(
|
||||
blocking=self.actor,
|
||||
blocker=someone.actor,
|
||||
).exists()
|
||||
|
@ -268,26 +268,26 @@ class TrilbyUser(AbstractUser):
|
|||
raise ValueError("Can't follow: blocked.")
|
||||
|
||||
if someone.locked:
|
||||
req = django_kepi.models.RequestingAccess(
|
||||
req = kepi.models.RequestingAccess(
|
||||
hopeful=self.actor,
|
||||
grantor=someone.actor,
|
||||
)
|
||||
req.save()
|
||||
else:
|
||||
following = django_kepi.models.Following(
|
||||
following = kepi.models.Following(
|
||||
following=someone.actor,
|
||||
follower=self.actor,
|
||||
)
|
||||
following.save()
|
||||
|
||||
def unfollow(self, someone):
|
||||
django_kepi.models.Following.objects.filter(
|
||||
kepi.models.Following.objects.filter(
|
||||
following=someone.actor,
|
||||
follower=self.actor,
|
||||
).delete()
|
||||
|
||||
def is_following(self, someone):
|
||||
return django_kepi.models.Following.objects.filter(
|
||||
return kepi.models.Following.objects.filter(
|
||||
following=someone.actor,
|
||||
follower=self.actor,
|
||||
).exists()
|
||||
|
@ -297,19 +297,19 @@ class TrilbyUser(AbstractUser):
|
|||
if someone.is_following(self):
|
||||
raise ValueError("They are already following you.")
|
||||
|
||||
if not django_kepi.models.RequestingAccess.objects.filter(
|
||||
if not kepi.models.RequestingAccess.objects.filter(
|
||||
hopeful=someone.actor,
|
||||
grantor=self.actor,
|
||||
).exists():
|
||||
raise ValueError("They haven't asked to follow you.")
|
||||
|
||||
if accept:
|
||||
following = django_kepi.models.Following(
|
||||
following = kepi.models.Following(
|
||||
following=self.actor,
|
||||
follower=someone.actor)
|
||||
following.save()
|
||||
|
||||
django_kepi.models.RequestingAccess.objects.filter(
|
||||
kepi.models.RequestingAccess.objects.filter(
|
||||
hopeful=someone.actor,
|
||||
grantor=self.actor,
|
||||
).delete()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.test import TestCase, Client
|
||||
from trilby_api.models import *
|
||||
from chapeau.trilby_api.models import *
|
||||
from django.conf import settings
|
||||
import json
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from django.test import TestCase, Client
|
||||
from trilby_api.models import *
|
||||
from chapeau.trilby_api.models import *
|
||||
|
||||
class UserTests(TestCase):
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ from .views import *
|
|||
|
||||
urlpatterns = [
|
||||
|
||||
path('v1/instance', Instance.as_view()),
|
||||
path('v1/apps', Apps.as_view()),
|
||||
path('v1/accounts/verify_credentials', Verify_Credentials.as_view()),
|
||||
path('v1/statuses', Statuses.as_view()),
|
||||
path('v1/timelines/public', PublicTimeline.as_view()),
|
||||
path('api/v1/instance', Instance.as_view()),
|
||||
path('api/v1/apps', Apps.as_view()),
|
||||
path('api/v1/accounts/verify_credentials', Verify_Credentials.as_view()),
|
||||
path('api/v1/statuses', Statuses.as_view()),
|
||||
path('api/v1/timelines/public', PublicTimeline.as_view()),
|
||||
|
||||
path('users/<username>/feed', UserFeed.as_view()),
|
||||
]
|
||||
|
|
|
@ -14,7 +14,7 @@ from rest_framework import generics, response
|
|||
from rest_framework.permissions import IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.renderers import JSONRenderer
|
||||
import django_kepi.models as kepi_models
|
||||
import chapeau.kepi.models as kepi_models
|
||||
import json
|
||||
import re
|
||||
|
||||
|
@ -29,7 +29,7 @@ class Instance(View):
|
|||
'title': settings.KEPI['INSTANCE_NAME'],
|
||||
'description': settings.KEPI['INSTANCE_DESCRIPTION'],
|
||||
'email': settings.KEPI['CONTACT_EMAIL'],
|
||||
'version': 'un_chapeau 0.0.1',
|
||||
'version': 'un_0.0.1',
|
||||
'urls': {},
|
||||
'languages': settings.KEPI['LANGUAGES'],
|
||||
'contact_account': settings.KEPI['CONTACT_ACCOUNT'],
|
||||
|
@ -249,7 +249,7 @@ class ActivityOutboxView(FIXMEview):
|
|||
def _stringify_object(self, obj):
|
||||
# XXX We'll do this properly soon.
|
||||
# It should have views particular to each kind of Status,
|
||||
# and an integration with the Activities in django_kepi.
|
||||
# and an integration with the Activities in kepi.
|
||||
return {
|
||||
"object" : {
|
||||
"atomUri" : obj.atomURL(),
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
# Generated by Django 2.2.4 on 2019-10-05 11:17
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('django_kepi', '0002_remove_acactor_f_preferredusername'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='acactor',
|
||||
name='f_name',
|
||||
field=models.TextField(default='', help_text='Your name, in human-friendly form. Something like "Alice Liddell".', verbose_name='name'),
|
||||
preserve_default=False,
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='acobject',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='acactor',
|
||||
name='f_summary',
|
||||
field=models.TextField(default='', help_text='Your biography. Something like "I enjoy falling down rabbitholes."', max_length=255, verbose_name='bio'),
|
||||
),
|
||||
]
|
|
@ -3,9 +3,8 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chapeau.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'chapeau.chapeau.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
|
@ -16,6 +15,5 @@ def main():
|
|||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
12
setup.py
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import re
|
||||
from io import open
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools import setup
|
||||
|
||||
# much of this was cribbed from django_rest_framework
|
||||
|
||||
|
@ -15,7 +15,7 @@ def get_version(package):
|
|||
init_py = open(os.path.join(package, '__init__.py')).read()
|
||||
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
|
||||
|
||||
version = get_version('chapeau/django_kepi')
|
||||
version = get_version('chapeau/kepi')
|
||||
|
||||
setup(
|
||||
name='chapeau',
|
||||
|
@ -27,19 +27,17 @@ setup(
|
|||
long_description_content_type='text/markdown',
|
||||
author='Marnanel Thurman',
|
||||
author_email='marnanel@thurman.org.uk',
|
||||
packages=[
|
||||
'chapeau',
|
||||
],
|
||||
packages=['chapeau'],
|
||||
include_package_data=True,
|
||||
install_requires=[],
|
||||
python_requires=">=3.0",
|
||||
#zip_safe=False,
|
||||
zip_safe=False, # for now, anyway
|
||||
classifiers=[
|
||||
# XXX fixme
|
||||
],
|
||||
entry_points = {
|
||||
'console_scripts': [
|
||||
'chapeau=chapeau.django_kepi.command_line:main',
|
||||
'chapeau=chapeau.kepi.command_line:main',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|