Permalink
Browse files

resolving conflicts with rebase merge

  • Loading branch information...
visiblegovernment committed Jul 8, 2011
2 parents 137d903 + 6926b18 commit cdd4b35b943f603d97f8afb3b47cec27117979a8
Showing with 7 additions and 11 deletions.
  1. +0 −1 mainapp/forms.py
  2. +1 −1 mainapp/tests/open311/v2.py
  3. +1 −1 mainapp/views/mobile/open311v2.py
  4. +5 −8 mainapp/views/reports/main.py
View
@@ -1,7 +1,6 @@
from django import forms
from django.template.loader import render_to_string
from django.core.mail import send_mail
-from fixmystreet import settings
from django.conf import settings
from mainapp.models import Ward, Report, ReportUpdate, ReportCategoryClass,ReportCategory,ReportSubscriber,DictToPoint,UserProfile
from django.utils.translation import ugettext_lazy as _
@@ -95,7 +95,7 @@ def _create_request(self, params,expected_errors=None, anon=True):
self.assertEquals( request_id, '6', "we've created a new request" )
else:
self.assertEquals( response.status_code, 400 )
- errors = doc.getElementsByTagName('error')
+ errors = doc.getElementsByTagName('error')
self.assertEquals(len(errors),len(expected_errors))
for error in errors:
error_text = error.childNodes[0].data
@@ -39,7 +39,7 @@ def _get_category(self):
if len(categories) == 0:
return None
return(categories[0])
-
+
def clean_title(self):
data = self.cleaned_data.get('title',None)
if data:
@@ -24,18 +24,15 @@ def new( request ):
if report:
return( HttpResponseRedirect( report.get_absolute_url() ))
else:
- report_form = ReportForm(initial={ 'lat': request.GET['lat'],
- 'lon': request.GET['lon'],
- 'address': request.GET.get('address',None) } )
-
initial={ 'lat': request.GET['lat'],
- 'lon': request.GET['lon'] }
-
+ 'lon': request.GET['lon'],
+ 'address': request.GET.get('address',None)
+ }
+
if request.user.is_authenticated():
initial[ 'author' ] = request.user.first_name + " " + request.user.last_name
initial[ 'phone' ] = request.user.get_profile().phone
initial[ 'email' ] = request.user.email
-
report_form = ReportForm( initial=initial, freeze_email=request.user.is_authenticated() )
return render_to_response("reports/new.html",
@@ -51,7 +48,7 @@ def show( request, report_id ):
report = get_object_or_404(Report, id=report_id)
subscribers = report.reportsubscriber_set.count() + 1
initial = {}
-
+
if request.user.is_authenticated():
initial[ 'author' ] = request.user.first_name + " " + request.user.last_name
initial[ 'phone' ] = request.user.get_profile().phone

0 comments on commit cdd4b35

Please sign in to comment.