Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
69351823
Commit
69351823
authored
Feb 19, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formulario de registro
parent
03f19682
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
views.py
catalog/views.py
+4
-4
login.html
templates/registration/login.html
+16
-1
No files found.
catalog/views.py
View file @
69351823
...
...
@@ -651,8 +651,8 @@ def IPN(request):
def
Registration
(
request
):
#user = User.objects.filter(email=request.POST['email'])
if
User
.
objects
.
filter
(
email
=
request
.
POST
[
'email'
]):
print
(
"ya existe"
)
return
HttpResponse
(
"
el correo ya está registrado
"
)
messages
.
warning
(
request
,
'the username or password already exist'
)
return
HttpResponse
(
"
the username or password already exist
"
)
else
:
print
(
"agregado"
)
User
.
objects
.
create_user
(
username
=
request
.
POST
[
'username'
],
...
...
@@ -661,5 +661,5 @@ def Registration(request):
message
=
"your registration is being processed"
subject
=
"Registro RepSat"
wsMail2
(
request
.
POST
[
'email'
],
request
.
POST
[
'username'
],
message
,
subject
)
messages
.
info
(
request
,
'your registration is being processed'
)
messages
.
success
(
request
,
'your registration is being processed'
)
return
HttpResponseRedirect
(
'login'
)
templates/registration/login.html
View file @
69351823
...
...
@@ -4,6 +4,8 @@
{% block headMedia %}
<link
rel=
"stylesheet"
href=
"{% static 'catalog/css/login.css' %}"
type=
"text/css"
>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"
></script>
<script
src=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"
></script>
{% endblock %}
{% block budy %}
...
...
@@ -126,7 +128,9 @@
<!-- /.col -->
<div
class=
"col-xs-12"
>
<button
id=
"submit-button"
type=
"submit"
class=
"btn btn-primary btn-block btn-flat btnGeo"
>
Register
</button>
<button
id=
"submit-button"
type=
"submit"
class=
"btn btn-primary btn-block btn-flat btnGeo"
>
Register
</button>
</div>
<!-- /.col -->
</div>
...
...
@@ -152,9 +156,20 @@
</div>
</div>
{% if messages %}
<div
class=
"container col-md-2 col-lg-2 col-xs-2 col-sm-2 pull-right"
>
{% for message in messages %}
<div
{%
if
message
.
tags
%}
class=
"fade in alert alert-dismissible alert-{{ message.tags }}"
{%
endif
%}
>
<a
href=
"#"
class=
"close"
data-dismiss=
"alert"
aria-label=
"close"
>
×
</a>
<strong>
{{ message.tags }}!
</strong>
{{ message }}.
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% block scripts %}
<script>
...
...
Write
Preview
Markdown
is supported
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