pep8
This commit is contained in:
parent
0ecf6d3dc9
commit
92ea48f89d
12 changed files with 55 additions and 47 deletions
|
@ -8,8 +8,8 @@ __all__ = [ 'UserForm', 'GroupForm', 'TeamForm' ]
|
|||
|
||||
|
||||
UserForm = modelform_factory(User,
|
||||
fields=['username', 'first_name', 'last_name',
|
||||
'password', 'email', 'is_superuser'],
|
||||
fields=['username', 'first_name',
|
||||
'last_name', 'password', 'email', 'is_superuser'],
|
||||
widgets={'password': PasswordInput})
|
||||
GroupForm = modelform_factory(Group,
|
||||
fields=['name'])
|
||||
|
|
|
@ -151,7 +151,8 @@ def group_add_user(request, group):
|
|||
else:
|
||||
user.groups.add(group)
|
||||
user.save()
|
||||
messages.success(request, 'User added to group successfully.')
|
||||
messages.success(request,
|
||||
'User added to group successfully.')
|
||||
else:
|
||||
messages.error(request, 'User not found.')
|
||||
return redirect('show-group', group.id)
|
||||
|
@ -249,7 +250,8 @@ def team_add_user(request, team):
|
|||
else:
|
||||
team.users.add(user)
|
||||
team.save()
|
||||
messages.success(request, 'User added to team successfully.')
|
||||
messages.success(request,
|
||||
'User added to team successfully.')
|
||||
else:
|
||||
messages.error(request, 'User not found.')
|
||||
request.session['team-tab'] = 'user'
|
||||
|
@ -299,7 +301,8 @@ def team_add_group(request, team):
|
|||
else:
|
||||
team.groups.add(group)
|
||||
team.save()
|
||||
messages.success(request, 'Group added to team successfully.')
|
||||
messages.success(request,
|
||||
'Group added to team successfully.')
|
||||
else:
|
||||
messages.error(request, 'Group not found.')
|
||||
request.session['team-tab'] = 'group'
|
||||
|
|
|
@ -11,6 +11,7 @@ on the foreign object id, we can rely on database cascade deletion to delete
|
|||
outaded permissions and we have to do it our-self.
|
||||
"""
|
||||
|
||||
|
||||
@receiver(pre_delete, sender=User, dispatch_uid="clean_user_perms")
|
||||
def clean_user_perms(sender, instance, **kwargs):
|
||||
# Clean global permissions
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from ponytracker.settings import *
|
||||
|
||||
|
||||
### Uncomment to use celery worker
|
||||
### Don't forget to install a broker:
|
||||
### # http://docs.celeryproject.org/en/latest/getting-started/brokers/index.html#broker-overview
|
||||
# # Uncomment to use celery worker
|
||||
# # Don't forget to install a broker:
|
||||
# # http://docs.celeryproject.org/en/latest/getting-started/brokers/index.html#broker-overview
|
||||
# INSTALLED_APPS += ('djcelery',)
|
||||
# import djcelery
|
||||
# djcelery.setup_loader()
|
||||
|
|
|
@ -143,13 +143,16 @@ BOOTSTRAP3 = {
|
|||
#'base_url': '//netdna.bootstrapcdn.com/bootstrap/3.2.0/',
|
||||
'base_url': STATIC_URL,
|
||||
|
||||
# The complete URL to the Bootstrap CSS file (None means derive it from base_url)
|
||||
# The complete URL to the Bootstrap CSS file
|
||||
# (None means derive it from base_url)
|
||||
'css_url': None,
|
||||
|
||||
# The complete URL to the Bootstrap CSS file (None means no theme)
|
||||
# The complete URL to the Bootstrap CSS file
|
||||
# (None means no theme)
|
||||
'theme_url': None,
|
||||
|
||||
# The complete URL to the Bootstrap JavaScript file (None means derive it from base_url)
|
||||
# The complete URL to the Bootstrap JavaScript file
|
||||
# (None means derive it from base_url)
|
||||
'javascript_url': None,
|
||||
}
|
||||
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -1,3 +1,3 @@
|
|||
[pep8]
|
||||
exclude=env,issue/migrations,issue/urls.py
|
||||
ignore=E128
|
||||
exclude=env,*/migrations,*/urls.py,doc
|
||||
ignore=E128,E265
|
||||
|
|
|
@ -16,7 +16,8 @@ class ProjectForm(forms.ModelForm):
|
|||
model = Project
|
||||
fields = ['display_name', 'name', 'description', 'access']
|
||||
help_texts = {
|
||||
'name': 'Warning: if you change this value, this will break existing URLs.'
|
||||
'name': 'Warning: if you change this value, '
|
||||
'this will break existing URLs.'
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue