* Replace some tabs by spaces and put a vim modeline in every python file.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sat, 9 Feb 2008 18:34:17 +0000 (19:34 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sat, 9 Feb 2008 18:34:17 +0000 (19:34 +0100)
22 files changed:
__init__.py
auth.py
base/__init__.py
base/models.py
base/views.py
events/__init__.py
events/models.py
events/views.py
import.py
influences/__init__.py
influences/models.py
influences/notify.py
influences/views.py
manage.py
settings.py
tools/__init__.py
tools/context_processors.py
tools/forms.py
tools/misc.py
tools/notify.py
tools/templatetags/__init__.py
urls.py

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14c59e81c3a7a24713c156ee26998fcc12de113c 100644 (file)
@@ -0,0 +1 @@
+# vim: set sts=4 sw=4 expandtab:
diff --git a/auth.py b/auth.py
index 64f4daf4b76f647308ecfd5671514528702f12c0..00c106d1e36625e6571d045c2d8604cdbf399b0e 100644 (file)
--- a/auth.py
+++ b/auth.py
@@ -104,3 +104,4 @@ class PhpBBBackend:
         except User.DoesNotExist:
             return None
     
+# vim: set sts=4 sw=4 expandtab:
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14c59e81c3a7a24713c156ee26998fcc12de113c 100644 (file)
@@ -0,0 +1 @@
+# vim: set sts=4 sw=4 expandtab:
index 9d910f34be7e8b732277e306908f0a7632dc16a4..806b4ec64869d9ca293fa9c9bfdcd4641ccf6083 100644 (file)
@@ -26,3 +26,4 @@ class UserProfile(models.Model):
 
     class Admin:
         pass
+# vim: set sts=4 sw=4 expandtab:
index 60f00ef0ef347811e7b0c0921b7fda097acd9fcc..c13509e5bec46b0f55bbe0d19e553026580560aa 100644 (file)
@@ -1 +1,2 @@
 # Create your views here.
+# vim: set sts=4 sw=4 expandtab:
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14c59e81c3a7a24713c156ee26998fcc12de113c 100644 (file)
@@ -0,0 +1 @@
+# vim: set sts=4 sw=4 expandtab:
index a283adfbfebfff9438eb3d067919dbab3a55eadf..bb8f68b1bcfca8ffbcc871a4aa03428f6529af9c 100644 (file)
@@ -22,3 +22,4 @@ class Event(models.Model):
 class Registration(models.Model):
     person = models.ForeignKey(User, edit_inline=models.STACKED, num_in_admin=3)
     event  = models.ForeignKey(Event, core=True)
+# vim: set sts=4 sw=4 expandtab:
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14c59e81c3a7a24713c156ee26998fcc12de113c 100644 (file)
@@ -0,0 +1 @@
+# vim: set sts=4 sw=4 expandtab:
index 26d0af133bb993cb64070d137590d486128478d2..df1a1acb87e4f47bad9da600fa589239e04e2055 100644 (file)
--- a/import.py
+++ b/import.py
@@ -80,3 +80,4 @@ for row in c.fetchall():
         p.save()
     except Exception:
         print props
+# vim: set sts=4 sw=4 expandtab:
index d1e981c705437138a022515a25b1d76db395b9f1..e1dd01aeb45b6dd75a9c0ce1402bc26eaacabcd0 100644 (file)
@@ -1 +1,2 @@
 import notify
+# vim: set sts=4 sw=4 expandtab:
index 6094181ae66ccd332ad971ad30b07a0838baa3d8..9587aff22f9338f2011b62dff66b702e766873e0 100644 (file)
@@ -55,3 +55,4 @@ class Influence(models.Model):
         verbose_name = _("Influence")
         verbose_name_plural = _("Influences")
 
+# vim: set sts=4 sw=4 expandtab:
index f078bc9fff03fa62862ae786ac00049ef4e675b0..7b47e8cdab927b6b0761ddacd9ea1ee1bab156cb 100644 (file)
@@ -14,3 +14,4 @@ def influence_saved(instance, created):
     notify([instance.character.player, 'lextalionis@evolution-events.nl'], 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
 
 dispatcher.connect(influence_saved, signals.post_save, Influence)
+# vim: set sts=4 sw=4 expandtab:
index 51cfb495692fb9b6c6b71671eed1a0c10fe00206..71e69ed98628067b473a1d71b040473af35b2d2c 100644 (file)
@@ -37,12 +37,12 @@ def add(request, character_id=None):
     f = InfluenceForm(request=request, initial=initial)
     if (f.is_valid()):
         influence = f.save(commit=False)
-       if (influence.character.player == request.user):
-               influence.save()
-               return HttpResponseRedirect(reverse('influences_influence_detail', args=[influence.id]))
-       else:
-               # TODO: Make this a bit more pretty. Perhaps throw an exception here and add some middleware to catch it?
-               return HttpResponseForbidden("Forbidden -- Trying to submit influence for somebody else's character")
+        if (influence.character.player == request.user):
+                influence.save()
+                return HttpResponseRedirect(reverse('influences_influence_detail', args=[influence.id]))
+        else:
+                # TODO: Make this a bit more pretty. Perhaps throw an exception here and add some middleware to catch it?
+                return HttpResponseForbidden("Forbidden -- Trying to submit influence for somebody else's character")
      
     # Only allow characters of the current user
     f.fields['character']._set_queryset(chars)
@@ -77,3 +77,5 @@ def character_detail(*args, **kwargs):
 @login_required
 def influence_detail(*args, **kwargs):
     return object_detail(*args, **kwargs)
+
+# vim: set sts=4 sw=4 expandtab:
index bcdd55e27be9447bf6b224b8ba0cbc6802509862..ec3efa648265df7f2954cca911ca715fc44e4ca2 100755 (executable)
--- a/manage.py
+++ b/manage.py
@@ -9,3 +9,4 @@ except ImportError:
 
 if __name__ == "__main__":
     execute_manager(settings)
+# vim: set sts=4 sw=4 expandtab:
index ba3582d320d897fbe6efcfa3e3004da143b456fa..dfe7fce421646e63d02c792f1f340fd775822026 100644 (file)
@@ -115,3 +115,4 @@ AUTHENTICATION_BACKENDS = (
 )
 
 AUTH_PROFILE_MODULE = 'base.UserProfile'
+# vim: set sts=4 sw=4 expandtab:
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14c59e81c3a7a24713c156ee26998fcc12de113c 100644 (file)
@@ -0,0 +1 @@
+# vim: set sts=4 sw=4 expandtab:
index b0d028241f7224f7692a5f4b2dd0cafd6d3b0b14..fd3c57a103c360d4412d4f800530e46809f74b8d 100644 (file)
@@ -10,3 +10,4 @@ def static(request):
 
     """
     return {'STATIC_URL_PREFIX': settings.STATIC_URL_PREFIX}
+# vim: set sts=4 sw=4 expandtab:
index b3171e3fd46c25b086e8395fa1f1db6c842c4b85..b420e1f637a0c1a750b21995f2ab09e935ab5981 100644 (file)
@@ -34,4 +34,4 @@ class BaseContextModelForm(BaseModelForm):
 class ContextModelForm(BaseContextModelForm):
     __metaclass__ = ModelFormMetaclass
 
-# vim:set sts=4 ts=4 sw=4 ai et:
+# vim: set sts=4 sw=4 expandtab:
index 110c370a74500672c1749dbaf4bb4b9f7c115ae8..1edf4725f59ad248f3f28ac11f87819cf54b74d4 100644 (file)
@@ -13,3 +13,4 @@ def make_iter(value):
         except TypeError:
             pass
     return [value]
+# vim: set sts=4 sw=4 expandtab:
index 8dca1ba081ae551f70da5ddee9633fefecc436be..74f10837bbb3eaee3e61955c7028a6093f03c29d 100644 (file)
@@ -55,3 +55,4 @@ def notify(recipients, template, context = {}):
         headers    = headers_dict
     )
     msg.send()
+# vim: set sts=4 sw=4 expandtab:
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..14c59e81c3a7a24713c156ee26998fcc12de113c 100644 (file)
@@ -0,0 +1 @@
+# vim: set sts=4 sw=4 expandtab:
diff --git a/urls.py b/urls.py
index 652b7a94da9952462586ef2fca1d5d8cfed21348..c6e6fe18510c95a32f6dab1581762d9ef0183d4a 100644 (file)
--- a/urls.py
+++ b/urls.py
@@ -36,3 +36,4 @@ if settings.DEBUG:
         (r'^static/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': os.path.join(settings.PROJECT_DIR, 'static')}),
     )
+# vim: set sts=4 sw=4 expandtab: