summaryrefslogtreecommitdiff
path: root/pgweb/docs/models.py
diff options
context:
space:
mode:
authorMagnus Hagander2019-01-17 14:30:25 +0000
committerMagnus Hagander2019-01-17 14:35:39 +0000
commit87237f6536a1e6df112ca34818cf8459cb04fc68 (patch)
tree1c85c7d11382bb7ef6a2c98e780df7b8ffd59e8d /pgweb/docs/models.py
parentb2ed4946551c098079d1a156b222d4ebf5c85cba (diff)
Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
Diffstat (limited to 'pgweb/docs/models.py')
-rw-r--r--pgweb/docs/models.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/pgweb/docs/models.py b/pgweb/docs/models.py
index a2754b60..7a522147 100644
--- a/pgweb/docs/models.py
+++ b/pgweb/docs/models.py
@@ -2,32 +2,32 @@ from django.db import models
from pgweb.core.models import Version
class DocPage(models.Model):
- id = models.AutoField(null=False, primary_key=True)
- file = models.CharField(max_length=64, null=False, blank=False)
- version = models.ForeignKey(Version, null=False, blank=False, db_column='version', to_field='tree')
- title = models.CharField(max_length=256, null=True, blank=True)
- content = models.TextField(null=True, blank=True)
+ id = models.AutoField(null=False, primary_key=True)
+ file = models.CharField(max_length=64, null=False, blank=False)
+ version = models.ForeignKey(Version, null=False, blank=False, db_column='version', to_field='tree')
+ title = models.CharField(max_length=256, null=True, blank=True)
+ content = models.TextField(null=True, blank=True)
- def display_version(self):
- """Version as used for displaying and in URLs"""
- if self.version.tree == 0:
- return 'devel'
- else:
- return str(self.version.numtree)
+ def display_version(self):
+ """Version as used for displaying and in URLs"""
+ if self.version.tree == 0:
+ return 'devel'
+ else:
+ return str(self.version.numtree)
- class Meta:
- db_table = 'docs'
- # Index file first, because we want to list versions by file
- unique_together = [('file', 'version')]
+ class Meta:
+ db_table = 'docs'
+ # Index file first, because we want to list versions by file
+ unique_together = [('file', 'version')]
class DocPageAlias(models.Model):
- file1 = models.CharField(max_length=64, null=False, blank=False, unique=True)
- file2 = models.CharField(max_length=64, null=False, blank=False, unique=True)
+ file1 = models.CharField(max_length=64, null=False, blank=False, unique=True)
+ file2 = models.CharField(max_length=64, null=False, blank=False, unique=True)
- def __unicode__(self):
- return u"%s <-> %s" % (self.file1, self.file2)
+ def __unicode__(self):
+ return u"%s <-> %s" % (self.file1, self.file2)
- # XXX: needs a unique functional index as well, see the migration!
- class Meta:
- db_table = 'docsalias'
- verbose_name_plural='Doc page aliases'
+ # XXX: needs a unique functional index as well, see the migration!
+ class Meta:
+ db_table = 'docsalias'
+ verbose_name_plural='Doc page aliases'