Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mellamocarloss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valencia Vargas, Carlos
mellamocarloss
Commits
991d8644
Commit
991d8644
authored
3 years ago
by
Alex
Browse files
Options
Downloads
Patches
Plain Diff
fix incorrect redirect url
parent
5bb21f79
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.py
+1
-1
1 addition, 1 deletion
app.py
blueprints/home.py
+8
-4
8 additions, 4 deletions
blueprints/home.py
with
9 additions
and
5 deletions
app.py
+
1
−
1
View file @
991d8644
from
flask
import
Flask
,
send_from_directory
,
url_for
from
flask
import
Flask
,
send_from_directory
from
database.db
import
db
from
config.config
import
APP_NAME
,
ENV
,
get_app_config
,
get_static_url
...
...
This diff is collapsed.
Click to expand it.
blueprints/home.py
+
8
−
4
View file @
991d8644
from
flask
import
Blueprint
,
render_template
,
request
,
redirect
,
url_for
from
flask
import
Blueprint
,
render_template
,
request
,
redirect
from
config
import
url_for2
from
database.db
import
db
from
models.user
import
Entity
...
...
@@ -30,6 +31,9 @@ def entities():
username
=
request
.
form
.
get
(
'
username
'
)
email
=
request
.
form
.
get
(
'
email
'
)
db
.
session
.
add
(
Entity
(
username
=
username
,
email
=
email
))
db
.
session
.
commit
()
return
redirect
(
'
/entities
'
)
try
:
db
.
session
.
add
(
Entity
(
username
=
username
,
email
=
email
))
db
.
session
.
commit
()
return
redirect
(
url_for2
(
'
.entities
'
))
except
:
return
"
Could not add entity, username and/or email are already in use.
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment