~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to sphinxdoc/models.py

removed unmaintained sphinx-doc; added managemnt command to create sphinx source code documentation with some own css; serve pure html for documentation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# encoding: utf-8
2
 
"""
3
 
Models for django-sphinxdoc.
4
 
"""
5
 
 
6
 
from django.db import models
7
 
from django.urls import reverse
8
 
 
9
 
 
10
 
class App(models.Model):
11
 
    name = models.CharField(max_length=100)
12
 
    slug = models.SlugField(unique=True,
13
 
                            help_text=u'Used in the URL for the app. Must be unique.')
14
 
    path = models.CharField(max_length=255)
15
 
 
16
 
    def __unicode__(self):
17
 
        return self.name
18
 
 
19
 
    def get_absolute_url(self):
20
 
        return reverse('doc-index', kwargs={'slug': self.slug})
21
 
 
22
 
    class Meta:
23
 
        app_label = 'sphinxdoc'