Forums

Django Leonardo, get Django Systems up and running FAST

Django-Leonardo is a curated project that is a collection of "best" apps, plugins, templates, and extensions for Django. Pre-configured to work together, automated maintenance, modular setup, etc.

It looks really good. I want to install it here to try it out. But their installer makes the assumption you have access to the SUDO command!

I need help to convert it to something that will work. Or I need the libraries they are looking for pre-installed on the system.

Has anybody else tried Leonardo out?

Here is the main project page on GIT: https://github.com/django-leonardo/django-leonardo

Here is a ticket I started for my first attempt at installing it: https://github.com/django-leonardo/django-leonardo/issues/183

Thanks in advance!

Richard Cooke

I don't see any evidence that it requires sudo. The script does end with it starting a local server on port 80 and that won't work on PythonAnywhere. I think you'd just have to hook up the resulting install to a web app and it should be good to go.

Look at the output I posted from my first attempt. There was something sudo it did not like.

They have fixed a dependency so maybe that is ok now?

I am ready and willing to make a new app on the Visrico account. Or if your idle, feel free....

It certainly sounds like it's worth trying again now that they've fixed the dependency. Our standard system image is based on Ubuntu 14.04 right now, so that should be compatible with their stuff.

Ran into a problem trying to test out Leonardo. Ignoring the warnings like the sample below:

(leonardo_venv) 10:59 ~/source/test1 $ ./manage.py bootstrap_site --url=http://github.com/django-leonardo/django-leonardo/raw/master/contrib/bootstrap/demo.yaml/home/visrico/.virtualenvs/leonardo_venv/src/django-leonardo/leonardo/settings.py:74: UserWarning: leonardo_site.local.settings is obsolete use new location  'leonardo_site.local.settings is obsolete use new location')
/home/visrico/.virtualenvs/leonardo_venv/src/django-leonardo/leonardo/settings.py:91: UserWarning: local_settings was not found in $PYTHONPATH !
'local_settings was not found in $PYTHONPATH !')
/home/visrico/.virtualenvs/leonardo_venv/src/django-leonardo/leonardo/settings.py:269: UserWarning: Missing local_settings !
'Missing local_settings !')
/home/visrico/.virtualenvs/leonardo_venv/src/django-leonardo/leonardo/settings.py:287: UserWarning: DEBUG is set to True but, DEBUG tools is not installed please run "pip install django-leonardo[debug]"
warnings.warn('DEBUG is set to True but, DEBUG tools '
/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/dbtemplates/utils/template.py:4: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
  from django.utils.importlib import import_module
[01/Aug/2017 10:59:48] WARNING [py.warnings:9] /home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/dbtemplates/utils/template.py:4: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
  from django.utils.importlib import import_module
/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/feincms/models.py:625: RuntimeWarning: Cannot create content type using leonardo.module.web.widget.application.models.ApplicationWidget for leonardo.module.web.models.page.Page, because applicationwidget_set is already taken.
  RuntimeWarning)

When I tried to execute this line:

./manage.py bootstrap_site --url=http://github.com/django-leonardo/django-leonardo/raw/master/contrib/bootstrap/demo.yaml

It fails with:

Traceback (most recent call last):
File "./manage.py", line 10, in <module> 
  execute_from_command_line(sys.argv)
File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
  utility.execute()
File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
  self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
  self.execute(*args, **cmd_options)
File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
 File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/leonardo_sitestarter/management/commands/bootstrap_site.py", line 38, in handle
 force=force)
File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/leonardo_sitestarter/scaffold_web.py", line 192, in create_new_site
  _handle_regions(regions, page)
File "/home/visrico/.virtualenvs/leonardo_venv/local/lib/python2.7/site-packages/leonardo_sitestarter/scaffold_web.py", line 91, in _handle_regions
  name=w_attrs['base_theme'])

KeyError: 'base_theme'

Which, if you look at the issue ticket I created the last time I tried this, is the same exact error!

Sorry, but that really looks like an issue to raise with Leonardo. If their code is expecting a certain key in a dict then there's not much PythonAnywhere can do to put that key there.

Using VirtualBox.org I setup a VM with Ubuntu 14.04 Server Edition.

I ran their one-line install and it blew up trying to compile PILLOW.

So I downloaded PILLOW source so I could run the auto dependancy installer script. After that I re-did each command the one-liner does - skipping things already done.

In the end, I got stopped at the exact same KeyError as I did on PAW:

https://github.com/django-leonardo/django-leonardo/issues/193

I don't have much experience with YAML or Bootstrap, and I don't have time to figure it out.

thanks for confirming!

I'm working through issues on the newer ticket using the Ubuntu 14 VM. The maintainer is being somewhat helpful, you can follow my progress in detail there. There are a LOT of dependencies that are not documented in a single place. For example, you have to APT-GET these packages so PIP can compile source libraries:

sudo apt install python-pip python-virtualenv python-memcache python-psycopg2 python-imaging python-docutils python-simplejson python-tz python-dev gettext libpq-dev libffi-dev mercurial libjpeg-dev libssl-dev

It appears that most, if not all, of the warnings and errors I was fretting over are normal. At least, despite them the dev server runs and the system seems to be working to some extent.

Now I'm banging my head against the learning curve I think. They don't seem to have an end-user tutorial - just an empty topic outline. hehehe So I'm trying to figure out what one does next?

@glenn: Yes, at this stage I have a standard Django 1.8 (PY2.7) project with manage.py and settings. I could easily create a wsgi to serve that up. When I get to that stage, I'll post it here for reference.