Difference between revisions of "Mezzanine"

From Jon's Wiki
m
 
(2 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
Now we have an isolated Python environment (check out your prompt!), where we can install all sorts of stuff without contaminating the main system Python environment, and without needing sudo:
 
Now we have an isolated Python environment (check out your prompt!), where we can install all sorts of stuff without contaminating the main system Python environment, and without needing sudo:
  
  pip install mezzanine feedburner html5lib django-haystack pyelasticsearch
+
  pip install mezzanine feedburner html5lib
  
 
This should install Mezzanine and its various dependencies. Now we can create a project:
 
This should install Mezzanine and its various dependencies. Now we can create a project:
Line 26: Line 26:
  
 
In the WordPress dashboard, you can export your blog as an XML file. Save this somewhere to use it in the above command, and specify the Mezzanine username that will own the imported posts.
 
In the WordPress dashboard, you can export your blog as an XML file. Save this somewhere to use it in the above command, and specify the Mezzanine username that will own the imported posts.
 +
 +
== Full text search using Elastic/Haystack ==
 +
Install stuff:
 +
 +
pip install pyelasticsearch requests
 +
pip install git+https://github.com/toastdriven/django-haystack.git#egg=django-haystack
 +
 +
'''...TODO'''
 +
 +
== References ==
 +
 +
* [http://mezzanine.jupo.org/docs/ Mezzanine documentation].
 +
* [http://celeryproject.org/ Celery] is a task queue manager. Backends for RabbitMQ, Reddis, etc. Django integration.
 +
* [http://django-haystack.readthedocs.org/en/latest/tutorial.html Haystack tutorial]. Haystack is a full-text search broker for Django. Supports Solr, Xapian, Elasticsearch.
 +
* James Aylett, [http://tartarus.org/james/diary/2009/10/20/simple-search-for-django-using-haystack-and-xapian Simple search for Django using Haystack and Xapian].
 +
* [https://github.com/jaylett/django_audited_model django-audited-model].
 +
* Github gist: [https://gist.github.com/2026107 Install ElasticSearch on Ubuntu 12.04].

Latest revision as of 02:10, 14 November 2012

To get started:

sudo apt-get install python-virtualenv python-dev

Then:

virtualenv mezzanine-projects
cd mezzanine-projects
source bin/activate

Now we have an isolated Python environment (check out your prompt!), where we can install all sorts of stuff without contaminating the main system Python environment, and without needing sudo:

pip install mezzanine feedburner html5lib

This should install Mezzanine and its various dependencies. Now we can create a project:

mezzanine-project mysite
cd mysite
python manage.py syncdb
python manage.py runserver
xdg-open 'http://localhost:8000/'

Mezzanine comes packed with a bunch of useful commands, like importing our WordPress blog, for instance:

python manage.py import_wordpress -u wordpress-export.xml -m username

In the WordPress dashboard, you can export your blog as an XML file. Save this somewhere to use it in the above command, and specify the Mezzanine username that will own the imported posts.

Full text search using Elastic/Haystack

Install stuff:

pip install pyelasticsearch requests
pip install git+https://github.com/toastdriven/django-haystack.git#egg=django-haystack

...TODO

References