Skip to content

Instantly share code, notes, and snippets.

@godfather68
Created May 11, 2020 00:07
Show Gist options
  • Save godfather68/eb23e7a3a7d352713771e4ab20002e3d to your computer and use it in GitHub Desktop.
Save godfather68/eb23e7a3a7d352713771e4ab20002e3d to your computer and use it in GitHub Desktop.
from django.core.management.base import BaseCommand
import os # <= new
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # <= new
class Command(BaseCommand):
help = "Templates Generator"
def handle(self, *args, **kwrags):
self.stdout.write("Generating _base.html template ...")
self.stdout.write('----------------------------------')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment