kopia lustrzana https://gitlab.com/marnanel/chapeau
Fix some of the headers in trilby.
Standard comment block at the start, and getting the logger in the same way.status-serialisers
rodzic
a4fa15e825
commit
b42887616e
|
@ -1,3 +1,12 @@
|
|||
# crypto.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Hash import SHA256
|
||||
from struct import pack
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# follow.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from django.db import models
|
||||
from django.db.models.constraints import UniqueConstraint
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
|
@ -6,9 +15,6 @@ import kepi.bowler_pub.crypto as crypto
|
|||
from kepi.bowler_pub.utils import uri_to_url
|
||||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('kepi')
|
||||
|
||||
class Follow(models.Model):
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# follow.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from django.db import models
|
||||
from django.db.models.constraints import UniqueConstraint
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
|
@ -6,9 +15,6 @@ import kepi.bowler_pub.crypto as crypto
|
|||
from kepi.bowler_pub.utils import uri_to_url
|
||||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('kepi')
|
||||
|
||||
class Like(models.Model):
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# notification.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from django.db import models
|
||||
from django.db.models.constraints import UniqueConstraint
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
|
@ -6,9 +15,6 @@ import kepi.bowler_pub.crypto as crypto
|
|||
from kepi.bowler_pub.utils import uri_to_url
|
||||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('kepi')
|
||||
|
||||
class Notification(models.Model):
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.Logger("kepi")
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from polymorphic.models import PolymorphicModel
|
||||
from django.db import models
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# status.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from django.db import models
|
||||
from django.db.models.constraints import UniqueConstraint
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
|
@ -7,11 +16,8 @@ from kepi.bowler_pub.utils import uri_to_url, is_local
|
|||
import kepi.trilby_api.utils as trilby_utils
|
||||
from django.utils.timezone import now
|
||||
from django.core.exceptions import ValidationError
|
||||
import logging
|
||||
from polymorphic.models import PolymorphicModel
|
||||
|
||||
logger = logging.Logger('kepi')
|
||||
|
||||
class Status(PolymorphicModel):
|
||||
|
||||
class Meta:
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
# receivers.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
import kepi.trilby_api.signals as kepi_signals
|
||||
import kepi.trilby_api.models as kepi_models
|
||||
from django.dispatch import receiver
|
||||
import logging
|
||||
|
||||
logger = logging.Logger('kepi')
|
||||
|
||||
##################################################
|
||||
# Notification handlers
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# signals.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from django.dispatch import Signal
|
||||
|
||||
liked = Signal(
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# test_timelines.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from unittest import skip
|
||||
from rest_framework.test import APIClient, force_authenticate
|
||||
from kepi.trilby_api.views import *
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# urls.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# utils.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
VISIBILITY_PUBLIC = 'A'
|
||||
VISIBILITY_UNLISTED = 'U'
|
||||
VISIBILITY_PRIVATE = 'X'
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
# views.py
|
||||
#
|
||||
# Part of kepi.
|
||||
# Copyright (c) 2018-2020 Marnanel Thurman.
|
||||
# Licensed under the GNU Public License v2.
|
||||
|
||||
import logging
|
||||
logger = logging.getLogger(name='kepi')
|
||||
|
||||
from django.db import IntegrityError, transaction
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.views import View
|
||||
|
@ -19,11 +28,9 @@ from rest_framework.permissions import IsAuthenticated, \
|
|||
from rest_framework.response import Response
|
||||
from rest_framework.renderers import JSONRenderer
|
||||
import kepi.trilby_api.receivers
|
||||
import logging
|
||||
import json
|
||||
import re
|
||||
|
||||
logger = logging.Logger(name='kepi')
|
||||
|
||||
###########################
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue