Skip to content

Commit

Permalink
Revert "projects: add location component in dashboard"
Browse files Browse the repository at this point in the history
This reverts commit 38c7fd9.
  • Loading branch information
P4rcev4l committed Sep 6, 2024
1 parent 9cf04e2 commit 0146dcf
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 254 deletions.
5 changes: 0 additions & 5 deletions adhocracy-plus/config/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
except ImportError:
pass

try:
from .polygons import *
except ImportError:
pass

try:
INSTALLED_APPS += tuple(ADDITIONAL_APPS)
except NameError:
Expand Down
195 changes: 0 additions & 195 deletions adhocracy-plus/config/settings/polygons.py

This file was deleted.

5 changes: 0 additions & 5 deletions adhocracy-plus/config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
except ImportError:
pass

try:
from .polygons import *
except ImportError:
pass

try:
INSTALLED_APPS += tuple(ADDITIONAL_APPS)
except NameError:
Expand Down

This file was deleted.

29 changes: 0 additions & 29 deletions apps/projects/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from adhocracy4.dashboard.components.forms import ProjectFormComponent
from adhocracy4.dashboard.forms import ProjectResultForm

from . import forms
from . import views
from .models import ProjectInsight
from .views import ProjectResultInsightComponentFormView
Expand Down Expand Up @@ -108,34 +107,6 @@ def get_urls(self):
]


class ProjectLocationComponent(ProjectFormComponent):
identifier = "location"
weight = 34
label = _("Location")

form_title = _("Edit location")
form_class = forms.PointForm
form_template_name = "a4dashboard/includes/project_location_form.html"

def get_urls(self):
view = ProjectResultInsightComponentFormView.as_view(
component=self,
title=self.form_title,
form_class=self.form_class,
form_template_name=self.form_template_name,
)
return [
(
r"^projects/(?P<project_slug>[-\w_]+)/{identifier}/$".format(
identifier=self.identifier
),
view,
"dashboard-{identifier}-edit".format(identifier=self.identifier),
)
]


components.register_project(ModeratorsComponent())
components.register_project(ParticipantsComponent())
components.replace_project(ProjectResultComponent())
components.replace_project(ProjectLocationComponent())
14 changes: 0 additions & 14 deletions apps/projects/forms.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _

from adhocracy4.dashboard.forms import ProjectDashboardForm
from adhocracy4.maps import widgets as maps_widgets
from adhocracy4.projects.models import Project
from apps.users import fields as user_fields

from .models import ModeratorInvite
Expand Down Expand Up @@ -68,13 +64,3 @@ def clean(self):
if not self.errors and not add_users and not add_users_upload:
raise ValidationError(_("Please enter email addresses or upload a file"))
return cleaned_data


class PointForm(ProjectDashboardForm):
class Meta:
model = Project
fields = ["administrative_district", "point"]
required_for_project_publish = []
widgets = {
"point": maps_widgets.MapChoosePointWidget(polygon=settings.BERLIN_POLYGON),
}
1 change: 0 additions & 1 deletion apps/projects/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class Meta:
fields = (
"pk",
"slug",
"point",
"name",
"description",
"information",
Expand Down
3 changes: 0 additions & 3 deletions changelog/8304.md

This file was deleted.

0 comments on commit 0146dcf

Please sign in to comment.