Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Merge 77d2ce0 into 6236363
Browse files Browse the repository at this point in the history
  • Loading branch information
rmader committed Jul 11, 2019
2 parents 6236363 + 77d2ce0 commit eed2958
Show file tree
Hide file tree
Showing 63 changed files with 102 additions and 81 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ omit =
*/migrations/*
*/tests.py
*/test_*.py
*/autofixtures.py
1 change: 1 addition & 0 deletions apps/activities/migrations/0005_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_activities', '0004_update_content_types'),
Expand Down
4 changes: 2 additions & 2 deletions apps/budgeting/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_queryset(self):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated


class ProposalCommentExportView(PermissionRequiredMixin,
Expand Down Expand Up @@ -75,4 +75,4 @@ def get_virtual_fields(self, virtual):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated
1 change: 1 addition & 0 deletions apps/budgeting/migrations/0021_update_content_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


class Migration(migrations.Migration):
atomic = False

replaces = [('liqd_product_budgeting', '0021_update_content_types')]

Expand Down
1 change: 1 addition & 0 deletions apps/budgeting/migrations/0023_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_budgeting', '0022_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/budgeting/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib.contenttypes.fields import GenericRelation
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _

from adhocracy4.comments import models as comment_models
Expand Down
1 change: 1 addition & 0 deletions apps/cms/pages/migrations/0006_rename_tables_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_cms_pages', '0005_update_content_types'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_cms_settings', '0002_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/contrib/sitemaps/product_projects_sitemap.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib.sitemaps import Sitemap
from django.core.urlresolvers import reverse
from django.urls import reverse

from adhocracy4.projects.models import Project
from apps.partners.models import Partner
Expand Down
2 changes: 1 addition & 1 deletion apps/contrib/templatetags/item_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django import template
from django.core.urlresolvers import reverse
from django.urls import NoReverseMatch
from django.urls import reverse

register = template.Library()

Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.apps import apps
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from django.views.generic.detail import SingleObjectMixin

Expand Down
2 changes: 1 addition & 1 deletion apps/documents/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ def get_virtual_fields(self, virtual):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated
1 change: 1 addition & 0 deletions apps/documents/migrations/0009_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_documents', '0008_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/documents/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ckeditor_uploader.fields import RichTextUploadingField
from django.contrib.contenttypes.fields import GenericRelation
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse
from django.utils.functional import cached_property

from adhocracy4 import transforms
Expand Down
4 changes: 2 additions & 2 deletions apps/ideas/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_queryset(self):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated


class IdeaCommentExportView(PermissionRequiredMixin,
Expand Down Expand Up @@ -72,4 +72,4 @@ def get_virtual_fields(self, virtual):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated
1 change: 1 addition & 0 deletions apps/ideas/migrations/0018_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_ideas', '0017_rename_app_in_phase_type'),
Expand Down
5 changes: 3 additions & 2 deletions apps/ideas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from ckeditor.fields import RichTextField
from django.contrib.contenttypes.fields import GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _

from adhocracy4 import transforms
Expand All @@ -25,7 +25,8 @@ class IdeaQuerySet(query.RateableQuerySet, query.CommentableQuerySet):
class AbstractIdea(module_models.Item, Moderateable):
item_ptr = models.OneToOneField(to=module_models.Item,
parent_link=True,
related_name='%(app_label)s_%(class)s')
related_name='%(app_label)s_%(class)s',
on_delete=models.CASCADE)
slug = AutoSlugField(populate_from='name', unique=True)
name = models.CharField(max_length=120, verbose_name=_('Title'))
description = RichTextField(verbose_name=_('Description'))
Expand Down
2 changes: 1 addition & 1 deletion apps/ideas/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.db import transaction
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.views import generic

Expand Down
4 changes: 2 additions & 2 deletions apps/mapideas/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_permission_object(self):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated


class MapIdeaCommentExportView(PermissionRequiredMixin,
Expand Down Expand Up @@ -73,4 +73,4 @@ def get_virtual_fields(self, virtual):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated
1 change: 1 addition & 0 deletions apps/mapideas/migrations/0020_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_mapideas', '0019_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/mapideas/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib.contenttypes.fields import GenericRelation
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _

from adhocracy4.comments import models as comment_models
Expand Down
1 change: 1 addition & 0 deletions apps/maps/migrations/0005_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_maps', '0004_update_content_types'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_moderatorfeedback', '0002_update_content_types'),
Expand Down
1 change: 1 addition & 0 deletions apps/moderatorfeedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Moderateable(models.Model):
related_name='+',
null=True,
blank=True,
on_delete=models.CASCADE
)

