forked from openpolis/open_municipio
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
primo upload: documentazione tabelle modello (solo PK) e primissima v…
…ersione backend di amministrazione
- Loading branch information
Showing
284 changed files
with
40,387 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
opm_site/settings.py | |||
uploads/aggiornamenti/* |
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,14 @@ | |||
from django.contrib import admin | |||
from om.models import Atto, TipoAtto, Allegato | |||
|
|||
class AllegatoInline(admin.StackedInline): | |||
model = Allegato | |||
extra = 0 | |||
|
|||
class AttoAdminConAllegati(admin.ModelAdmin): | |||
inlines = [AllegatoInline] | |||
|
|||
|
|||
admin.site.register(Atto, AttoAdminConAllegati) | |||
admin.site.register(TipoAtto) | |||
admin.site.register(Allegato) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,76 @@ | |||
# 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 'Atto' | |||
db.create_table(u'om_atto', ( | |||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | |||
('idnum', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), | |||
('tipo_atto', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['om.TipoAtto'])), | |||
('data_presentazione', self.gf('django.db.models.fields.DateField')(null=True)), | |||
('data_aggiornamento', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), | |||
('data_approvazione', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), | |||
('data_pubblicazione', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), | |||
('data_esecuzione', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), | |||
('titolo', self.gf('django.db.models.fields.TextField')(blank=True)), | |||
('titolo_aggiuntivo', self.gf('django.db.models.fields.TextField')(blank=True)), | |||
('iniziativa', self.gf('django.db.models.fields.CharField')(max_length=3)), | |||
('testo', self.gf('django.db.models.fields.TextField')(blank=True)), | |||
('verbale', self.gf('django.db.models.fields.TextField')(blank=True)), | |||
('created_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), | |||
('updated_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), | |||
)) | |||
db.send_create_signal('om', ['Atto']) | |||
|
|||
# Adding model 'TipoAtto' | |||
db.create_table(u'om_tipo_atto', ( | |||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | |||
('denominazione', self.gf('django.db.models.fields.CharField')(max_length=128)), | |||
('slug', self.gf('django.db.models.fields.CharField')(max_length=128, blank=True)), | |||
)) | |||
db.send_create_signal('om', ['TipoAtto']) | |||
|
|||
|
|||
def backwards(self, orm): | |||
|
|||
# Deleting model 'Atto' | |||
db.delete_table(u'om_atto') | |||
|
|||
# Deleting model 'TipoAtto' | |||
db.delete_table(u'om_tipo_atto') | |||
|
|||
|
|||
models = { | |||
'om.atto': { | |||
'Meta': {'object_name': 'Atto'}, | |||
'created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_aggiornamento': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_approvazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_esecuzione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_presentazione': ('django.db.models.fields.DateField', [], {'null': 'True'}), | |||
'data_pubblicazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'idnum': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), | |||
'iniziativa': ('django.db.models.fields.CharField', [], {'max_length': '3'}), | |||
'testo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'tipo_atto': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['om.TipoAtto']"}), | |||
'titolo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'titolo_aggiuntivo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'updated_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'verbale': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | |||
}, | |||
'om.tipoatto': { | |||
'Meta': {'object_name': 'TipoAtto', 'db_table': "u'om_tipo_atto'"}, | |||
'denominazione': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) | |||
} | |||
} | |||
|
|||
complete_apps = ['om'] |
54 changes: 54 additions & 0 deletions
54
om/migrations/0002_auto__chg_field_atto_titolo_aggiuntivo__chg_field_atto_titolo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,54 @@ | |||
# 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): | |||
|
|||
# Changing field 'Atto.titolo_aggiuntivo' | |||
db.alter_column(u'om_atto', 'titolo_aggiuntivo', self.gf('django.db.models.fields.CharField')(max_length=196)) | |||
|
|||
# Changing field 'Atto.titolo' | |||
db.alter_column(u'om_atto', 'titolo', self.gf('django.db.models.fields.CharField')(max_length=196)) | |||
|
|||
|
|||
def backwards(self, orm): | |||
|
|||
# Changing field 'Atto.titolo_aggiuntivo' | |||
db.alter_column(u'om_atto', 'titolo_aggiuntivo', self.gf('django.db.models.fields.TextField')()) | |||
|
|||
# Changing field 'Atto.titolo' | |||
db.alter_column(u'om_atto', 'titolo', self.gf('django.db.models.fields.TextField')()) | |||
|
|||
|
|||
models = { | |||
'om.atto': { | |||
'Meta': {'object_name': 'Atto'}, | |||
'created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_aggiornamento': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_approvazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_esecuzione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_presentazione': ('django.db.models.fields.DateField', [], {'null': 'True'}), | |||
'data_pubblicazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'idnum': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), | |||
'iniziativa': ('django.db.models.fields.CharField', [], {'max_length': '3'}), | |||
'testo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'tipo_atto': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['om.TipoAtto']"}), | |||
'titolo': ('django.db.models.fields.CharField', [], {'max_length': '196', 'blank': 'True'}), | |||
'titolo_aggiuntivo': ('django.db.models.fields.CharField', [], {'max_length': '196', 'blank': 'True'}), | |||
'updated_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'verbale': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | |||
}, | |||
'om.tipoatto': { | |||
'Meta': {'object_name': 'TipoAtto', 'db_table': "u'om_tipo_atto'"}, | |||
'denominazione': ('django.db.models.fields.CharField', [], {'max_length': '128'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'slug': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}) | |||
} | |||
} | |||
|
|||
complete_apps = ['om'] |
83 changes: 83 additions & 0 deletions
83
om/migrations/0003_auto__add_allegato__add_unique_tipoatto_denominazione__add_unique_tipo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,83 @@ | |||
# 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 'Allegato' | |||
db.create_table(u'om_allegato', ( | |||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), | |||
('titolo', self.gf('django.db.models.fields.CharField')(max_length=255)), | |||
('atto', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['om.Atto'])), | |||
('data', self.gf('django.db.models.fields.DateField')(null=True, blank=True)), | |||
('testo', self.gf('django.db.models.fields.TextField')(blank=True)), | |||
('file_pdf', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)), | |||
('url_testo', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), | |||
('url_pdf', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), | |||
('created_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), | |||
)) | |||
db.send_create_signal('om', ['Allegato']) | |||
|
|||
# Adding unique constraint on 'TipoAtto', fields ['denominazione'] | |||
db.create_unique(u'om_tipo_atto', ['denominazione']) | |||
|
|||
# Adding unique constraint on 'TipoAtto', fields ['slug'] | |||
db.create_unique(u'om_tipo_atto', ['slug']) | |||
|
|||
|
|||
def backwards(self, orm): | |||
|
|||
# Removing unique constraint on 'TipoAtto', fields ['slug'] | |||
db.delete_unique(u'om_tipo_atto', ['slug']) | |||
|
|||
# Removing unique constraint on 'TipoAtto', fields ['denominazione'] | |||
db.delete_unique(u'om_tipo_atto', ['denominazione']) | |||
|
|||
# Deleting model 'Allegato' | |||
db.delete_table(u'om_allegato') | |||
|
|||
|
|||
models = { | |||
'om.allegato': { | |||
'Meta': {'object_name': 'Allegato'}, | |||
'atto': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['om.Atto']"}), | |||
'created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'data': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'file_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'testo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'titolo': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | |||
'url_pdf': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), | |||
'url_testo': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) | |||
}, | |||
'om.atto': { | |||
'Meta': {'object_name': 'Atto'}, | |||
'created_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_aggiornamento': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_approvazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_esecuzione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_presentazione': ('django.db.models.fields.DateField', [], {'null': 'True'}), | |||
'data_pubblicazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'idnum': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), | |||
'iniziativa': ('django.db.models.fields.CharField', [], {'max_length': '3'}), | |||
'testo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'tipo_atto': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['om.TipoAtto']"}), | |||
'titolo': ('django.db.models.fields.CharField', [], {'max_length': '196', 'blank': 'True'}), | |||
'titolo_aggiuntivo': ('django.db.models.fields.CharField', [], {'max_length': '196', 'blank': 'True'}), | |||
'updated_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), | |||
'verbale': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | |||
}, | |||
'om.tipoatto': { | |||
'Meta': {'object_name': 'TipoAtto', 'db_table': "u'om_tipo_atto'"}, | |||
'denominazione': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) | |||
} | |||
} | |||
|
|||
complete_apps = ['om'] |
69 changes: 69 additions & 0 deletions
69
om/migrations/0004_auto__del_field_allegato_created_at__del_field_atto_created_at__del_fi.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,69 @@ | |||
# 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): | |||
|
|||
# Deleting field 'Allegato.created_at' | |||
db.delete_column('om_allegato', 'created_at') | |||
|
|||
# Deleting field 'Atto.created_at' | |||
db.delete_column('om_atto', 'created_at') | |||
|
|||
# Deleting field 'Atto.updated_at' | |||
db.delete_column('om_atto', 'updated_at') | |||
|
|||
|
|||
def backwards(self, orm): | |||
|
|||
# Adding field 'Allegato.created_at' | |||
db.add_column('om_allegato', 'created_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), keep_default=False) | |||
|
|||
# Adding field 'Atto.created_at' | |||
db.add_column('om_atto', 'created_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), keep_default=False) | |||
|
|||
# Adding field 'Atto.updated_at' | |||
db.add_column('om_atto', 'updated_at', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True), keep_default=False) | |||
|
|||
|
|||
models = { | |||
'om.allegato': { | |||
'Meta': {'object_name': 'Allegato'}, | |||
'atto': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['om.Atto']"}), | |||
'data': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'file_pdf': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'testo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'titolo': ('django.db.models.fields.CharField', [], {'max_length': '255'}), | |||
'url_pdf': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), | |||
'url_testo': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) | |||
}, | |||
'om.atto': { | |||
'Meta': {'object_name': 'Atto'}, | |||
'data_aggiornamento': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_approvazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_esecuzione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'data_presentazione': ('django.db.models.fields.DateField', [], {'null': 'True'}), | |||
'data_pubblicazione': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'idnum': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), | |||
'iniziativa': ('django.db.models.fields.CharField', [], {'max_length': '3'}), | |||
'testo': ('django.db.models.fields.TextField', [], {'blank': 'True'}), | |||
'tipo_atto': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['om.TipoAtto']"}), | |||
'titolo': ('django.db.models.fields.CharField', [], {'max_length': '196'}), | |||
'titolo_aggiuntivo': ('django.db.models.fields.CharField', [], {'max_length': '196', 'blank': 'True'}), | |||
'verbale': ('django.db.models.fields.TextField', [], {'blank': 'True'}) | |||
}, | |||
'om.tipoatto': { | |||
'Meta': {'object_name': 'TipoAtto', 'db_table': "u'om_tipo_atto'"}, | |||
'denominazione': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), | |||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), | |||
'slug': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}) | |||
} | |||
} | |||
|
|||
complete_apps = ['om'] |
Oops, something went wrong.