Skip to content

Latest commit

 

History

History
133 lines (79 loc) · 3.94 KB

website.rst

File metadata and controls

133 lines (79 loc) · 3.94 KB

Managing openrave.org

openrave.org uses Django for managing documentation, news, and blogs. The code is maintained at:

https://github.com/rdiankov/openrave.org

Using system similar to djangoproject.com

Install

  1. Create a virtualenv
  2. Install dependencies:
apt-get install postgresql postgresql-client libpq-dev memcached python-dev gettext
pip install -r deploy-requirements.txt

If you only need to deploy, and don't need to test any changes, you can use local-requirements.txt

Dependencies for Apache Webserver Deployment:

apt-get install libapache2-mod-wsgi
a2enmod wsgi
  1. Set up databases, as per django_website/settings/www.py

  2. Create a 'openrave.org_secrets.json' file in the directoy above the checkout, containing something like:

    { "secret_key": "xyz",
      "superfeedr_creds": ["any@email.com", "some_string"] }
    
  3. Initial DB Setup:

    ./manage.py syncdb
    ./manage.py convert_to_south docs
    

Future DB Update:

./manage.py syncdb
./manage.py migrate
  1. For Docs:

    ./manage.py loaddata doc_releases.json
    ./manage.py update_docs
    
  2. For adding new document:

export OPENRAVE_VERSION=0.8.0
export DOC_LANG=en
DJANGO_SETTINGS_MODULE=openrave_website.settings python -c "from openrave_website.docs import models; models.DocumentRelease.objects.create(lang='$DOC_LANG',version='$OPENRAVE_VERSION', scm=models.DocumentRelease.GIT, scm_url='https://github.com/rdiankov/openrave/tree/v$OPENRAVE_VERSION', is_default=False);"

Re-index the documents:

./manage.py update_docs

Mini script to convert latest_stable docdata to a specific version:

export OPENRAVE_VERSION=0.8.0
unzip openravejson-latest_stable.zip
mv openravejson-latest_stable openravejson-$OPENRAVE_VERSION
zip -r openravejson-$OPENRAVE_VERSION.zip openravejson-$OPENRAVE_VERSION
unzip openravehtml-latest_stable.zip
mv openravehtml-latest_stable openravehtml-$OPENRAVE_VERSION
zip -r openravehtml-$OPENRAVE_VERSION.zip openravehtml-$OPENRAVE_VERSION
  1. Internationalization. For Japanese, edit locale/ja_JP/LC_MESSAGES/django.po file:

    django-admin.py makemessages --locale=ja_JP
    django-admin.py compilemessages --locale=ja_JP
    
  2. Running Locally:

    python manage.py runserver
    
  3. For deployment checkout fabfile.py:

    https://openrave.svn.sourceforge.net/svnroot/openrave/openrave.org/fabfile.py

Creating PostgreSQL Database

sudo -u postgres psql --command "CREATE ROLE openrave PASSWORD 'testpass' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;"
createdb --host localhost --username openrave --encoding UTF-8 openrave_website

Editing

All HTML templates are in openrave_website/templates. Tutorial on HTML + Django syntax template language

Only write English in the HTML files and only inside these translation blocks:

Videos and image filenames should also be written within the translation blocks so that we can substitute them with the language equivalent.

Translating to Japanese

When English templates are done, execute:

django-admin.py makemessages --locale=ja_JP

Open locale/ja_JP/LC_MESSAGES/django.po and edit the translations. When done execute:

django-admin.py compilemessages --locale=ja_JP

Restart the mujinwww server and the new translation should be visible!

Maintain

GetSentry Account