class Meta:
Expand Down
2 changes: 1 addition & 1 deletion apps/moderatorremark/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ModeratorRemarkViewSet(mixins.CreateModelMixin,
serializer_class = ModeratorRemarkSerializer
permission_classes = (ViewSetRulesPermission,)
filter_backends = (filters.DjangoFilterBackend,)
filter_fields = ('item_object_id', 'item_content_type')
filterset_fields = ('item_object_id', 'item_content_type')
content_type_filter = AllContentTypesFilter()

def get_permission_object(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_moderatorremark', '0004_update_content_types'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_offlineevents', '0004_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/offlineevents/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from autoslug import AutoSlugField
from ckeditor_uploader.fields import RichTextUploadingField
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _

from adhocracy4 import transforms
Expand Down
2 changes: 1 addition & 1 deletion apps/offlineevents/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.views import generic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_organisations', '0002_update_content_types'),
Expand Down
1 change: 1 addition & 0 deletions apps/partners/migrations/0014_rename_table_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_partners', '0013_update_content_types'),
Expand Down
10 changes: 5 additions & 5 deletions apps/partners/urlresolvers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import itertools

from django.conf.urls import RegexURLPattern
from django.conf.urls import RegexURLResolver
from django.conf.urls import include
from django.conf.urls import url
from django.urls import URLPattern
from django.urls import URLResolver

from apps.django_overwrites.urlresolvers import django_reverse

Expand All @@ -15,14 +15,14 @@
def partner_patterns(*pattern_list):
"""Mark the url patterns used with partners."""
for pattern in pattern_list:
if isinstance(pattern, RegexURLPattern):
if isinstance(pattern, URLPattern):
_partner_pattern_names.add(pattern.name)
elif isinstance(pattern, RegexURLResolver):
elif isinstance(pattern, URLResolver):
for url_pattern in pattern.url_patterns:
ns = ''
if pattern.app_name:
ns = ns + pattern.app_name + ':'
if pattern.namespace:
elif pattern.namespace:
ns = ns + pattern.namespace + ':'
_partner_pattern_names.add(ns + url_pattern.name)
else:
Expand Down
2 changes: 1 addition & 1 deletion apps/polls/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ def get_virtual_fields(self, virtual):

@property
def raise_exception(self):
return bool(self.request.user.is_authenticated)
return self.request.user.is_authenticated
1 change: 1 addition & 0 deletions apps/polls/migrations/0006_rename_tables_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_polls', '0005_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/polls/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib.contenttypes.fields import GenericRelation
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse

from adhocracy4.comments import models as comment_models
from adhocracy4.models.base import UserGeneratedContentModel
Expand Down
1 change: 1 addition & 0 deletions apps/projects/migrations/0003_rename_tables_to_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_projects', '0002_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/projects/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import uuid

from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse

from adhocracy4.models import base
from adhocracy4.projects.models import Project
Expand Down
1 change: 1 addition & 0 deletions apps/users/migrations/0007_rename_table_to_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


class Migration(migrations.Migration):
atomic = False

dependencies = [
('a4_candy_users', '0006_update_content_types'),
Expand Down
2 changes: 1 addition & 1 deletion apps/users/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.conf import settings
from django.contrib.auth import models as auth_models
from django.core import validators
from django.core.urlresolvers import reverse
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import get_language
from django.utils.translation import ugettext_lazy as _
Expand Down
4 changes: 2 additions & 2 deletions apps/users/templatetags/userindicator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from allauth.account import urls as account_urls
from django import template
from django.core.urlresolvers import Resolver404
from django.core.urlresolvers import resolve
from django.urls import Resolver404
from django.urls import resolve

INVALID_URL_NAME = object()

Expand Down
1 change: 0 additions & 1 deletion liqd_product/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',

'apps.partners.middleware.PartnerMiddleware',
Expand Down

0 comments on commit eed2958

Please sign in to comment.