Added password reset, cleaned up nav and added mailing list link

This commit is contained in:
Sam Collins 2017-02-15 19:11:22 +00:00
parent f8729a5453
commit 38cffd11cb
No known key found for this signature in database
GPG Key ID: 233C5943C800FE30
4 changed files with 23 additions and 33 deletions

View File

@ -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<provider>[\w\-]+)/success$', subscription.MembershipJoinSuccessView.as_view(), name='join_hackspace_success'),
url(r'membership/(?P<provider>\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<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', 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:

View File

@ -44,37 +44,11 @@
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a href="#navbarSideMenu" class="navbar-brand" type="button" data-toggle="collapse"
aria-controls="navbarMainMenu" aria-expanded="false"
aria-label="Toggle navigation">
<img src="{% static 'images/logo.svg' %}" alt="Maidstone Hackspace Logo" id="navbar-logo" data-target="collapse" data-targt="#navbarSideMenu" style="padding:0px;">
<a class="navbar-brand" href="/">
<img src="/static/images/logo.svg" alt="Maidstone Hackspace Logo" id="navbar-logo">
Maidstone Hackspace
</a>
<div class="collapse navbar-inverse bg-inverse" id="navbarSideMenu" style="position:absolute;top:72px;left:0px;z-index:1;background-color:#bbbbbb;">
<ul class="nav flex-column navbar-left navbar-nav mr-auto" >
{% if request.user.is_authenticated %}
<li class="nav-item">
<a class="nav-link active" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link" href="{% url 'members' %}">Members</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'group'%}">Mailing List</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{# url 'equipment' #}">Equipment</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'account_logout' %}">Sign out</a>
</li>
</ul>
</div>
<div class="collapse navbar-collapse" id="navbarMainMenu">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
@ -99,6 +73,15 @@
<ul class="nav navbar-nav pull-xs-right">
{% if request.user.is_authenticated %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="http://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Member Area
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="{% url 'members' %}">Members</a>
<a class="dropdown-item" href="{# url 'equipment' #}">Equipment</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>
</li>
@ -126,7 +109,8 @@
{% endif %}
{% block content %}
<p>Use this document as a way to quick start any new project.</p>
<h1>Under Construction</h1>
<p>We are still working on this page. Please bare with us.</p>
{% endblock content %}
</div>
@ -134,6 +118,8 @@
<footer class="footer">
<div class="container">
<span class="text-muted">&copy; {% now "Y" %} Maidstone Hackspace</span>
<div class="float-right">
<a class="btn btn-primary" href="https://groups.google.com/forum/#!forum/maidstone-hackspace" role="button">Mailing List</a>
</div>
</footer>

View File

@ -2,8 +2,8 @@
{% block content %}
<p>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.<p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
{% endblock content %}

View File

@ -3,7 +3,7 @@
<div class="row">
<div class="col-md-4">Hackspace Members</div>
<div class="col-md-4"><h1>Hackspace Members</h1></div>
<div class="col-md-4"><a href="#">Total Users <span class="badge badge-default">{{ paginator.count }}</span></a></div>
<div class="col-md-4"><a href="#">Total Members <span class="badge badge-success">{{ total }}</span></a></div>
</div>