add views to the example project
This commit is contained in:
parent
df9e4d8c61
commit
be337d6017
|
@ -1,10 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.views.generic import (
|
||||
CreateView,
|
||||
DeleteView,
|
||||
DetailView,
|
||||
UpdateView,
|
||||
ListView,
|
||||
)
|
||||
from django.contrib.auth.views import LoginView
|
||||
from django.views.generic import FormView
|
||||
|
||||
from .models import Address
|
||||
|
||||
|
||||
class MoneroLoginView(LoginView):
|
||||
pass
|
||||
|
||||
|
||||
class MoneroSignUpView(FormView):
|
||||
pass
|
||||
|
|
|
@ -26,6 +26,14 @@
|
|||
<li>
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
{% if not request.user.is_authenticated %}
|
||||
<li>
|
||||
<a href="{% url 'test_signup' %}">Sign up</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{% url 'test_login' %}">Login</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{% extends 'django_cryptolock/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
{{form}}
|
||||
{% endblock content %}
|
|
@ -1,3 +1,8 @@
|
|||
from django.conf.urls import url
|
||||
|
||||
urlpatterns = []
|
||||
from .views import TestLoginView, TestSignupView
|
||||
|
||||
urlpatterns = [
|
||||
url(r"login", TestLoginView.as_view(), name="test_login"),
|
||||
url(r"signup", TestSignupView.as_view(), name="test_signup"),
|
||||
]
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
from django.shortcuts import render
|
||||
from django_cryptolock.views import MoneroLoginView, MoneroSignUpView
|
||||
|
||||
# Create your views here.
|
||||
|
||||
class TestLoginView(MoneroLoginView):
|
||||
pass
|
||||
|
||||
|
||||
class TestSignupView(MoneroSignUpView):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue