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
import os, shutil | |
from django.conf import settings | |
from django.core.management.base import NoArgsCommand | |
from django.core.management import call_command | |
class Command(NoArgsCommand): | |
def handle_noargs(self, **options): | |
fixtures_dir = os.path.join(settings.PROJECT_ROOT, 'demo', 'fixtures') |
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
" Formatting { | |
set showbreak=>\ \ \ " Long line wrap beginning of new line | |
set nowrap " Don't wrap long lines | |
set smartindent " Indent at the same level of the previous line | |
set shiftwidth=4 " Use indents of 4 spaces | |
set expandtab " Tabs are spaces, not tabs | |
set tabstop=4 " An indentation every four columns | |
set softtabstop=4 " Let backspace delete indent | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
set splitright " Puts new vsplit windows to the right of the current |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import shutil | |
import warnings | |
from django.core.management import execute_from_command_line | |
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT |
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
# Advert Snippet | |
class AdvertPlacement(models.Model): | |
page = ParentalKey('wagtailcore.Page', related_name='advert_placements') | |
advert = models.ForeignKey('demo.Advert', related_name='+') | |
class Advert(models.Model): | |
page = models.ForeignKey( | |
'wagtailcore.Page', |
NewerOlder