Include Registration Page
This commit is contained in:
@@ -14,5 +14,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<button type="submit" class="login-button">LOG IN</button>
|
<button type="submit" class="login-button">LOG IN</button>
|
||||||
</form>
|
</form>
|
||||||
|
<a href="{% url 'register' %}">Registrierung</a>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -7,4 +7,5 @@ urlpatterns = [
|
|||||||
path('', views.home, name='home'),
|
path('', views.home, name='home'),
|
||||||
path('logout/', LogoutView.as_view(next_page='login'), name='logout'),
|
path('logout/', LogoutView.as_view(next_page='login'), name='logout'),
|
||||||
path('login/', LoginView.as_view(template_name='accounts/login.html', next_page='home'), name='login'),
|
path('login/', LoginView.as_view(template_name='accounts/login.html', next_page='home'), name='login'),
|
||||||
|
path('register/', views.register, name='register'),
|
||||||
]
|
]
|
||||||
@@ -5,3 +5,6 @@ from django.contrib.auth.decorators import login_required
|
|||||||
@login_required
|
@login_required
|
||||||
def home(request):
|
def home(request):
|
||||||
return render(request, 'accounts/home.html')
|
return render(request, 'accounts/home.html')
|
||||||
|
|
||||||
|
def register(request):
|
||||||
|
return render(request, 'accounts/register.html')
|
||||||
Reference in New Issue
Block a user