# Refactoring team views
* refactors team views * split views.py into users.py and teams.py in users app * refactors method headers for _user_has_permission() * adds method and class comments and documentation to base view classes
This commit is contained in:
+7
-5
@@ -11,7 +11,9 @@ from user.autocomplete.share import ShareUserAutocomplete, ShareTeamAutocomplete
|
||||
from user.autocomplete.team import TeamAdminAutocomplete
|
||||
from user.views.api_token import APITokenView, new_api_token_view
|
||||
from user.views.propagate import PropagateUserView
|
||||
from user.views.views import *
|
||||
from user.views.teams import TeamIndexView, NewTeamView, TeamDetailModalView, EditTeamView, RemoveTeamView, \
|
||||
LeaveTeamView
|
||||
from user.views.users import UserDetailView, NotificationsView, ContactView
|
||||
|
||||
app_name = "user"
|
||||
urlpatterns = [
|
||||
@@ -22,11 +24,11 @@ urlpatterns = [
|
||||
path("token/api/new", new_api_token_view, name="api-token-new"),
|
||||
path("contact/<id>", ContactView.as_view(), name="contact"),
|
||||
path("team/", TeamIndexView.as_view(), name="team-index"),
|
||||
path("team/new", new_team_view, name="team-new"),
|
||||
path("team/new", NewTeamView.as_view(), name="team-new"),
|
||||
path("team/<id>", TeamDetailModalView.as_view(), name="team-data"),
|
||||
path("team/<id>/edit", edit_team_view, name="team-edit"),
|
||||
path("team/<id>/remove", remove_team_view, name="team-remove"),
|
||||
path("team/<id>/leave", leave_team_view, name="team-leave"),
|
||||
path("team/<id>/edit", EditTeamView.as_view(), name="team-edit"),
|
||||
path("team/<id>/remove", RemoveTeamView.as_view(), name="team-remove"),
|
||||
path("team/<id>/leave", LeaveTeamView.as_view(), name="team-leave"),
|
||||
|
||||
# Autocomplete urls
|
||||
path("atcmplt/share/u", ShareUserAutocomplete.as_view(), name="share-user-autocomplete"),
|
||||
|
||||
Reference in New Issue
Block a user