software powering 0xdb.org and Pad.ma is called pandora now

This commit is contained in:
j 2010-02-16 15:52:34 +05:30
parent e724c67f05
commit 7c0e365a0a
46 changed files with 30 additions and 21 deletions

16
README
View file

@ -1,8 +1,7 @@
To setup a local instance of pandora:
To setup a local instance of 0xdb:
bzr branch http://code.0xdb.org/oxdb2 oxdb
cd oxdb
bzr branch http://code.0xdb.org/pandora pandora
cd pandora
virtualenv .
pip -E . install -r requirements.txt
@ -17,13 +16,12 @@ also it uses system python moduels, so make sure you have
ipython, dbmodule(psycopg2, python-mysqldb,..)
installed via apt-get/pip/easy_install in your system path.
Install rabbitmq and carrot:
sudo apt-get install rabbitmq-server
sudo rabbitmqctl add_user oxdb password
sudo rabbitmqctl add_vhost /oxdb
sudo rabbitmqctl set_permissions -p /oxdb oxdb "^oxdb-.*" ".*" ".*"
sudo rabbitmqctl add_user pandora password
sudo rabbitmqctl add_vhost /pandora
sudo rabbitmqctl set_permissions -p /pandora pandora "^pandora-.*" ".*" ".*"
update BROKER_* settings in local_settings.py:
@ -32,5 +30,3 @@ Development:
we are using django, http://docs.djangoproject.com/en/dev/
communication between webserver and background tasks is done via rabbitmq
http://github.com/ask/carrot/ for more info on the lib used to communicate

12
pandora/app/admin.py Normal file
View file

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
from django.contrib import admin
import models
class PageAdmin(admin.ModelAdmin):
search_fields = ['name', 'body']
admin.site.register(models.Page, PageAdmin)

View file

@ -701,5 +701,6 @@ def apidoc(request):
'name': f[4:],
'doc': trim(globals()[f].__doc__).replace('\n', '<br>\n')
})
context = RequestContext(request, {'api': api})
context = RequestContext(request, {'api': api,
'sitename': settings.SITENAME,})
return render_to_response('api.html', context)

View file

@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
# Django settings for oxdb project.
# Django settings for pandora project.
import os
from os.path import join
SITENAME = 'Oxdb'
URL = 'Oxdb.org'
SITENAME = 'Pandora'
URL = 'pandora.Oxdb.org'
PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__))
@ -33,9 +33,9 @@ DATABASE_PORT = '' # Set to empty string for default. Not used with
#rabbitmq connection settings
BROKER_HOST = "127.0.0.1"
BROKER_PORT = 5672
BROKER_USER = "oxdb"
BROKER_PASSWORD = "0xdb"
BROKER_VHOST = "/oxdb"
BROKER_USER = "pandora"
BROKER_PASSWORD = "box"
BROKER_VHOST = "/pandora"
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@ -88,7 +88,7 @@ MIDDLEWARE_CLASSES = (
'oxdjango.middleware.ExceptionMiddleware',
)
ROOT_URLCONF = 'oxdb.urls'
ROOT_URLCONF = 'pandora.urls'
TEMPLATE_DIRS = (
join(PROJECT_ROOT, 'templates'),

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

View file

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>0xdb.org API</title>
<title>{{sitename}} API</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="/static/js/jquery/jquery.js"></script>
</head>
<body>
<h1>Public API</h1>
<a href="http://code.0xdb.org/oxdb2/annotate/head%3A/oxdb/backend/views.py">look inside</a>
<h1>{{sitename}} Public API</h1>
<a href="http://code.0xdb.org/pandora/annotate/head%3A/pandora/backend/views.py">look inside</a>
<div>
{% for f in api %}
<div>