Has anyone successfully added Mezzanine to a project started with 
cookiecutter <https://github.com/pydanny/cookiecutter-django>?

I'm having trouble adding Mezzanine to an existing project based on the
cookiecutter-django tool. It uses configuration classes in settings.py 
(Common,
Local, Production) rather than a local_settings.py file.

I've tried making the relevant changes to my settings.py and urls.py to
accomodate Mezzanine but I'm having trouble with set_dynamic_settings(). I
added the set_dynamic_settings call to the end of my Local class but the 
other
variables defined in Common (which it inherits from) are out of scope.

I'm getting various KeyErrors in set_dynamic_settings, e.g:

    File 
"/Users/wesvetter/Desktop/Code/cookie_mez_project/cookie_mez/config/settings.py",
 
line 315, in <module>
      class Local(Common):
    File 
"/Users/wesvetter/Desktop/Code/cookie_mez_project/cookie_mez/config/settings.py",
 
line 369, in Local
      set_dynamic_settings(all_the_variables)
    File 
"/Users/wesvetter/.virtualenvs/cookie_mez/lib/python2.7/site-packages/mezzanine/utils/conf.py",
 
line 89, in set_dynamic_settings
      cp not in s["TEMPLATE_CONTEXT_PROCESSORS"]):
  KeyError: u'TEMPLATE_CONTEXT_PROCESSORS'


I'm also not sure what to do with the DATABASE dict in local_settings.py. 
The
only database thing I need set is the DatabaseURL but set_dynamic_settings()
calls items() on s['DATABASE'] and throws an error if I don't pass something
in.

I made an (essentially) empty cookiecutter project and then added Mezzanine 
to
demonstrate this. The code is visible here:
https://github.com/wesvetter/cookie_mez

If someone can point me in the right direction (or even send a 
pull-request) I would greatly appreciate it.

Thanks,
-Wes

-- 
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.

Reply via email to