Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
ots
hypha
Commits
26cefa24
Commit
26cefa24
authored
6 years ago
by
Parbhat Puri
Browse files
Options
Downloads
Patches
Plain Diff
remove unused code
parent
dbbe7752
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/apply/users/admin_views.py
+0
-19
0 additions, 19 deletions
opentech/apply/users/admin_views.py
with
0 additions
and
19 deletions
opentech/apply/users/admin_views.py
+
0
−
19
View file @
26cefa24
from
django.conf
import
settings
from
django.contrib.auth
import
get_user_model
from
django.db.models
import
Q
from
django.shortcuts
import
render
...
...
@@ -8,8 +7,6 @@ from django.views.decorators.vary import vary_on_headers
from
wagtail.admin.forms
import
SearchForm
from
wagtail.admin.utils
import
any_permission_required
from
wagtail.core.compat
import
AUTH_USER_APP_LABEL
,
AUTH_USER_MODEL_NAME
from
wagtail.users.forms
import
UserCreationForm
,
UserEditForm
from
wagtail.utils.loading
import
get_custom_form
from
wagtail.utils.pagination
import
paginate
User
=
get_user_model
()
...
...
@@ -22,22 +19,6 @@ change_user_perm = "{0}.change_{1}".format(AUTH_USER_APP_LABEL, AUTH_USER_MODEL_
delete_user_perm
=
"
{0}.delete_{1}
"
.
format
(
AUTH_USER_APP_LABEL
,
AUTH_USER_MODEL_NAME
.
lower
())
def
get_user_creation_form
():
form_setting
=
'
WAGTAIL_USER_CREATION_FORM
'
if
hasattr
(
settings
,
form_setting
):
return
get_custom_form
(
form_setting
)
else
:
return
UserCreationForm
def
get_user_edit_form
():
form_setting
=
'
WAGTAIL_USER_EDIT_FORM
'
if
hasattr
(
settings
,
form_setting
):
return
get_custom_form
(
form_setting
)
else
:
return
UserEditForm
@any_permission_required
(
add_user_perm
,
change_user_perm
,
delete_user_perm
)
@vary_on_headers
(
'
X-Requested-With
'
)
def
index
(
request
):
...
...
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