This commit is contained in:
Élie Bouttier 2014-08-30 17:47:19 -07:00
parent 0ecf6d3dc9
commit 92ea48f89d
12 changed files with 55 additions and 47 deletions

View file

@ -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.'
}

View file

@ -9,7 +9,7 @@ from permissions.models import PermissionModel as PermModel
# This middleware protect only views of the following modules
modules = [ 'accounts.views', 'permissions.views', 'tracker.views' ]
modules = ['accounts.views', 'permissions.views', 'tracker.views']
class ProjectMiddleware:

View file

@ -14,14 +14,14 @@ from accounts.models import User
from tracker.templatetags.tracker_tags import *
__all__ = [ 'Project', 'Issue', 'Label', 'Milestone', 'Event' ]
__all__ = ['Project', 'Issue', 'Label', 'Milestone', 'Event']
@python_2_unicode_compatible
class Project(models.Model):
class Meta:
ordering = [ 'name' ]
ordering = ['name']
ACCESS_PUBLIC = 1
ACCESS_REGISTERED = 2
@ -81,7 +81,7 @@ class Label(models.Model):
class Milestone(models.Model):
class Meta:
ordering = [ 'due_date' ]
ordering = ['due_date']
name_validator = RegexValidator(regex='^[a-z0-9_.-]+$',
message="Please enter only lowercase characters, number, "