@Evgeniy. Yes at: http://code.google.com/p/django-alfresco/
I have a wheelhouse and it's integrating Django with a Java Open Source project. Today I get to announce the next one, Django Alfresco. We combined the Alfresco's document management capabilities with Django's web tier components. I get mixed reactions when I tell people about this project. Anywhere from, "Why did you go and mess up a good thing" to "This is amazing." The former more than the latter, but I'm going to try to convince you that it is a really good idea to use this project. Jeff Potts who is the ECM lead at Optaros and got the project to a place where it could be released has a post on it and a screencast.
About 9 months ago I got shipped off to work for a client in Dallas, Texas. They where implementing Alfresco to handle the content of their intranet newspaper, mostly for the workflow process. Getting a story from drafts, to pending and then through to the approval process. They needed a web tier to display this content and that's where the issues started. Alfresco has a few of it's own solutions; WCM and Surf. WCM has notoriously had stability issues, but the blocker was that you couldn't search across sites. Surf was very new at the time and it takes about 5 xml files to display and image. I'm probably exaggerating, but that's what it felt like. A portal was the next thought, Liferay or JBoss, but why all the weight of a portal when all we need to do is pull HTML files out of Alfresco.
So we created a simple POC for them using Alfresco's REST interface and Django as the web tier. Simple, easy and it took only a couple days to build. After getting over the initial anxiety of Python, Django and Apache we were on our way.
There are two main functions a news site needs to perform: get a listing of documents based on a category and displaying a detailed view of that content. We have a simple hierarchy structure which maps a space id to a category, so in a sense a folder in Alfresco becomes a category and every piece of content in that folder now belongs to it. Django has deserializers which allow an XML or JSON file to be converted into Django Model object seamlessly. Using an Alfresco Webscript we format the response using Freemarker to a Django friendly XML document. With a Space model we run the following code and like magic we have a list of python objects:
In [1]: from alfresco.models import Space
In [2]: space = Space.objects.all()[0]
In [3]: space.contents.all()
Out[3]:
[Content: 1e66b2b3-2dba-4a5f-9527-de754c3a983e - test-1.html,
Content: 0599e21d-d078-4911-a4a6-8ad5a7ae7f1d - test-2.html]
The responses from Alfresco are cached using whatever Django caching backend you choose. We recommend switching away from the default local memory setting to file based caching or memcached.
To get access to Alfresco's content repository the user needs to be authenticated. Because of this there is no such thing as an anonymous user, but instead a default user. If a user visits the site for the first time they are automatically logged in as the default user that gives them access to basic content. Users that then log into the system with advanced privileges will get access to more content in searches and category displays. Through Django's Authentication Backends we completely circumvent all of Django's authentication and let Alfresco handle it. The Webscripts use an alf_ticket to authenticate users, therefore we had to save that ticket somewhere. Here's what the AlfrescoUser model:
class AlfrescoUser(User):
"""
Alfresco User.
Extends the User model to apply the ticket.
"""
ticket = models.CharField(max_length=50, blank=True,
null=True)
objects = UserManager()
Django Alfresco ships with a sample site which makes it's really easy for users to evaluate the project before jumping in. You can find these install instruction in the code under docs. Unfortunately we don't have these hosted yet, as they aren't complete.
Big thanks goes to Justin Luzier, Ron Bostic and Kris McCuller who codeveloped this with me and to Jeff Potts who took it from a piece of code to something worth sharing.
For more information on it follow @jeffpotts01 or me (screeley) on Twitter.
@Evgeniy. Yes at: http://code.google.com/p/django-alfresco/
I'm a developer out of San Francisco CA working at a startup.
This space will deal with the work I've participated in using the Django framework to build applications for enterprise clients.
Finally, you should follow me on twitter.
"generic z-pak <a href=http://sefsa.org>buy azithromycin</a>"
at 7:53p.m. Aug. 27, 2010 | permalink
"How do i come up with cash from online gambling? <img>http://shrtn.info/smile/ref.php</img>"
at 2:50a.m. Aug. 25, 2010 | permalink
"http://needman.ru замуж за иностранца <a href=http://needman.ru>знакомства с иностранцами</a>"
at 12:59p.m. May 18, 2010 | permalink
"Yebhewjw <a href="http://yebhewjw.de">yebhewjw</a> http://yebhewjw.de yebhewjw http://yebhewjw.de"
at 11:41p.m. April 29, 2010 | permalink
"Thanks for this, unbelievable our developer has a robots no follow tag on our site, no wonder it wasn't being found by the search engines ..."
at 7:40a.m. March 2, 2010 | permalink
"maybe you are right. but how often robots.txt is actually accessed? and how much overhead there is? I'm curious - quantitatively - how big of ..."
at 7:13p.m. Dec. 12, 2009 | permalink
"Lovely idea! Thanks for sharing. I'm gonna have a closer look at the patch for Django 1.2. This could help switching template engines a lot. ..."
at 9:14a.m. Nov. 2, 2009 | permalink
"That was an inspiring post, I think Drupal is great! how could you hate it so much, Thanks for writing, most people don't bother."
at 11:14a.m. Oct. 28, 2009 | permalink
"@Evgeniy. Yes at: http://code.google.com/p/django-alfresco/"
at 10:42a.m. Oct. 22, 2009 | permalink
"Is this released as an open source project?"
at 1:21a.m. Oct. 22, 2009 | permalink
"Interesting, thanks for the examples that you have shared, these are great... Anyway, thanks for the post"
at 7:55a.m. Oct. 16, 2009 | permalink
"Quite inspiring, looks pretty easy aswell, as you have laid it out in such a way, great work, keep it up Thanks for bringing this ..."
at 10:01a.m. Oct. 8, 2009 | permalink
Is this released as an open source project?