See https://github.com/stephenmcd/mezzanine/issues/1512
On Mon, Apr 18, 2016 at 8:08 PM, Cameron Burnett <[email protected]> wrote: > Probably an easy question. I'm just a little confused about how the > templates are meant to work. I'm using Mezzanine 4.1.0, Django 1.8.11, and > Python 3.3.6. > > If I run... > > python manage.py collecttemplates -t base.html > > > I get the following traceback... > > Traceback (most recent call last): > File "manage.py", line 14, in <module> > execute_from_command_line(sys.argv) > File > "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py", > line 354, in execute_from_command_line > utility.execute() > File > "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/__init__.py", > line 346, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py", > line 394, in run_from_argv > self.execute(*args, **cmd_options) > File > "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/django/core/management/base.py", > line 445, in execute > output = self.handle(*args, **options) > File > "/home/cameron/.pyenv/versions/django18/lib/python3.3/site-packages/mezzanine/core/management/commands/collecttemplates.py", > line 42, in handle > to_dir = settings.TEMPLATE_DIRS[0] > IndexError: tuple index out of range > > > So I added the following to settings.py which solved my problem but I got > a message saying that it was no longer the way to do it... > > TEMPLATE_DIRS = ( > PROJECT_ROOT + '/templates', > ) > > WARNINGS: > ?: (1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django > 1.8 and the TEMPLATES dictionary takes precedence. You must put the values > of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS. > > Copied 1 template > > > > The TEMPLATES section is just standard. I haven't changed it. It's already > got a path for "templates" but it doesn't seem to use it. > > TEMPLATES = [ > { > "BACKEND": "django.template.backends.django.DjangoTemplates", > "DIRS": [ > os.path.join(PROJECT_ROOT, "templates") > ], > "APP_DIRS": True, > "OPTIONS": { > "context_processors": [ > "django.contrib.auth.context_processors.auth", > "django.contrib.messages.context_processors.messages", > "django.template.context_processors.debug", > "django.template.context_processors.i18n", > "django.template.context_processors.static", > "django.template.context_processors.media", > "django.template.context_processors.request", > "django.template.context_processors.tz", > "mezzanine.conf.context_processors.settings", > "mezzanine.pages.context_processors.page", > ], > "builtins": [ > "mezzanine.template.loader_tags", > ], > }, > }, > ] > > > > So, how am I meant to do it??? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
