Changeset - 9e851c31fac3
[Not reviewed]
27 14 0
Sachi King - 7 years ago 2017-03-31 00:54:46
nakato@nakato.io
Remove dj-user-accounts

That's a nice macro, but we don't need it.
dj-user-accounts stands in the way of using more generic AUTN_METHODS
41 files changed with 13 insertions and 464 deletions:
0 comments (0 inline, 0 general)
pinaxcon/apps.py
Show inline comments
...
 
@@ -3,9 +3,6 @@ from importlib import import_module
 
from django.apps import AppConfig as BaseAppConfig
 

	
 

	
 
class AppConfig(BaseAppConfig):
 

	
 
    name = "pinaxcon"
 

	
 
    def ready(self):
 
        import_module("pinaxcon.receivers")
pinaxcon/monkey_patch.py
Show inline comments
...
 
@@ -9,13 +9,12 @@ class MonkeyPatchMiddleware(object):
 
        do_monkey_patch()
 

	
 

	
 
def do_monkey_patch():
 
    patch_speaker_profile_form()
 
    fix_sitetree_check_access_500s()
 
    never_cache_login_page()
 
    patch_stripe_payment_form()
 

	
 
    # Remove this function from existence
 
    global do_monkey_patch
 
    do_monkey_patch = lambda: None  # noqa: E731
 

	
...
 
@@ -48,18 +47,12 @@ def fix_sitetree_check_access_500s():
 
        except KeyError:
 
            return False
 

	
 
    SiteTree.check_access = check_access
 

	
 

	
 
def never_cache_login_page():
 
    from django.views.decorators.cache import never_cache
 
    from account.views import LoginView
 
    LoginView.get = never_cache(LoginView.get)
 

	
 

	
 
def patch_stripe_payment_form():  # noqa: C901
 

	
 
    import inspect  # Oh no.
 
    from django.http.request import HttpRequest
 
    from registripe.forms import CreditCardForm
 
    from pinaxcon.registrasion import models
pinaxcon/receivers.py
Show inline comments
 
deleted file
pinaxcon/settings.py
Show inline comments
...
 
@@ -65,13 +65,12 @@ TEMPLATES = [
 
                "django.core.context_processors.i18n",
 
                "django.core.context_processors.media",
 
                "django.core.context_processors.static",
 
                "django.core.context_processors.tz",
 
                "django.core.context_processors.request",
 
                "django.contrib.messages.context_processors.messages",
 
                "account.context_processors.account",
 
                "pinax_theme_bootstrap.context_processors.theme",
 
                "symposion.reviews.context_processors.reviews",
 
            ],
 
        },
 
    },
 
]
...
 
@@ -109,13 +108,12 @@ INSTALLED_APPS = [
 

	
 
    # theme
 
    "bootstrapform",
 
    "pinax_theme_bootstrap",
 

	
 
    # external
 
    "account",
 
    "easy_thumbnails",
 
    "taggit",
 
    "reversion",
 
    "metron",
 
    "sitetree",
 
    "pinax.eventlog",
...
 
@@ -238,26 +236,16 @@ LOGGING = {
 
FIXTURE_DIRS = [
 
    os.path.join(PROJECT_ROOT, "fixtures"),
 
]
 

	
 
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
 

	
 
ACCOUNT_OPEN_SIGNUP = True
 
ACCOUNT_EMAIL_UNIQUE = True
 
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = False
 
ACCOUNT_LOGIN_REDIRECT_URL = "dashboard"
 
ACCOUNT_LOGOUT_REDIRECT_URL = "/"
 
ACCOUNT_EMAIL_CONFIRMATION_EXPIRE_DAYS = 2
 
ACCOUNT_USE_AUTH_AUTHENTICATE = True
 

	
 
THEME_CONTACT_EMAIL = "team@lca2018.org"
 

	
 
AUTHENTICATION_BACKENDS = [
 
    "symposion.teams.backends.TeamPermissionsBackend",
 
    "account.auth_backends.UsernameAuthenticationBackend",
 
    "account.auth_backends.EmailAuthenticationBackend",
 
]
 

	
 
CONFERENCE_ID = 1
 
PROPOSAL_FORMS = {
 
    "talk": "pinaxcon.proposals.forms.TalkProposalForm",
 
    "tutorial": "pinaxcon.proposals.forms.TutorialProposalForm",
pinaxcon/templates/_account_bar.html
Show inline comments
 
deleted file
pinaxcon/templates/account/_login_sidebar.html
Show inline comments
 
deleted file
pinaxcon/templates/account/_signup_sidebar.html
Show inline comments
 
deleted file
pinaxcon/templates/account/base.html
Show inline comments
 
deleted file
pinaxcon/templates/account/delete.html
Show inline comments
 
deleted file
pinaxcon/templates/account/email/email_confirmation_message.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/email_confirmation_subject.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/invite_user.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/invite_user_subject.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/password_change.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/password_change_subject.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/password_reset.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email/password_reset_subject.txt
Show inline comments
 
deleted file
pinaxcon/templates/account/email_confirm.html
Show inline comments
 
deleted file
pinaxcon/templates/account/email_confirmation_sent.html
Show inline comments
 
deleted file
pinaxcon/templates/account/email_confirmed.html
Show inline comments
 
deleted file
pinaxcon/templates/account/login.html
Show inline comments
 
deleted file
pinaxcon/templates/account/logout.html
Show inline comments
 
deleted file
pinaxcon/templates/account/password_change.html
Show inline comments
 
deleted file
pinaxcon/templates/account/password_reset.html
Show inline comments
 
deleted file
pinaxcon/templates/account/password_reset_sent.html
Show inline comments
 
deleted file
pinaxcon/templates/account/password_reset_token.html
Show inline comments
 
deleted file
pinaxcon/templates/account/password_reset_token_fail.html
Show inline comments
 
deleted file
pinaxcon/templates/account/settings.html
Show inline comments
 
deleted file
pinaxcon/templates/account/signup.html
Show inline comments
 
deleted file
pinaxcon/templates/account/signup_closed.html
Show inline comments
 
deleted file
pinaxcon/templates/symposion/emails/proposal_new_message/message.html
Show inline comments
 
{% load account_tags %}
 
{% load i18n %}
 
{% user_display message.user as user %}
 
<p>
 
  {% blocktrans with title=proposal.title %}<b>{{ user }}</b> has added a message on <b>{{ title }}</b>.{% endblocktrans %}
 
  {% blocktrans with title=proposal.title user=message.user %}<b>{{ user }}</b> has added a message on <b>{{ title }}</b>.{% endblocktrans %}
 
</p>
 
<blockquote>
 
    {{ message.message|safe }}
 
</blockquote>
 
<p>
 
    {% if reviewer %}{% url 'review_detail' proposal.pk as detail_url %}{% else %}{% url 'proposal_detail' proposal.pk as detail_url %}{% endif %}
pinaxcon/templates/symposion/emails/proposal_new_message/subject.txt
Show inline comments
 
{% load account_tags i18n %}{% user_display message.user as user %}{% blocktrans with title=proposal.title %}New message on "{{ title }}" from {{ user }}{% endblocktrans %}
 
{% load i18n %}{% blocktrans with title=proposal.title user=message.user.username %}New message on "{{ title }}" from {{ user }}{% endblocktrans %}
pinaxcon/templates/symposion/emails/proposal_updated/message.html
Show inline comments
 
{% load account_tags %}
 
{% load i18n %}
 
{% user_display user as username %}
 
<p>
 
  {% blocktrans with title=proposal.title %}<b>{{ username }}</b> has made changes to <b>{{ title }}</b> which you have previously reviewed or commented on.{% endblocktrans %}
 
  {% blocktrans with title=proposal.title username=user.username %}<b>{{ username }}</b> has made changes to <b>{{ title }}</b> which you have previously reviewed or commented on.{% endblocktrans %}
 
</p>
 
<p>
 
    {% url 'review_detail' proposal.pk as detail_url %}
 
    {% blocktrans %}View the latest version of the proposal online at <a href="http://{{ current_site }}{{ detail_url }}">http://{{ current_site }}{{ detail_url }}</a>{% endblocktrans %}
 
</p>
pinaxcon/templates/symposion/emails/proposal_updated/subject.txt
Show inline comments
 
{% load account_tags i18n %}{% user_display user as username %}{% blocktrans with title=proposal.title %}"{{ title }}" has been updated by {{ username }}{% endblocktrans %}
 
{% load i18n %}{% blocktrans with title=proposal.title username=user.username %}"{{ title }}" has been updated by {{ username }}{% endblocktrans %}
pinaxcon/templates/symposion/emails/teams_user_applied/message.html
Show inline comments
 
{% load i18n account_tags %}
 
{% user_display user as username %}
 
{% blocktrans with team_name=team team_url=team.get_absolute_url site_name=current_site.name site_url=current_site %}
 
{% load i18n %}
 
{% blocktrans with team_name=team team_url=team.get_absolute_url site_name=current_site.name site_url=current_site username=user.username %}
 
    <p>
 
        User "{{ username }}" has applied to join <b>{{ team_name }}</b> on {{ site_name }}.
 
    </p>
 

	
 
    <p>
 
        To accept this application and see any other pending applications, visit the following url:
pinaxcon/templates/symposion/emails/teams_user_applied/subject.txt
Show inline comments
 
{% load i18n account_tags %}{% user_display user as username %}{% blocktrans %}{{ username}} has applied to to join "{{ team }}"{% endblocktrans %}
...
 
\ No newline at end of file
 
{% load i18n %}{% blocktrans with username=user.username %}{{ username }} has applied to to join "{{ team }}"{% endblocktrans %}
pinaxcon/templates/symposion/emails/teams_user_invited/message.html
Show inline comments
 
{% load i18n account_tags %}
 
{% load i18n %}
 

	
 
{% blocktrans with team_name=team team_url=team.get_absolute_url site_name=current_site.name site_url=current_site %}
 
    <p>
 
        You have been invited to join <b>{{ team_name }}</b> on {{ site_name }}.
 
    </p>
 

	
 
    <p>
 
        To accept this invitation, visit the following url:
 
        <a href="http://{{ site_url }}{{ team_url }}">http://{{ site_url }}{{ team_url }}</a>
 
    </p>
 
{% endblocktrans %}
...
 
\ No newline at end of file
 
{% endblocktrans %}
pinaxcon/templates/symposion/proposals/proposal_detail.html
Show inline comments
 
{% extends "symposion/proposals/base.html" %}
 

	
 
{% load i18n %}
 
{% load account_tags %}
 
{% load bootstrap %}
 

	
 
{% block head_title %}{{ proposal.title }}{% endblock %}
 
{% block page_title %}#{{ proposal.number }}: {{ proposal.title }} ({{ proposal.speaker }}){% endblock %}
 

	
 
{% block proposals_body_outer %}
...
 
@@ -62,13 +61,13 @@
 
        <div data-tab-content="Feedback" class="panel--tab-content">
 

	
 
          <h3>{% trans 'Conversation with Reviewers' %}</h3>
 
          {% for message in proposal.messages.all %}
 
              <div class="review-box">
 
                  <div class="comment"><em>{{ message.message|safe }}</em></div>
 
                  <div class="dateline"><b>{% user_display message.user %}</b> {{ message.submitted_at|timesince }} ago</div>
 
                  <div class="dateline"><b>{{ message.user.username }}</b> {{ message.submitted_at|timesince }} ago</div>
 
              </div>
 
              <br />
 
          {% endfor %}
 

	
 
          <h3>{% trans 'Leave a Message' %}</h3>
 

	
pinaxcon/templates/symposion/reviews/review_detail.html
Show inline comments
 
{% extends "symposion/reviews/base.html" %}
 

	
 
{% load i18n %}
 
{% load bootstrap %}
 
{% load account_tags %}
 

	
 

	
 
{% block body %}
 

	
 
    <div>
 
        <a class="btn btn-primary" href="{% url "user_random" proposal.section.slug %}">
...
 
@@ -134,13 +133,13 @@
 
                            <div class="review-content">
 
                                &nbsp;
 
                                <b>
 
                                  {% if review.user.speaker_profile %}
 
                                    {{ review.user.speaker_profile.name }}
 
                                  {% else %}
 
                                    {% user_display review.user %}
 
                                    {{ review.user.username }}
 
                                  {% endif %}
 
                                </b>
 
                                {{ review.submitted_at|timesince }} ago <br />
 
                                {{ review.comment_html|safe }}
 
                            </div>
 
                        </div>
...
 
@@ -150,13 +149,13 @@
 
            <div class="tab-pane" id="proposal-feedback">
 
                {% if review_messages %}
 
                    <h3>{% trans "Conversation with the submitter" %}</h3>
 
                    {% for message in review_messages %}
 
                        <div class="comment-box">
 
                            <div class="commment-content">
 
                                <b>{% user_display message.user %}</b>
 
                                <b>{{ message.user.username }}</b>
 
                                {{ message.submitted_at|timesince }} ago <br />
 
                                {{ message.message|safe }}
 
                            </div>
 
                        </div>
 
                    {% endfor %}
 
                    <hr />
pinaxcon/urls.py
Show inline comments
...
 
@@ -11,14 +11,12 @@ from django.contrib import admin
 
import symposion.views
 

	
 

	
 
urlpatterns = [
 
    url(r"^admin/", include(admin.site.urls)),
 

	
 
    url(r"^account/", include("account.urls")),
 

	
 
    url(r"^dashboard/", symposion.views.dashboard, name="dashboard"),
 

	
 
    url(r"^speaker/", include("symposion.speakers.urls")),
 
    url(r"^proposals/", include("symposion.proposals.urls")),
 
    url(r"^sponsors/", include("symposion.sponsorship.urls")),
 
    url(r"^reviews/", include("symposion.reviews.urls")),
requirements.txt
Show inline comments
 
# Should use latest 1.9 for security
 
Django==1.9.7
 
pinax-theme-bootstrap==7.3.0
 
django-user-accounts==1.3.1
 
metron==1.3.7
 
pinax-eventlog==1.1.1
 
django-formset-js==0.5.0
 
dj-static==0.0.6
 
dj-database-url==0.4.0
 
wagtail==1.6.2
...
 
@@ -16,9 +15,9 @@ django-debug-toolbar==1.6
 
mysqlclient>=1.3.3
 

	
 
# For testing
 
django-nose==1.4.3
 
coverage==4.0.3
 

	
 
-e git+https://github.com/lca2017/symposion.git@lca2017#egg=symposion
 
-e git+https://gitlab.com/lca2018/symposion.git@lca2018#egg=symposion
 
-e git+https://github.com/chrisjrn/registrasion.git@master#egg=registrasion
 
-e git+https://github.com/chrisjrn/registrasion-stripe.git@master#egg=registrasion-stripe
0 comments (0 inline, 0 general)