Permalink
Browse files

Uuups forgot to commit

  • Loading branch information...
1 parent 364bcdd commit 4848c19954ea1570b11166cc48b7f8308c1b70e6 @plaetzchen plaetzchen committed Aug 30, 2012
Showing with 18,769 additions and 28 deletions.
  1. +1 −0 publicdocs/documents/admin.py
  2. +16 −0 publicdocs/documents/forms.py
  3. +1 −1 publicdocs/documents/management/commands/searchdocs.py
  4. +98 −0 publicdocs/documents/migrations/0010_auto__add_comment.py
  5. +105 −0 publicdocs/documents/migrations/0011_auto__add_field_comment_document__chg_field_comment_page.py
  6. +92 −0 publicdocs/documents/migrations/0012_auto__add_field_relation_rating.py
  7. +93 −0 publicdocs/documents/migrations/0013_auto__add_field_relation_relatedDocument.py
  8. +101 −0 publicdocs/documents/migrations/0014_auto__del_field_relation_rating__add_field_relation_allowed.py
  9. +16 −1 publicdocs/documents/models.py
  10. +41 −3 publicdocs/documents/views.py
  11. BIN publicdocs/media/documents/gesetz/gesetz-0.jpg
  12. BIN publicdocs/media/documents/gesetz/gesetz-1.jpg
  13. BIN publicdocs/media/documents/gesetz/gesetz-10.jpg
  14. BIN publicdocs/media/documents/gesetz/gesetz-11.jpg
  15. BIN publicdocs/media/documents/gesetz/gesetz-12.jpg
  16. BIN publicdocs/media/documents/gesetz/gesetz-13.jpg
  17. BIN publicdocs/media/documents/gesetz/gesetz-14.jpg
  18. BIN publicdocs/media/documents/gesetz/gesetz-15.jpg
  19. BIN publicdocs/media/documents/gesetz/gesetz-2.jpg
  20. BIN publicdocs/media/documents/gesetz/gesetz-3.jpg
  21. BIN publicdocs/media/documents/gesetz/gesetz-4.jpg
  22. BIN publicdocs/media/documents/gesetz/gesetz-5.jpg
  23. BIN publicdocs/media/documents/gesetz/gesetz-6.jpg
  24. BIN publicdocs/media/documents/gesetz/gesetz-7.jpg
  25. BIN publicdocs/media/documents/gesetz/gesetz-8.jpg
  26. BIN publicdocs/media/documents/gesetz/gesetz-9.jpg
  27. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-0.jpg
  28. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-1.jpg
  29. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-10.jpg
  30. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-2.jpg
  31. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-3.jpg
  32. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-4.jpg
  33. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-5.jpg
  34. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-6.jpg
  35. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-7.jpg
  36. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-8.jpg
  37. BIN publicdocs/media/documents/sachstandsbericht-berpdf/sachstandsbericht-berpdf-9.jpg
  38. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-0.jpg
  39. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-1.jpg
  40. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-2.jpg
  41. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-3.jpg
  42. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-4.jpg
  43. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-5.jpg
  44. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-6.jpg
  45. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-7.jpg
  46. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-8.jpg
  47. BIN publicdocs/media/documents/stellungnahme-ba-kopenickpdf/stellungnahme-ba-kopenickpdf-9.jpg
  48. +1 −0 publicdocs/publicdocs/settings.py
  49. +815 −0 publicdocs/publicdocs/static/bootstrap/css/bootstrap-responsive.css
  50. +9 −0 publicdocs/publicdocs/static/bootstrap/css/bootstrap-responsive.min.css
  51. +4,983 −0 publicdocs/publicdocs/static/bootstrap/css/bootstrap.css
  52. +765 −0 publicdocs/publicdocs/static/bootstrap/css/bootstrap.min.css
  53. +9 −0 publicdocs/publicdocs/static/bootstrap/css/bootstrap.min.css.back
  54. BIN publicdocs/publicdocs/static/bootstrap/img/glyphicons-halflings-white.png
  55. BIN publicdocs/publicdocs/static/bootstrap/img/glyphicons-halflings.png
  56. +169 −0 publicdocs/publicdocs/static/bootstrap/js/bootstrap-carousel.js
  57. +98 −0 publicdocs/publicdocs/static/bootstrap/js/bootstrap-popover.js
  58. +275 −0 publicdocs/publicdocs/static/bootstrap/js/bootstrap-tooltip.js
  59. +1,825 −0 publicdocs/publicdocs/static/bootstrap/js/bootstrap.js
  60. +6 −0 publicdocs/publicdocs/static/bootstrap/js/bootstrap.min.js
  61. +4 −0 publicdocs/publicdocs/static/jquery.min.js
  62. +815 −0 publicdocs/static_files/bootstrap/css/bootstrap-responsive.css
  63. +9 −0 publicdocs/static_files/bootstrap/css/bootstrap-responsive.min.css
  64. +4,983 −0 publicdocs/static_files/bootstrap/css/bootstrap.css
  65. +765 −0 publicdocs/static_files/bootstrap/css/bootstrap.min.css
  66. +9 −0 publicdocs/static_files/bootstrap/css/bootstrap.min.css.back
  67. BIN publicdocs/static_files/bootstrap/img/glyphicons-halflings-white.png
  68. BIN publicdocs/static_files/bootstrap/img/glyphicons-halflings.png
  69. +169 −0 publicdocs/static_files/bootstrap/js/bootstrap-carousel.js
  70. +98 −0 publicdocs/static_files/bootstrap/js/bootstrap-popover.js
  71. +275 −0 publicdocs/static_files/bootstrap/js/bootstrap-tooltip.js
  72. +1,825 −0 publicdocs/static_files/bootstrap/js/bootstrap.js
  73. +6 −0 publicdocs/static_files/bootstrap/js/bootstrap.min.js
  74. +4 −0 publicdocs/static_files/jquery.min.js
  75. +66 −15 publicdocs/templates/base.html
  76. +181 −2 publicdocs/templates/documents/document.html
  77. +40 −5 publicdocs/templates/documents/index.html
  78. +1 −1 publicdocs/templates/documents/search_results.html
