From e1dc5b2e0f5805529e27dd30d43fe87cdd7a80c3 Mon Sep 17 00:00:00 2001 From: Sam Collins Date: Wed, 15 Feb 2017 18:05:57 +0000 Subject: [PATCH 1/3] Reduced duplicate queries on Home Page and made Copyright year dynamic --- mhackspace/feeds/templatetags/feed_views.py | 2 +- mhackspace/templates/base.html | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mhackspace/feeds/templatetags/feed_views.py b/mhackspace/feeds/templatetags/feed_views.py index eaa7c7d..d9798b9 100644 --- a/mhackspace/feeds/templatetags/feed_views.py +++ b/mhackspace/feeds/templatetags/feed_views.py @@ -6,4 +6,4 @@ register = template.Library() @register.inclusion_tag('feeds/list.html') def show_feeds(): - return {'articles': Article.objects.filter(displayed=True)} + return {'articles': Article.objects.select_related('feed').filter(displayed=True)} diff --git a/mhackspace/templates/base.html b/mhackspace/templates/base.html index 5d07534..6f2f2d1 100644 --- a/mhackspace/templates/base.html +++ b/mhackspace/templates/base.html @@ -133,15 +133,12 @@ {% block modal %}{% endblock modal %} - - {% block javascript %} - - - {% compress js %} {% endcompress %} From f8729a545347ea67b136ef9f61d4d5fa146f4a81 Mon Sep 17 00:00:00 2001 From: Sam Collins Date: Wed, 15 Feb 2017 18:06:27 +0000 Subject: [PATCH 2/3] Improved Chat page text and added Hangouts link --- mhackspace/templates/pages/chat.html | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mhackspace/templates/pages/chat.html b/mhackspace/templates/pages/chat.html index 8174238..8dc18e1 100644 --- a/mhackspace/templates/pages/chat.html +++ b/mhackspace/templates/pages/chat.html @@ -2,15 +2,12 @@ {% load feed_views %} {% block content %} -

Introduction

+

Chat to us

Pop in and say hi, please be patient users tend to idle, but will likely respond given a chance. +Join us on Hangouts or connect directly to freenode using irc.freenode.org and the #maidstone-hackspace channel. - -
-
-
-
+ {% endblock content %} From 38cffd11cbdeecf6093066abc97cec43d8edbe2e Mon Sep 17 00:00:00 2001 From: Sam Collins Date: Wed, 15 Feb 2017 19:11:22 +0000 Subject: [PATCH 3/3] Added password reset, cleaned up nav and added mailing list link --- config/urls.py | 6 +++- mhackspace/templates/base.html | 44 +++++++++---------------- mhackspace/templates/pages/about.html | 4 +-- mhackspace/templates/pages/members.html | 2 +- 4 files changed, 23 insertions(+), 33 deletions(-) diff --git a/config/urls.py b/config/urls.py index 9f340bb..9d3b64f 100644 --- a/config/urls.py +++ b/config/urls.py @@ -11,6 +11,7 @@ from mhackspace.contact.views import contact from mhackspace.members.views import MemberListView from mhackspace.subscriptions import views as subscription from mhackspace.base.feeds import LatestEntriesFeed +from django.contrib.auth import views as auth_views urlpatterns = [ url(r'^$', TemplateView.as_view(template_name='pages/home.html'), name='home'), @@ -36,7 +37,10 @@ urlpatterns = [ url(r'membership/join/$', subscription.MembershipJoinView.as_view(), name='join_hackspace'), url(r'membership/(?P[\w\-]+)/success$', subscription.MembershipJoinSuccessView.as_view(), name='join_hackspace_success'), url(r'membership/(?P\w{0,50})/failure$', subscription.MembershipJoinFailureView.as_view(), name='join_hackspace_failure'), - + url(r'^admin/password_reset/$', auth_views.password_reset, name='admin_password_reset'), + url(r'^admin/password_reset/done/$', auth_views.password_reset_done, name='password_reset_done'), + url(r'^reset/(?P[0-9A-Za-z_\-]+)/(?P.+)/$', auth_views.password_reset_confirm, name='password_reset_confirm'), + url(r'^reset/done/$', auth_views.password_reset_complete, name='password_reset_complete'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: diff --git a/mhackspace/templates/base.html b/mhackspace/templates/base.html index 6f2f2d1..453a142 100644 --- a/mhackspace/templates/base.html +++ b/mhackspace/templates/base.html @@ -44,37 +44,11 @@ aria-label="Toggle navigation"> - + Maidstone Hackspace - - @@ -134,6 +118,8 @@ diff --git a/mhackspace/templates/pages/about.html b/mhackspace/templates/pages/about.html index bc62be8..6ed40c9 100644 --- a/mhackspace/templates/pages/about.html +++ b/mhackspace/templates/pages/about.html @@ -2,8 +2,8 @@ {% block content %} -

A hackspace also referred to as a makerspace is a community-operated, workspace where people with common interests, often in computers, machining, technology, science, digital art or electronic art, can meet, socialize and collaborate.

+

A hackspace also referred to as a maker space is a community-operated, workspace where people with common interests, often in computers, machining, technology, science, digital art or electronic art, can meet, socialise and collaborate.

-

Most people do no have the space knowleddge or finance required to create things at home, hackspaces get around this by poolng together for the bigger tools sharing of knowledge and helping out each other to create & build.

+

Most people do no have the space knowledge or finance required to create things at home, hackspaces get around this by pooling together for the bigger tools sharing of knowledge and helping out each other to create & build.

{% endblock content %} diff --git a/mhackspace/templates/pages/members.html b/mhackspace/templates/pages/members.html index d343596..ff8cfe0 100644 --- a/mhackspace/templates/pages/members.html +++ b/mhackspace/templates/pages/members.html @@ -3,7 +3,7 @@
-
Hackspace Members
+

Hackspace Members