Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Improved setup #127

Merged
merged 32 commits into from
Feb 1, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d14738e
Clean up settings.py & add example local settings
ptgolden Jan 11, 2013
4a0f2a2
Remove editorsnotes.org specific files
ptgolden Jan 11, 2013
ac851a6
Ignore local dir created by virtualenv
ptgolden Jan 11, 2013
b477053
Different fabfile for local setup
ptgolden Jan 14, 2013
68c6f02
Replace env.path with env.project_path in fabfile
ptgolden Jan 15, 2013
caea82c
Use @task decorator in fabfile to define tasks
ptgolden Jan 15, 2013
49501ef
Make fabric commands for apache a different module
ptgolden Jan 15, 2013
5595bc3
Local fabric command to set up a dev environment
ptgolden Jan 15, 2013
a6511ea
Use os.path.dirname where applicable
ptgolden Jan 15, 2013
e276958
Add installation instructions to README
ptgolden Jan 15, 2013
5a4dabf
readme as markdown
ptgolden Jan 15, 2013
6933033
Clean up deployment fabric commands a bit
ptgolden Jan 16, 2013
6b43dd2
Better symlinking in fabfiles
ptgolden Jan 16, 2013
b53e957
Update readme
ptgolden Jan 16, 2013
c7bbe02
Add link to xapian project in readme
ptgolden Jan 16, 2013
7903d68
Make path to XHTML field absolute in old migrations
ptgolden Jan 16, 2013
a188fa3
Change old migration for XHTML field to work with current code
ptgolden Jan 16, 2013
9555514
Change data migrations so that they work with a clean db
ptgolden Jan 16, 2013
d20a857
Fix bug in main/models.py
ptgolden Jan 16, 2013
13d87cd
Fix spacing error from commit 9555514
ptgolden Jan 16, 2013
47f48eb
Improve setup instructions
ptgolden Jan 16, 2013
649c5ef
readme formatting
ptgolden Jan 16, 2013
99478ae
Only import fabfile_local if it exists
ptgolden Jan 16, 2013
62a6eee
Update url for serving static files in dev server
ptgolden Jan 16, 2013
13b55f4
Fabric command to create cache tables
ptgolden Jan 16, 2013
ba908e7
Use pip to install psycopg2 instead of symlinking
ptgolden Jan 18, 2013
dcd07de
Don't worry if `cp -n` fails
ptgolden Jan 18, 2013
6e34b15
Test if settings file exists instead of `cp -n`
ptgolden Jan 18, 2013
214b520
Require fabric to be run globally; add success msg
ptgolden Jan 18, 2013
528130c
Remove deployment-specific fabfile commands
ptgolden Jan 18, 2013
c1fa8d2
Change PATH settings around a bit.
ptgolden Jan 19, 2013
3cf9bf7
Merge branch 'master' into improved-setup
ptgolden Feb 1, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ build
dev.db
include
lib
local
secret.txt
settings_local.py
settings-*.py
Expand Down
Empty file removed README
Empty file.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Installation
Editors' Notes requires Python 2.7 and PostgreSQL.

To set up a local development environment, install [Fabric](http://fabfile.org/)
and make sure you have the following dependencies

* libxml2
* libxslt
* psycopg2
* [Xapian](http://xapian.org/download) with Python bindings

1. Run the command `fab setup` inside the project directory
2. Edit the generated "editorsnotes/settings\_local.py" file with your database information
3. Run `fab sync_database`
4. Start the development server with `fab runserver`
32 changes: 0 additions & 32 deletions deploy/vhost-beta.editorsnotes.org.conf

This file was deleted.

37 changes: 0 additions & 37 deletions deploy/vhost-editorsnotes.org.conf

This file was deleted.

10 changes: 0 additions & 10 deletions django.wsgi

This file was deleted.

59 changes: 59 additions & 0 deletions editorsnotes/example-settings_local.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
######################
# Required variables #
######################

SECRET_KEY = ''
POSTGRES_DB = {
'NAME': '',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
}
SITE_URL = '127.0.0.1'

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
('My Name', '[email protected]'),
)
MANAGERS = ADMINS


#############
# Overrides #
#############

# TIME_ZONE = ''
# LANGUAGE_CODE = ''
# DATETIME_FORMAT = ''
# USE_L10N = True
# USE I18N = True


# Edit STORAGE_PATH to change where uploads, static files, and search indexes
# will be stored, or change each of the settings individually.
# STORAGE_PATH = ''

# MEDIA_ROOT = ''
# STATIC_ROOT = ''
# HAYSTACK_XAPIAN_PATH = ''


######################
# Optional variables #
######################

# Set the following variables to connect to an instance of Open Refine and
# enable clustering topics and documents.
GOOGLE_REFINE_HOST = '127.0.0.1'
GOOGLE_REFINE_PORT = '3333'

# Set the following to be able to write all Zotero data to a central library.
ZOTERO_API_KEY = ''
ZOTERO_LIBRARY = ''

# Define locally installed apps here
LOCAL_APPS = (
)
8 changes: 4 additions & 4 deletions editorsnotes/main/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def forwards(self, orm):
('last_updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('creator', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_note_set', to=orm['auth.User'])),
('content', self.gf('main.fields.XHTMLField')()),
('content', self.gf('editorsnotes.main.fields.XHTMLField')()),
('last_updater', self.gf('django.db.models.fields.related.ForeignKey')(related_name='last_to_update_note_set', to=orm['auth.User'])),
('type', self.gf('django.db.models.fields.CharField')(default='N', max_length=1)),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
Expand All @@ -24,7 +24,7 @@ def forwards(self, orm):
db.create_table('main_reference', (
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
('citation', self.gf('main.fields.XHTMLField')()),
('citation', self.gf('editorsnotes.main.fields.XHTMLField')()),
('note', self.gf('django.db.models.fields.related.ForeignKey')(related_name='references', to=orm['main.Note'])),
('creator', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_reference_set', to=orm['auth.User'])),
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
Expand Down Expand Up @@ -139,7 +139,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -150,7 +150,7 @@ def backwards(self, orm):
},
'main.reference': {
'Meta': {'object_name': 'Reference'},
'citation': ('main.fields.XHTMLField', [], {}),
'citation': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_reference_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -76,7 +76,7 @@ def backwards(self, orm):
},
'main.reference': {
'Meta': {'object_name': 'Reference'},
'citation': ('main.fields.XHTMLField', [], {}),
'citation': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_reference_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -76,7 +76,7 @@ def backwards(self, orm):
},
'main.reference': {
'Meta': {'object_name': 'Reference'},
'citation': ('main.fields.XHTMLField', [], {}),
'citation': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_reference_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand Down
4 changes: 2 additions & 2 deletions editorsnotes/main/migrations/0004_auto__add_userprofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -80,7 +80,7 @@ def backwards(self, orm):
},
'main.reference': {
'Meta': {'object_name': 'Reference'},
'citation': ('main.fields.XHTMLField', [], {}),
'citation': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_reference_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def forwards(self, orm):

# Adding model 'Source'
db.create_table('main_source', (
('description', self.gf('main.fields.XHTMLField')()),
('description', self.gf('editorsnotes.main.fields.XHTMLField')()),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('ordering', self.gf('django.db.models.fields.CharField')(max_length=32)),
('creator', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_source_set', to=orm['auth.User'])),
Expand Down Expand Up @@ -97,7 +97,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -108,7 +108,7 @@ def backwards(self, orm):
},
'main.reference': {
'Meta': {'object_name': 'Reference'},
'citation': ('main.fields.XHTMLField', [], {}),
'citation': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_reference_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -121,7 +121,7 @@ def backwards(self, orm):
'Meta': {'object_name': 'Source'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_source_set'", 'to': "orm['auth.User']"}),
'description': ('main.fields.XHTMLField', [], {}),
'description': ('editorsnotes.main.fields.XHTMLField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'type': ('django.db.models.fields.CharField', [], {'default': "'S'", 'max_length': '1'}),
Expand Down
6 changes: 3 additions & 3 deletions editorsnotes/main/migrations/0006_references_to_citations.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -93,7 +93,7 @@ def backwards(self, orm):
},
'main.reference': {
'Meta': {'object_name': 'Reference'},
'citation': ('main.fields.XHTMLField', [], {}),
'citation': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_reference_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -106,7 +106,7 @@ def backwards(self, orm):
'Meta': {'object_name': 'Source'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_source_set'", 'to': "orm['auth.User']"}),
'description': ('main.fields.XHTMLField', [], {}),
'description': ('editorsnotes.main.fields.XHTMLField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'type': ('django.db.models.fields.CharField', [], {'default': "'S'", 'max_length': '1'}),
Expand Down
6 changes: 3 additions & 3 deletions editorsnotes/main/migrations/0007_auto__del_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def backwards(self, orm):
db.create_table('main_reference', (
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
('citation', self.gf('main.fields.XHTMLField')()),
('citation', self.gf('editorsnotes.main.fields.XHTMLField')()),
('note', self.gf('django.db.models.fields.related.ForeignKey')(related_name='references', to=orm['main.Note'])),
('ordering', self.gf('django.db.models.fields.CharField')(max_length=5)),
('creator', self.gf('django.db.models.fields.related.ForeignKey')(related_name='created_reference_set', to=orm['auth.User'])),
Expand Down Expand Up @@ -84,7 +84,7 @@ def backwards(self, orm):
},
'main.note': {
'Meta': {'object_name': 'Note'},
'content': ('main.fields.XHTMLField', [], {}),
'content': ('editorsnotes.main.fields.XHTMLField', [], {}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_note_set'", 'to': "orm['auth.User']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
Expand All @@ -97,7 +97,7 @@ def backwards(self, orm):
'Meta': {'object_name': 'Source'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_source_set'", 'to': "orm['auth.User']"}),
'description': ('main.fields.XHTMLField', [], {}),
'description': ('editorsnotes.main.fields.XHTMLField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ordering': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'type': ('django.db.models.fields.CharField', [], {'default': "'S'", 'max_length': '1'}),
Expand Down
Loading