Skip to content
Browse files

still anal about line length

  • Loading branch information...
1 parent 7e2df60 commit ae82b7e7e46e6770c8bca433a9d340e2e72b9976 @buchuki buchuki committed
Showing with 10 additions and 4 deletions.
  1. +4 −2 greatbigcrane/preferences/forms.py
  2. +6 −2 greatbigcrane/project/views.py
View
6 greatbigcrane/preferences/forms.py
@@ -23,11 +23,13 @@ class PreferencesForm(forms.Form):
def __init__(self, *args, **kwargs):
super(PreferencesForm, self).__init__(*args, **kwargs)
for preference in Preference.objects.all():
- self.fields[preference.name] = forms.CharField(help_text=preference.help_text,
+ self.fields[preference.name] = forms.CharField(
+ help_text=preference.help_text,
required=False)
def clean_projects_directory(self):
'''Ensure the projects_directory preference has a trailing slash'''
- if self.cleaned_data['projects_directory'] and not self.cleaned_data['projects_directory'].endswith(os.path.sep):
+ if self.cleaned_data['projects_directory'] and not \
+ self.cleaned_data['projects_directory'].endswith(os.path.sep):
self.cleaned_data['projects_directory'] += os.path.sep
return self.cleaned_data['projects_directory']
View
8 greatbigcrane/project/views.py
@@ -117,10 +117,14 @@ def favourite_project(request, project_id):
def project_notifications(request, project_id):
project = Project.objects.get(pk=project_id)
- notifications = Notification.objects.filter(project=project_id,dismissed=False)[:10]
+ notifications = Notification.objects.filter(
+ project=project_id,dismissed=False)[:10]
return render_to_response("notifications/_notification_list.html",
- RequestContext(request, {'notifications': notifications, 'project': project}))
+ RequestContext(request, {'notifications': notifications,
+ 'project': project}))
+#FIXME: I'm not sure what this method is doing, so I'm thinking it needs
+# a less generic name.
def handle_ajax(request):
if 'update' in request.POST:
update = dict()

0 comments on commit ae82b7e

Please sign in to comment.
Something went wrong with that request. Please try again.