Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bryan BRANCOTTE
django-basetheme-bootstrap
Commits
240bdb42
Commit
240bdb42
authored
Aug 30, 2019
by
Bryan BRANCOTTE
Browse files
Prevent account creation when authenticated
parent
fe070ddf
Changes
3
Hide whitespace changes
Inline
Side-by-side
basetheme_bootstrap/views.py
View file @
240bdb42
...
...
@@ -9,6 +9,7 @@ from django.contrib.auth.forms import PasswordChangeForm
from
django.core.mail
import
send_mail
from
django.db.models
import
ProtectedError
from
django.forms
import
widgets
from
django.http
import
HttpResponseForbidden
from
django.shortcuts
import
render
,
redirect
from
django.template
import
TemplateDoesNotExist
from
django.utils.translation
import
ugettext
...
...
@@ -82,6 +83,8 @@ def signup(request):
login
(
request
,
user
)
return
redirect
(
'home'
)
else
:
if
not
request
.
user
.
is_anonymous
:
return
HttpResponseForbidden
()
form
=
UserCreationFormWithMore
()
return
render
(
request
,
'registration/signup.html'
,
{
'form'
:
form
})
...
...
test_app_1/templates/test_app_1/fork_me.html
deleted
100644 → 0
View file @
fe070ddf
{% load i18n %}
<!-- **** Begin Fork-Me-On-Gitlab-Ribbon-HTML. See MIT License at https://gitlab.com/seanwasere/fork-me-on-gitlab **** -->
<a
href=
"https://gitlab.pasteur.fr/bbrancot/django-basetheme-bootstrap"
>
<span
class=
"fork_me"
>
{%trans "Fork Me"%}
</span>
</a>
<!-- **** End Fork-Me-On-Gitlab-Ribbon-HTML **** -->
\ No newline at end of file
test_app_1/templates/test_app_1/nav_bar.html
deleted
100644 → 0
View file @
fe070ddf
{% load basetheme_bootstrap %}
{% load i18n %}
<li
class=
"nav-item"
><a
class=
"nav-link"
href=
"/"
><i
class=
"fa fa-table"
></i>
Theme BS4
</a></li>
<li
class=
"nav-item"
><a
class=
"nav-link"
href=
"/themePasteur"
><i
class=
"fa fa-map-signs"
></i>
Theme BS4 Pasteur
</a></li>
<li
class=
"nav-item {{ request|is_active_or_desc:'basetheme_bootstrap:about_page'}}"
><a
href=
"{% url 'basetheme_bootstrap:about_page'%}"
class=
"nav-link"
>
{%trans "About"%}
</a></li>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment