Skip to content

Commit

Permalink
Reverted "Refs #720 -- Added bio/website fields for DSF members."
Browse files Browse the repository at this point in the history
This reverts commit c3128f1 as it's
unused since 4a3cd80.
  • Loading branch information
timgraham committed Oct 1, 2018
1 parent ba8ab7e commit 5f2c450
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 81 deletions.
1 change: 0 additions & 1 deletion djangoproject/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@

'registration',
'django_hosts',
'markdownx',
'sorl.thumbnail',

'django.contrib.sites',
Expand Down
2 changes: 1 addition & 1 deletion djangoproject/templates/members/individualmember_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base_foundation.html" %}
{% load i18n markdown %}
{% load i18n %}

{% block content %}
<h1>{% trans "Individual members" %}</h1>
Expand Down
20 changes: 0 additions & 20 deletions djangoproject/test_markdownx.py

This file was deleted.

3 changes: 0 additions & 3 deletions djangoproject/urls/www.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth import views as auth_views
from django.contrib.contenttypes import views as contenttypes_views
from django.contrib.flatpages.sitemaps import FlatPageSitemap
Expand All @@ -9,7 +8,6 @@
from django.views.decorators.cache import cache_page
from django.views.generic import RedirectView, TemplateView
from django.views.static import serve
from markdownx.views import MarkdownifyView

from accounts import views as account_views
from aggregator.feeds import (
Expand Down Expand Up @@ -55,7 +53,6 @@
path('contact/', include('contact.urls')),
path('foundation/', include('members.urls')),
path('fundraising/', include('fundraising.urls')),
path('markdownx/markdownify/', staff_member_required(MarkdownifyView.as_view())),

# Used by docs search suggestions
re_path('^r/(?P<content_type_id>\d+)/(?P<object_id>.*)/$', contenttypes_views.shortcut, name='contenttypes-shortcut'),
Expand Down
3 changes: 1 addition & 2 deletions members/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
from django.templatetags.static import static
from django.utils.formats import localize
from django.utils.html import format_html
from markdownx.admin import MarkdownxModelAdmin

from members.models import CorporateMember, IndividualMember, Invoice, Team


@admin.register(IndividualMember)
class IndividualMemberAdmin(MarkdownxModelAdmin):
class IndividualMemberAdmin(admin.ModelAdmin):
list_display = [
'name',
'email',
Expand Down
3 changes: 1 addition & 2 deletions members/migrations/0007_auto_20170216_0837.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Generated by Django 1.10.5 on 2017-02-16 08:37
from __future__ import unicode_literals

import markdownx.models
from django.db import migrations, models


Expand All @@ -16,7 +15,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='individualmember',
name='bio',
field=markdownx.models.MarkdownxField(blank=True),
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='individualmember',
Expand Down
21 changes: 21 additions & 0 deletions members/migrations/0008_auto_20181001_1031.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 2.1.2 on 2018-10-01 10:31

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('members', '0007_auto_20170216_0837'),
]

operations = [
migrations.RemoveField(
model_name='individualmember',
name='bio',
),
migrations.RemoveField(
model_name='individualmember',
name='website',
),
]
10 changes: 0 additions & 10 deletions members/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.html import format_html
from django.views.generic.dates import timezone_today
from django_hosts import reverse
from markdownx.models import MarkdownxField
from sorl.thumbnail import ImageField, get_thumbnail

BRONZE_MEMBERSHIP = 1
Expand Down Expand Up @@ -41,8 +39,6 @@ class IndividualMember(models.Model):
member_since = models.DateField(default=timezone_today)
member_until = models.DateField(null=True, blank=True)
reason_for_leaving = models.TextField(blank=True)
bio = MarkdownxField(blank=True)
website = models.URLField(blank=True)

class Meta:
ordering = ['name']
Expand All @@ -54,12 +50,6 @@ def __str__(self):
def is_active(self):
return self.member_until is None

@property
def linked_name(self):
if self.website:
return format_html('<a href="{}">{}</a>', self.website, self.name)
return self.name


class Team(models.Model):
name = models.CharField(max_length=250)
Expand Down
Empty file removed members/templatetags/__init__.py
Empty file.
19 changes: 0 additions & 19 deletions members/templatetags/markdown.py

This file was deleted.

7 changes: 0 additions & 7 deletions members/test_models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from datetime import date, timedelta

from django.test import TestCase
from django.utils.safestring import SafeData

from members.models import (
GOLD_MEMBERSHIP, PLATINUM_MEMBERSHIP, SILVER_MEMBERSHIP, CorporateMember,
Expand All @@ -24,12 +23,6 @@ def setUp(self):
def test_str(self):
self.assertEqual(str(self.member), 'DjangoDeveloper')

def test_linked_name(self):
self.assertEqual(self.member.linked_name, 'DjangoDeveloper')
self.member.website = 'djangoproject.com'
self.assertEqual(self.member.linked_name, '<a href="djangoproject.com">DjangoDeveloper</a>')
self.assertIsInstance(self.member.linked_name, SafeData)

def test_member_since_should_have_default(self):
self.assertEqual(IndividualMember().member_since, date.today())

Expand Down
14 changes: 0 additions & 14 deletions members/test_templatetags.py

This file was deleted.

2 changes: 0 additions & 2 deletions requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ bleach==2.1.4
Django==2.1.2
django-contact-form==1.6
django-hosts==3.0
django-markdownx==2.0.23
django-push==1.1
django-registration-redux==2.4
docutils==0.14
feedparser==5.2.1
Jinja2==2.10
libsass==0.15.0
Markdown==2.6.11
Pillow==5.3.0
psycopg2-binary==2.7.5
pygments==2.2.0
Expand Down

0 comments on commit 5f2c450

Please sign in to comment.