Removed static urls
This commit is contained in:
parent
3b8ce2f288
commit
e2a2a320d9
@ -15,9 +15,9 @@ def protected_serve(request, path, document_root=None, show_indexes=False):
|
||||
return serve(request, path, document_root, show_indexes)
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', main.views.index),
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^members/(?P<userId>\d+)', charter_members.views.index),
|
||||
url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}),
|
||||
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT})
|
||||
url(r'^$', main.views.index, name='home'),
|
||||
url(r'^admin/', admin.site.urls, name='admin'),
|
||||
url(r'^attorney/(?P<userId>\d+)', charter_members.views.index, name='attorney'),
|
||||
url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'),
|
||||
url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}, name='media')
|
||||
]
|
||||
|
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
{% for attorney in attorneys %}
|
||||
<a class="col-4 text-center pt-5" href="/members/{{ attorney.id }}">
|
||||
<a class="col-4 text-center pt-5" href="{% url 'attorney' attorney.id %}">
|
||||
<div>
|
||||
<img class="pb-3" src="/media/{{ attorney.image }}" style="max-width: 100%; max-height: 200px"/>
|
||||
<h5 class="text-dark-primary">{{ attorney.name }}</h5>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white py-4">
|
||||
<div class="container">
|
||||
<a class="navbar-brand text-dark-primary" href="/">
|
||||
<a class="navbar-brand text-dark-primary" href="{% url 'home' %}">
|
||||
<img src="{% static 'main/img/logo.png' %}" width="30" height="30" class="d-inline-block align-top" alt="">
|
||||
<div class="d-inline-block">
|
||||
ONTARIO ASSOCIATION OF
|
||||
@ -36,7 +36,7 @@
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item text-dark-primary">
|
||||
<a class="nav-link" href="/">HOME</a>
|
||||
<a class="nav-link" href="{% url 'home' %}">HOME</a>
|
||||
</li>
|
||||
<li class="nav-item text-dark-primary">
|
||||
<a class="nav-link" href="#">INFORMATION</a>
|
||||
@ -57,7 +57,7 @@
|
||||
{% endif %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
<li class="nav-item text-dark-primary">
|
||||
<a class="nav-link" href="/admin/">LOGIN</a>
|
||||
<a class="nav-link" href="{% url 'admin' %}">LOGIN</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user