Commit 0caa3e89 authored by jc's avatar jc

fixes E265 block comment should start with '# '

parent 26004a75
#from django.contrib.auth.models import User
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS
from bt.models import Violation, Operator
# class UserResource(ModelResource):
# class Meta:
# queryset = User.objects.all()
# resource_name = 'auth/user'
# excludes = ['email', 'password', 'is_superuser']
class OperatorResource(ModelResource):
class OperatorResource(ModelResource):
class Meta:
queryset = Operator.objects.all()
list_allowed_methods = ['get', 'post']
......@@ -27,7 +25,8 @@ class OperatorResource(ModelResource):
class APIResource(ModelResource):
operator = fields.ForeignKey(OperatorResource, 'operator_ref')
# user = fields.ForeignKey(UserResource, 'user')
# user = fields.ForeignKey(UserResource, 'user')
class Meta:
queryset = Violation.objects.all()
......
......@@ -80,7 +80,7 @@ def save_ods():
doc.set_cell_value(10, row, "string", "can update to a different dataplan" if v.loophole else "")
doc.set_cell_value(12, row, "string", v.media)
row += 1
#(v.state, v.country, v.operator, v.contract, v.resource, v.resource_name, v.type, v.media, v.temporary, v.contractual, v.contract_excerpt, v.loophole, v.editorial,v.comment_set.get().comment)
# (v.state, v.country, v.operator, v.contract, v.resource, v.resource_name, v.type, v.media, v.temporary, v.contractual, v.contract_excerpt, v.loophole, v.editorial,v.comment_set.get().comment)
# Save the document to the file you want to create
doc.save("/tmp/ec_berec_tm_questionnaire.ods")
......@@ -160,8 +160,8 @@ class AddForm(FormView):
success_url = '/'
def form_valid(self, form):
#msg=_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.")
#actid=sendverifymail('activate?key=',form.cleaned_data['email'], msg)
# msg=_("Thank you for submitting a new report. To finalize your submission please confirm using your validation key.\nYour verification key is %s/%s%s\nPlease note that reports are moderated, it might take some time before your report appears online. Thank you for your patience.")
# actid=sendverifymail('activate?key=',form.cleaned_data['email'], msg)
actid = hashlib.sha1(''.join([chr(randint(32, 122)) for x in range(12)])).hexdigest()
operator, created = Operator.objects.get_or_create(name=form.cleaned_data['operator'])
v = Violation(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment