Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove webring feature #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/src/file-structure-walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ Condensed and commented sources file tree:
│   │   │   └── style.css
│   │   ├── partials/
│   │   │   ├── footer.html
│   │   │   ├── footer_blog.html
│   │   │   └── webring.html
│   │   │   └── footer_blog.html
│   │   └── registration/
│   ├── tests/
│   │   ├── test_billing.py
Expand Down Expand Up @@ -90,7 +89,7 @@ All urls are in this module. They are visually divided into several sections:
* blog extras, includes rss and newsletter features
* comments, related to the blog post comments
* billing, subscription and card related
* blog import, export, webring
* blog import, export
* images CRUD
* analytics list and details
* pages CRUD
Expand All @@ -107,7 +106,6 @@ It includes:
* comments CRUD
* images CRUD
* pages CRUD
* webring
* analytics
* notifications subscribe/unsubscribe
* moderation dashboard
Expand Down
3 changes: 0 additions & 3 deletions main/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ def blog_url(self, obj):
"mail_export_on",
"post_backups_on",
"export_unsubscribe_key",
"webring_name",
"webring_prev_url",
"webring_next_url",
"stripe_customer_id",
"stripe_subscription_id",
"monero_address",
Expand Down
4 changes: 0 additions & 4 deletions main/fixtures/dev-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
"notifications_on": true,
"mail_export_on": true,
"export_unsubscribe_key": "97a97638-a14a-451d-9bca-43a33455ec38",
"webring_name": "hackers webring",
"webring_url": null,
"webring_prev_url": null,
"webring_next_url": null,
"stripe_customer_id": null,
"monero_address": null,
"is_premium": false,
Expand Down
21 changes: 0 additions & 21 deletions main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,6 @@ class User(AbstractUser):
)
export_unsubscribe_key = models.UUIDField(default=uuid.uuid4, unique=True)

# webring related
webring_name = models.CharField(max_length=200, blank=True, null=True)
webring_url = models.URLField(
blank=True,
null=True,
verbose_name="Webring info URL",
help_text="Informational URL.",
)
webring_prev_url = models.URLField(
blank=True,
null=True,
verbose_name="Webring previous URL",
help_text="URL for your webring's previous website.",
)
webring_next_url = models.URLField(
blank=True,
null=True,
verbose_name="Webring next URL",
help_text="URL for your webring's next website.",
)

# billing
stripe_customer_id = models.CharField(max_length=100, blank=True, null=True)
stripe_subscription_id = models.CharField(max_length=100, blank=True, null=True)
Expand Down
15 changes: 0 additions & 15 deletions main/templates/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -493,21 +493,6 @@ form .helptext {
margin: 16px 0 24px;
}

.webring {
margin-top: 64px;
display: flex;
justify-content: space-between;
}

.webring-name {
color: #000;
}
@media (prefers-color-scheme: dark) {
.webring-name {
color: #fff;
}
}

/* post detail */
.posts-item-brand {
display: block;
Expand Down
2 changes: 0 additions & 2 deletions main/templates/main/blog_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ <h1 itemprop="name">{{ blog_user.blog_title }}</h1>
</ul>
</main>

{% include 'partials/webring.html' %}

{% include 'partials/footer_blog.html' %}

{% endblock %}
3 changes: 1 addition & 2 deletions main/templates/main/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ <h1>Dashboard</h1>

<strong>Manage</strong>
<div class="dashboard-list">
<a href="{% url 'webring' %}">Webring</a>
<br><a href="{% url 'api_docs' %}">API</a>
<a href="{% url 'api_docs' %}">API</a>

{% if billing_enabled %}
<br><a href="{% url 'billing_index' %}">Billing</a>
Expand Down
2 changes: 0 additions & 2 deletions main/templates/main/page_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ <h1 class="pages-item-title">{{ page.title }}</h1>
</div>
</main>

{% include 'partials/webring.html' %}

{% include 'partials/footer_blog.html' %}

{% endblock %}
Expand Down
2 changes: 0 additions & 2 deletions main/templates/main/post_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ <h1 class="posts-item-title" itemprop="name headline">{{ post.title }}</h1>
</article>
</main>

{% include 'partials/webring.html' %}

{% if blog_user.comments_on %}
<section class="comments">
{% if request.user.is_authenticated and request.subdomain == request.user.username %}
Expand Down
20 changes: 0 additions & 20 deletions main/templates/partials/webring.html

This file was deleted.

117 changes: 0 additions & 117 deletions main/tests/test_webring.py

This file was deleted.

3 changes: 1 addition & 2 deletions main/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,8 @@
),
]

# blog import, export, webring
# blog import, export
urlpatterns += [
path("webring/", general.WebringUpdate.as_view(), name="webring"),
path("import/", general.BlogImport.as_view(), name="blog_import"),
path("export/", export.export_index, name="export_index"),
path(
Expand Down
17 changes: 0 additions & 17 deletions main/views/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,23 +863,6 @@ def dispatch(self, request, *args, **kwargs):
return super().dispatch(request, *args, **kwargs)


class WebringUpdate(SuccessMessageMixin, UpdateView):
model = models.User
fields = [
"webring_name",
"webring_url",
"webring_prev_url",
"webring_next_url",
]
template_name = "main/webring.html"
success_message = "webring settings updated"
success_url = reverse_lazy("dashboard")

def get_object(self):
if self.request.user.is_authenticated:
return models.User.objects.get(pk=self.request.user.id)


class AnalyticList(LoginRequiredMixin, TemplateView):
template_name = "main/analytic_list.html"

Expand Down
Loading