Skip to content

Commit 9b76a5a

Browse files
clean up
1 parent 2d5de25 commit 9b76a5a

23 files changed

+93
-9
lines changed

examples/simple/books/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
"""
2+
Books app.
3+
"""
4+
15
default_app_config = 'books.apps.Config'

examples/simple/books/admin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Books module admin.
3+
"""
4+
15
from django.contrib import admin
26

37
from .models import *

examples/simple/books/apps.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
try:
2-
from django.apps import AppConfig
1+
from django.apps import AppConfig
32

4-
class Config(AppConfig):
5-
"""Config."""
3+
__all__ = ('Config',)
64

7-
name = 'books'
8-
label = 'books'
95

10-
__all__ = ('Config',)
6+
class Config(AppConfig):
7+
"""Config."""
118

12-
except ImportError:
13-
pass
9+
name = 'books'
10+
label = 'books'

examples/simple/books/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Constants.
3+
"""
4+
15
BOOK_PUBLISHING_STATUS_PUBLISHED = 'published'
26
BOOK_PUBLISHING_STATUS_NOT_PUBLISHED = 'not_published'
37
BOOK_PUBLISHING_STATUS_IN_PROGRESS = 'in_progress'

examples/simple/books/management/commands/books_create_test_data.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Create test book data.
3+
"""
4+
15
from __future__ import unicode_literals
26

37
from django.core.management.base import BaseCommand, CommandError

examples/simple/books/mixins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Mixins.
3+
"""
4+
15
from django.http import JsonResponse
26

37
__all__ = ('JSONResponseMixin',)

examples/simple/books/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Models.
3+
"""
4+
15
from django.conf import settings
26
from django.db import models
37
from django.utils.translation import ugettext, ugettext_lazy as _

examples/simple/books/serializers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Serializers.
3+
"""
4+
15
from rest_framework import serializers
26
from rest_framework_tricks.serializers import (
37
HyperlinkedModelSerializer,

examples/simple/books/urls.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Urls.
3+
"""
4+
15
from django.conf.urls import url, include
26

37
from rest_framework_extensions.routers import ExtendedDefaultRouter

examples/simple/books/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Views.
3+
"""
4+
15
from django.views.generic import ListView, TemplateView
26
from django.db.models import Avg, Count, DecimalField, F, Max, Min, Sum
37

0 commit comments

Comments
 (0)