More whitespace cleanup.

This commit is contained in:
Griatch 2012-03-30 23:57:04 +02:00
parent c0322c9eae
commit 45c5be8468
43 changed files with 1116 additions and 1131 deletions

View file

@ -5,17 +5,17 @@ from django.db import models
class ServerConfigManager(models.Manager):
"""
This ServerConfigManager implements methods for searching
This ServerConfigManager implements methods for searching
and manipulating ServerConfigs directly from the database.
These methods will all return database objects
These methods will all return database objects
(or QuerySets) directly.
ServerConfigs are used to store certain persistent settings for the
ServerConfigs are used to store certain persistent settings for the
server at run-time.
Evennia-specific:
conf
conf
"""
def conf(self, key=None, value=None, delete=False, default=None):
@ -27,13 +27,13 @@ class ServerConfigManager(models.Manager):
elif delete == True:
for conf in self.filter(db_key=key):
conf.delete()
elif value != None:
elif value != None:
conf = self.filter(db_key=key)
if conf:
conf = conf[0]
else:
conf = self.model(db_key=key)
conf.value = value # this will pickle
conf = self.model(db_key=key)
conf.value = value # this will pickle
else:
conf = self.filter(db_key=key)
if not conf: