This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CONFIG_ROOT = os.path.dirname(os.path.dirname(__file__)) | |
| PROJECT_ROOT = os.path.abspath(os.path.join(CONFIG_ROOT, os.pardir)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| STATIC_URL = '/static/' | |
| MEDIA_URL = '/media/' | |
| MEDIA_ROOT = CONFIG_ROOT + MEDIA_URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| STATICFILES_FINDERS = ( | |
| 'django.contrib.staticfiles.finders.FileSystemFinder', | |
| 'django.contrib.staticfiles.finders.AppDirectoriesFinder', | |
| ) | |
| STATICFILES_DIRS = ( | |
| os.path.join(PROJECT_ROOT, 'static'), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Operations to perform: | |
| Synchronize unmigrated apps: messages, staticfiles | |
| Apply all migrations: contenttypes, auth, sessions, admin | |
| Synchronizing apps without migrations: | |
| Creating tables... | |
| Running deferred SQL... | |
| Installing custom SQL... | |
| Running migrations: | |
| Rendering model states... DONE | |
| Applying contenttypes.0001_initial... OK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DJANGO_APPS = ( | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.sessions', | |
| 'django.contrib.messages', | |
| 'django.contrib.staticfiles', | |
| ) | |
| THIRD_PARTY_APPS = ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from .base import * | |
| THIRD_PARTY_APPS += ('third.party.package.needed.in.test.env',) | |
| INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + PROJECT_APPS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from .base import * | |
| DEBUG = True | |
| TEMPLATE_DEBUG = DEBUG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.conf.urls import include, url | |
| from django.conf.urls.static import static | |
| from django.conf import settings | |
| from django.contrib import admin | |
| urlpatterns = [ | |
| url(r'^admin/', include(admin.site.urls)), | |
| ] | |
| if settings.SERVE_LOCAL_MEDIA: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from decimal import Decimal | |
| from django.db import models | |
| from django.utils.translation import ugettext_lazy as _ | |
| VAT_CHOICES = ( | |
| (Decimal("0.00"), '0%'), | |
| (Decimal("2.10"), '2.1%'), | |
| (Decimal("5.50"), '5.5%'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #listing all Option objects | |
| GET /options/ | |
| #listing all Service objects | |
| GET /services/ | |
| #adding a new Option object | |
| POST /options/ | |
| #adding a new Service object |