Setting up a sample Ella project

8 views
Skip to first unread message

Aidas Bendoraitis [aka Archatas]

unread,
Apr 17, 2009, 11:31:42 AM4/17/09
to Ella Project
Hello!

I am trying to set up an example Ella project locally, but have some
difficulties. I haven't found any detailed installation instructions
except the file "doc/00.intro.txt". So this is what I did:

1. I downloaded the latest Ella code from the github, extracted that
and installed it globally using:
python setup.py install

2. Then I copied the "tests/example_project" to my preferred place
(not under python path), called it "ella_example" and globally
replaced all strings "example_project" to "ella_example" in the
imports and settings in that folder.

3. I created a file "settings/local.py" and put the following into it:
DATABASE_NAME = 'ella_ella_example.db'
and run
python manage.py syncdb

4. I set up a virtual server for the demo project:
Listen 9021
<VirtualHost *:9021>
SetHandler mod_python
PythonHandler django.core.handlers.modpython
PythonPath "sys.path + [r'/Library/Projects',]"
SetEnv DJANGO_SETTINGS_MODULE ella_example.settings
PythonDebug On
PythonAutoReload On
PythonInterpreter ella_example
</VirtualHost>

5. When I tried the site, I got an error about missing "markdown2"
module so I found and installed that.

6. Trying to run the site again, I got this error:
ImproperlyConfigured: 'HitCountAdmin.list_filter[0]' refers to field
'placement__category' that is missing from model 'HitCount'.

This is where I stopped. That seems too ella-specific. Do you know
what could be done wrong in this workflow? Is the deployment of Ella
projects still in progress? Are there any limitations?

Honza Král

unread,
Apr 17, 2009, 11:43:52 AM4/17/09
to ella-p...@googlegroups.com
Hi,

sorry about that, we rely on some patches being applied to Django
itself, since we use advanced field lookups in our admin.

Either go and remove anything in admin defintion from list_filter that
has '__' in it or use our patched version of ella that can be found
at:
http://github.com/HonzaKral/django/tree/ella

that should help and if not please let us know.

Thanks very much for trying out Ella.

Honza Král
E-Mail: Honza...@gmail.com
Phone: +420 606 678585

Aidas Bendoraitis [aka Archatas]

unread,
Apr 20, 2009, 1:22:01 PM4/20/09
to Ella Project
Hi Honza!
Thanks for your answer.

I chose to remove double-underscored properties from the admin
settings.

I can access the root of the example site showing some default multi-
color layout without any navigation for the category "Africa". I can
also access the subcategories by entering urls like "/north-africa/"
with the same layout, but different titles.

But when I want to access the administration under "/newman/", I get
an OperationalError "unable to open database file". Note, that the
categories are also from the database, so the webserver has access to
the database. The traceback of the error page tells that the error
occurred when creating a session for the user.

I tried to get and write data in the shell and it works.

My settings/local.py has the following:
from os.path import abspath, join, dirname
DATABASE_NAME = abspath(join( dirname(__file__), '..',
'ella_ella_example.db'))
So the path for the database is set absolutely. I even set 0777
permissions for the database file.

Also I tried to check if the data is accessible in the shell by the
following:
from django.db import models
for m in models.get_models():
m.objects.count()
While executing that, I got an error that tables from Tagging app do
not exist. So either they should be added to the INSTALLED_APPS of the
example_project or the dependency should be removed.

Hopefully, the solutions to these problems can be found so that it's
possible to finalize the setup.

Best regards,
Aidas Bendoraitis

Honza Král

unread,
Apr 20, 2009, 5:50:57 PM4/20/09
to ella-p...@googlegroups.com
Hi Aidas,
unfortunately I have no idea of what could be wrong with your setup. I
have attached my sample project using ella, it has no data in the
database and no templates but is sure to work for me (with newman). If
it doesn't work for you there is something amiss with your
environment. if it works, try using settings from this sample with the
fixtures and templates from the example project.

Also a usefull thing you might want to try is running the ella test
suite (tests/unit_project/run_tests.py), you will need nose and
djangosanetesting ( http://devel.almad.net/trac/django-sane-testing/ )
installed for that.

There are some uncharted and undocumented dependencies, we have it
high on our TODO listi to get those out or at least in the open.

Please let me know if this is of any help.


Honza Král
E-Mail: Honza...@gmail.com
Phone: +420 606 678585



royalblog.tar.bz2

Aidas Bendoraitis [aka Archatas]

unread,
Apr 22, 2009, 1:06:50 PM4/22/09
to Ella Project
Hello Honza again!

I found out that /newman/ works for example_project when I run the
development webserver from Django itself.

But still I got problems:
* I can create articles there, but not the galleries, Rozhovory
(whatever that is), positions, photos, nor surveys.
* The search widget for categories open a popup widget and is loading
forever.
* If I go to Photos -> Photos -> Add and choose a photo, I cannot save
it and see the error that POST method is not supported in the Firebug.

When I tried the attached royalblog project, I found dependencies to
install:
* djangomarkup
* django_extensions
* django-versionedcache and memcache (optionally)

The other problem is that royalblog comes without templates and
without media. After copying the media and templates from
example_project and changing the prefixes for media in the settings, I
still have problems I found in the example_project.

Also it's not clear how to manage sites or users in the /newman/ or
elsewhere. How the publishables, placements, and sources relate
together and what is the purpose of each of them?

Regards,
Aidas

Honza Král

unread,
Apr 22, 2009, 2:25:11 PM4/22/09
to ella-p...@googlegroups.com
Hi,
The top menu in newmajn is hardcoded and contains links to
applications that you do not have in your INSTALLED_APPS:

Galerie - galleries
Rozhovory - interviews
Etc.

This will be a user configurable menu once finished.

I know we are lacking some (ehm...any) docummentation, so until we fix that:

Publishable is base model for everything that can be published - it
has some field common to all such models (title, slug, etc) and
methods to access then that can be overriden by it's children.

Placement is a model that defines publication of a Publishable
instance - it's category and publish_from determines the object's URL.

Listing places a placement in any number of categories - all of the
categories where link to the publishable will appear.

Source is a model used for citing source, like "reuters"

Rest should be pretty much obvious.



Newman currently doesn't support managing Users and Sites, we still
use normal django's admin for that.

Remember that newman is work in progress and while it is currently our
top prioritY to get it working ASAP (we have 3 people working on it
full-time).




On 4/22/09, Aidas Bendoraitis [aka Archatas]
--
Sent from my mobile device

Honza Král

unread,
Apr 22, 2009, 2:29:29 PM4/22/09
to ella-p...@googlegroups.com
Sorry, I hit sent prematurely....


Newman is still not yet ready for production use, we expect it to be
feature ready soon enough (matter of weeks).

Thanks for your patience....

Honza
Reply all
Reply to author
Forward
0 new messages