@@ -8,3 +8,4 @@
admin.site.register(Page)
admin.site.register(Relation)
admin.site.register(Category)
+admin.site.register(Comment)
@@ -0,0 +1,16 @@
+from django.forms import ModelForm
+from django import forms
+
+from documents.models import Comment, Relation
+
+class CommentForm(ModelForm):
+ ''' Used for the comments '''
+ class Meta:
+ model = Comment
+ exclude = ["ip","moderated","document"]
+
+class RelationForm(ModelForm):
+ ''' Used for adding relations '''
+ class Meta:
+ model = Relation
+ fields = ["type", "relatedDocument", "comment"]
@@ -79,7 +79,7 @@ def handle(self, *args, **options):
if not os.path.exists("/opt/publicdocs/PublicDocs/publicdocs/media/documents/" + document.slug ):
os.makedirs("/opt/publicdocs/PublicDocs/publicdocs/media/documents/" + document.slug)
file_name = smart_unicode(files, encoding='utf-8', strings_only=False, errors='strict')
- outcode = subprocess.Popen(u"/usr/bin/convert -quality 80% '" + file_name + "' /opt/publicdocs/PublicDocs/publicdocs/media/documents/" + document.slug + "/" + document.slug + ".jpg", shell=True)
+ outcode = subprocess.Popen(u"/usr/bin/convert -quality 90% '" + file_name + "' /opt/publicdocs/PublicDocs/publicdocs/media/documents/" + document.slug + "/" + document.slug + ".jpg", shell=True)
while outcode.poll() == None:
pass
@@ -0,0 +1,98 @@
+# -*- coding: 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 'Comment'
+ db.create_table('documents_comment', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=254)),
+ ('ip', self.gf('django.db.models.fields.IPAddressField')(max_length=15, null=True, blank=True)),
+ ('moderated', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('comment', self.gf('django.db.models.fields.TextField')(max_length=1000)),
+ ('page', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Page'])),
+ ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ))
+ db.send_create_signal('documents', ['Comment'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Comment'
+ db.delete_table('documents_comment')
+
+
+ models = {
+ 'documents.author': {
+ 'Meta': {'object_name': 'Author'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'institution': ('django.db.models.fields.CharField', [], {'max_length': '254', 'null': 'True', 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'populate_from': 'None', 'unique_with': '()'})
+ },
+ 'documents.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'populate_from': 'None', 'unique_with': '()'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '254'})
+ },
+ 'documents.comment': {
+ 'Meta': {'object_name': 'Comment'},
+ 'comment': ('django.db.models.fields.TextField', [], {'max_length': '1000'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Page']"})
+ },
+ 'documents.document': {
+ 'Meta': {'object_name': 'Document'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Author']", 'null': 'True', 'blank': 'True'}),
+ 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['documents.Category']", 'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'documentCreated': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'documentModified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'md5hash': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'document'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['documents.Page']"}),
+ 'relations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['documents.Relation']", 'null': 'True', 'blank': 'True'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'populate_from': 'None', 'unique_with': '()'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'version': ('django.db.models.fields.IntegerField', [], {'default': '1'})
+ },
+ 'documents.page': {
+ 'Meta': {'object_name': 'Page'},
+ 'content': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'number': ('django.db.models.fields.IntegerField', [], {})
+ },
+ 'documents.paragraph': {
+ 'Meta': {'object_name': 'Paragraph'},
+ 'content': ('django.db.models.fields.TextField', [], {}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'})
+ },
+ 'documents.relation': {
+ 'Meta': {'object_name': 'Relation'},
+ 'comment': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'type': ('django.db.models.fields.IntegerField', [], {'max_length': '1'})
+ }
+ }
+
+ complete_apps = ['documents']
@@ -0,0 +1,105 @@
+# -*- coding: 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 field 'Comment.document'
+ db.add_column('documents_comment', 'document',
+ self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'], null=True),
+ keep_default=False)
+
+
+ # Renaming column for 'Comment.page' to match new field type.
+ db.rename_column('documents_comment', 'page_id', 'page')
+ # Changing field 'Comment.page'
+ db.alter_column('documents_comment', 'page', self.gf('django.db.models.fields.IntegerField')(null=True))
+ # Removing index on 'Comment', fields ['page']
+ db.delete_index('documents_comment', ['page_id'])
+
+
+ def backwards(self, orm):
+ # Adding index on 'Comment', fields ['page']
+ db.create_index('documents_comment', ['page_id'])
+
+ # Deleting field 'Comment.document'
+ db.delete_column('documents_comment', 'document_id')
+
+
+ # User chose to not deal with backwards NULL issues for 'Comment.page'
+ raise RuntimeError("Cannot reverse this migration. 'Comment.page' and its values cannot be restored.")
+
+ models = {
+ 'documents.author': {
+ 'Meta': {'object_name': 'Author'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'institution': ('django.db.models.fields.CharField', [], {'max_length': '254', 'null': 'True', 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'populate_from': 'None', 'unique_with': '()'})
+ },
+ 'documents.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'populate_from': 'None', 'unique_with': '()'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '254'})
+ },
+ 'documents.comment': {
+ 'Meta': {'object_name': 'Comment'},
+ 'comment': ('django.db.models.fields.TextField', [], {'max_length': '1000'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
+ 'moderated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'page': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
+ },
+ 'documents.document': {
+ 'Meta': {'object_name': 'Document'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Author']", 'null': 'True', 'blank': 'True'}),
+ 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['documents.Category']", 'null': 'True', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'documentCreated': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'documentModified': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'md5hash': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'pages': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'document'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['documents.Page']"}),
+ 'relations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['documents.Relation']", 'null': 'True', 'blank': 'True'}),
+ 'slug': ('autoslug.fields.AutoSlugField', [], {'max_length': '50', 'unique': 'True', 'null': 'True', 'populate_from': 'None', 'unique_with': '()'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
+ 'version': ('django.db.models.fields.IntegerField', [], {'default': '1'})
+ },
+ 'documents.page': {
+ 'Meta': {'object_name': 'Page'},
+ 'content': ('django.db.models.fields.TextField', [], {'null': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'number': ('django.db.models.fields.IntegerField', [], {})
+ },
+ 'documents.paragraph': {
+ 'Meta': {'object_name': 'Paragraph'},
+ 'content': ('django.db.models.fields.TextField', [], {}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'})
+ },
+ 'documents.relation': {
+ 'Meta': {'object_name': 'Relation'},
+ 'comment': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
+ 'type': ('django.db.models.fields.IntegerField', [], {'max_length': '1'})
+ }
+ }
+
+ complete_apps = ['documents']
Oops, something went wrong.

0 comments on commit 4848c19

Please sign in to comment.