Techism2 is a project mainly written in JAVASCRIPT and PYTHON, based on the Apache-2.0 license.
./manage.py test techism2
$ cd techism2
$ ./manage.py runserver
The following URLs are available:
$ hg clone http://bitbucket.org/wkornewald/django-nonrel
$ cd django-nonrel
$ zip -r django.zip django
$ cp django.zip <path-to-techism2>/zip-packages/django.zip
$ hg clone http://bitbucket.org/wkornewald/djangoappengine
$ cp -a djangoappengine <path-to-techism2>
$ rm -rf <path-to-techism2>/.hg*
$ rm -rf <path-to-techism2>/djangotoolbox
$ cp -a djangotoolbox/djangotoolbox <path-to-techism2>
$ rm -rf <path-to-techism2>/gaeauth
$ cp -a django-gaeauth/gaeauth <path-to-techism2>
Download django-openid-auth-X.Y.tar.gz from https://launchpad.net/django-openid-auth
$ tar -xvzf django-openid-auth-X.Y.tar.gz
$ cp -a django-openid-auth-X.Y/django_openid_auth <path-to-techism2>
Download gaepytz-YYYYX.tar.gz from http://pypi.python.org/pypi/gaepytz
$ tar -xvzf gaepytz-YYYYX.tar.gz
$ cp -a gaepytz-YYYYX/pytz <path-to-techism2>
$ hg clone https://html5lib.googlecode.com/hg/ html5lib
$ cd html5lib/python
$ zip -r html5lib.zip html5lib
$ cp html5lib.zip <path-to-techism2>/zip-packages/html5lib.zip
Download python-openid-X.Y.Z.tar.gz from http://pypi.python.org/pypi/python-openid
$ tar -xvzf python-openid-X.Y.Z.tar.gz
$ cd python-openid-X.Y.Z
$ zip -r openid.zip openid
$ cp openid.zip <path-to-techism2>/zip-packages/openid.zip
./manage.py deploy
./manage.py shell
from techism2 import migration
migration.fetch_events_from_mixxt('mixxt_events.json')
migration.fetch_archive_from_mixxt('mixxt_archive.json')
(optional: delete existing data, see below)
migration.import_from_json('mixxt_events.json')
migration.import_from_json('mixxt_archive.json')
quit()
Open the "Interactive Console" (http://localhost:8000/_ah/admin/interactive), paste this and run the program:
from techism2.models import Location
from techism2.models import Event
from random import choice
# Available tags (higher weight to Pyhton and HTML)
tags=["Java","Python","Python","Python","PHP","NoSQL",".NET","MySQL","Google","Scrum","Open Source","Social","Linux","Mac","HTML","HTML","HTML","JavaScript"]
# Available cities
cities=["München"]
# Available streets
streets=["Leopoldstr.","Dachauer Str.", "Prinzregentenstr.", "Hauptbahnhof", "Marienplatz"]
# Create 10 locations, choose a random city and street
locations=[]
for i in range(1,10):
l = Location(
name="Location " + str(i),
street=choice(streets),
city=choice(cities),
latitude=48.1372,
longitude=11.57542)
locations.append(l)
l.save()
# Create 31 events, from 10 days in past to 20 days in future.
# Choose one of the previously created locations for each event.
# Choose two of the available tags.
for i in range(-5,10):
e = Event(
title="Event " + str(i),
date_time_begin=datetime.datetime.today() + datetime.timedelta(days=i),
url="http://www.google.de",
description="Some description of event " + str(i) + ".",
location=choice(locations),
tags=[choice(tags),choice(tags)],
published=True)
e.update_archived_flag()
e.save()
from techism2.models import Location
from techism2.models import Event
event_list = Event.objects.all()
for event in event_list:
event.delete()
location_list = Location.objects.all()
for location in location_list:
location.delete()