Commit 27cd5bb3 authored by Jasper St. Pierre's avatar Jasper St. Pierre

Update README and start using South for migrations.

parent 5b351838
......@@ -13,20 +13,37 @@ must go through code review and testing.
.. _sweettooth-plugin: https://github.com/magcius/sweettooth-plugin
Getting Started
---------------
$ git clone git://github.com/magcius/sweettooth.git
$ cd sweettooth
$ virtualenv_ --no-site-packages ./venv
$ . ./venv/bin/activate
$ pip_ install -r requirements.txt
$ # ... Database setup...
$ python sweettooth/manage.py runserver_plus
Create a superuser, and log in. You should be able to upload extensions and
review extensions. There isn't a link to the code review UI, but it's hidden
at /review/.
.. _virtualenv: http://www.virtualenv.org/
.. _pip: http://www.pip-installer.org/
Requirements
------------
For now, we require:
* django_
* django-autoslug_
* django-extensions_
* django-tagging_
* Pygments_
* sorl-thumbnail_
* south_
I develop with PostgreSQL_ at home, but Django should be able to use
SQLite_, MySQL_, and others.
I develop with PostgreSQL_ at home, but Django should be able to use SQLite_,
MySQL_, and others. South_ is used for migrations.
.. _django: http://www.djangoproject.com/
.. _django-autoslug: http://packages.python.org/django-autoslug/
......@@ -37,3 +54,4 @@ SQLite_, MySQL_, and others.
.. _PostgreSQL: http://www.postgresql.org/
.. _SQLite: http://www.sqlite.org/
.. _MySQL: http://www.mysql.com/
.. _south: http://south.aeracode.org/
......@@ -7,3 +7,4 @@ django-extensions==0.6
django-tagging==0.3.1
sorl-thumbnail==11.05.2
wsgiref==0.1.2
South==0.7.3
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Extension'
db.create_table('extensions_extension', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
('uuid', self.gf('django.db.models.fields.CharField')(unique=True, max_length=200, db_index=True)),
('slug', self.gf('autoslug.fields.AutoSlugField')(unique_with=(), max_length=50, populate_from=None, db_index=True)),
('creator', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
('description', self.gf('django.db.models.fields.TextField')()),
('url', self.gf('django.db.models.fields.URLField')(max_length=200)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('screenshot', self.gf('sorl.thumbnail.fields.ImageField')(max_length=100, blank=True)),
))
db.send_create_signal('extensions', ['Extension'])
# Adding model 'ExtensionVersion'
db.create_table('extensions_extensionversion', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('extension', self.gf('django.db.models.fields.related.ForeignKey')(related_name='versions', to=orm['extensions.Extension'])),
('version', self.gf('django.db.models.fields.IntegerField')(default=0)),
('extra_json_fields', self.gf('django.db.models.fields.TextField')()),
('status', self.gf('django.db.models.fields.PositiveIntegerField')()),
('source', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
))
db.send_create_signal('extensions', ['ExtensionVersion'])
# Adding unique constraint on 'ExtensionVersion', fields ['extension', 'version']
db.create_unique('extensions_extensionversion', ['extension_id', 'version'])
def backwards(self, orm):
# Removing unique constraint on 'ExtensionVersion', fields ['extension', 'version']
db.delete_unique('extensions_extensionversion', ['extension_id', 'version'])
# Deleting model 'Extension'
db.delete_table('extensions_extension')
# Deleting model 'ExtensionVersion'
db.delete_table('extensions_extensionversion')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'extensions.extension': {
'Meta': {'object_name': 'Extension'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
'description': ('django.db.models.fields.TextField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'screenshot': ('sorl.thumbnail.fields.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'slug': ('autoslug.fields.AutoSlugField', [], {'unique_with': '()', 'max_length': '50', 'populate_from': 'None', 'db_index': 'True'}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
'uuid': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '200', 'db_index': 'True'})
},
'extensions.extensionversion': {
'Meta': {'unique_together': "(('extension', 'version'),)", 'object_name': 'ExtensionVersion'},
'extension': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['extensions.Extension']"}),
'extra_json_fields': ('django.db.models.fields.TextField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'source': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
'status': ('django.db.models.fields.PositiveIntegerField', [], {}),
'version': ('django.db.models.fields.IntegerField', [], {'default': '0'})
}
}
complete_apps = ['extensions']
......@@ -149,6 +149,8 @@ INSTALLED_APPS = (
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs'
'south',
)
COMMENTS_APP = 'ratings'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment