Skip to content

Instantly share code, notes, and snippets.

View PCreations's full-sized avatar

Pierre Criulanscy PCreations

View GitHub Profile
CONFIG_ROOT = os.path.dirname(os.path.dirname(__file__))
PROJECT_ROOT = os.path.abspath(os.path.join(CONFIG_ROOT, os.pardir))
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = CONFIG_ROOT + MEDIA_URL
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
STATICFILES_DIRS = (
os.path.join(PROJECT_ROOT, 'static'),
)
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
DJANGO_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
)
THIRD_PARTY_APPS = (
from .base import *
THIRD_PARTY_APPS += ('third.party.package.needed.in.test.env',)
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + PROJECT_APPS
from .base import *
DEBUG = True
TEMPLATE_DEBUG = DEBUG
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:
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%'),
#listing all Option objects
GET /options/
#listing all Service objects
GET /services/
#adding a new Option object
POST /options/
#adding a new Service object