Commit 6f08eac3 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Added an extra field to InstServer, addr_type

Added the addr_type field to InstServer. Made the appropriate
changes to templates and forms.
parent a93e5506
......@@ -87,11 +87,17 @@ class InstServerForm(forms.ModelForm):
def clean_host(self):
host = self.cleaned_data['host']
addr_type = self.cleaned_data['addr_type']
if host:
match = re.match(FQDN_RE, host)
if not match:
try:
address = ipaddr.IPNetwork(host)
if addr_type == 'any':
address = ipaddr.IPAddress(host)
if addr_type == 'ipv4':
address = ipaddr.IPv4Address(host)
if addr_type == 'ipv6':
address = ipaddr.IPv6Address(host)
except Exception:
error_text = _('Invalid network address/hostname format')
raise forms.ValidationError(error_text)
......
# 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 field 'InstServer.addr_type'
db.add_column('edumanage_instserver', 'addr_type', self.gf('django.db.models.fields.PositiveIntegerField')(default=2, max_length=2), keep_default=False)
def backwards(self, orm):
# Deleting field 'InstServer.addr_type'
db.delete_column('edumanage_instserver', 'addr_type')
models = {
'contenttypes.contenttype': {
'Meta': {'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'})
},
'edumanage.contact': {
'Meta': {'object_name': 'Contact'},
'email': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_email'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'contact_name'"}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_phone'"})
},
'edumanage.institution': {
'Meta': {'object_name': 'Institution'},
'ertype': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '1', 'db_column': "'type'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'realmid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Realm']"})
},
'edumanage.institutioncontactpool': {
'Meta': {'object_name': 'InstitutionContactPool'},
'contact': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Contact']", 'unique': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institution': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"})
},
'edumanage.institutiondetails': {
'Meta': {'object_name': 'InstitutionDetails'},
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '96'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institution': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Institution']", 'unique': 'True'}),
'number_id': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}),
'number_user': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}),
'oper_name': ('django.db.models.fields.CharField', [], {'max_length': '24', 'null': 'True', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.instrealm': {
'Meta': {'object_name': 'InstRealm'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'proxyto': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.InstServer']", 'symmetrical': 'False'}),
'realm': ('django.db.models.fields.CharField', [], {'max_length': '160'})
},
'edumanage.instrealmmon': {
'Meta': {'unique_together': "(('realm', 'mon_type'),)", 'object_name': 'InstRealmMon'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mon_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.InstRealm']"})
},
'edumanage.instserver': {
'Meta': {'object_name': 'InstServer'},
'acct_port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1813', 'max_length': '5', 'null': 'True', 'blank': 'True'}),
'addr_type': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '2'}),
'auth_port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1812', 'max_length': '5', 'null': 'True', 'blank': 'True'}),
'ertype': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '1', 'db_column': "'type'"}),
'host': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True', 'blank': 'True'}),
'proto': ('django.db.models.fields.CharField', [], {'default': '2', 'max_length': '12'}),
'secret': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'status_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.monlocalauthnparam': {
'Meta': {'object_name': 'MonLocalAuthnParam'},
'eap_method': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrealmmonid': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.InstRealmMon']", 'unique': 'True'}),
'passwp': ('django.db.models.fields.CharField', [], {'max_length': '24', 'db_column': "'pass'"}),
'phase2': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '24'})
},
'edumanage.monproxybackclient': {
'Meta': {'object_name': 'MonProxybackClient'},
'host': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrealmmonid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.InstRealmMon']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True', 'blank': 'True'}),
'proto': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
'secret': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'status_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.name_i18n': {
'Meta': {'object_name': 'Name_i18n'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lang': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
},
'edumanage.realm': {
'Meta': {'object_name': 'Realm'},
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '24'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'stype': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'max_length': '1'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.realmdata': {
'Meta': {'object_name': 'RealmData'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'number_IdP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_IdPSP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_SP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_id': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '9'}),
'number_inst': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_user': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '9'}),
'realmid': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Realm']", 'unique': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {})
},
'edumanage.serviceloc': {
'AP_no': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '3'}),
'IPv6': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'Meta': {'object_name': 'ServiceLoc'},
'NAT': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'SSID': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '96'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['edumanage.Contact']", 'null': 'True', 'blank': 'True'}),
'enc_level': ('edumanage.models.MultiSelectField', [], {'max_length': '64'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institutionid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'latitude': ('django.db.models.fields.DecimalField', [], {'max_digits': '8', 'decimal_places': '6'}),
'longitude': ('django.db.models.fields.DecimalField', [], {'max_digits': '8', 'decimal_places': '6'}),
'port_restrict': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'transp_proxy': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'wired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
},
'edumanage.url_i18n': {
'Meta': {'object_name': 'URL_i18n'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lang': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '180', 'db_column': "'URL'"}),
'urltype': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'type'"})
}
}
complete_apps = ['edumanage']
# 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 'InstServer.addr_type'
db.alter_column('edumanage_instserver', 'addr_type', self.gf('django.db.models.fields.CharField')(max_length=16))
def backwards(self, orm):
# Changing field 'InstServer.addr_type'
db.alter_column('edumanage_instserver', 'addr_type', self.gf('django.db.models.fields.PositiveIntegerField')(max_length=2))
models = {
'contenttypes.contenttype': {
'Meta': {'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'})
},
'edumanage.contact': {
'Meta': {'object_name': 'Contact'},
'email': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_email'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_column': "'contact_name'"}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '80', 'db_column': "'contact_phone'"})
},
'edumanage.institution': {
'Meta': {'object_name': 'Institution'},
'ertype': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '1', 'db_column': "'type'"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'realmid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Realm']"})
},
'edumanage.institutioncontactpool': {
'Meta': {'object_name': 'InstitutionContactPool'},
'contact': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Contact']", 'unique': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institution': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"})
},
'edumanage.institutiondetails': {
'Meta': {'object_name': 'InstitutionDetails'},
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '96'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institution': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Institution']", 'unique': 'True'}),
'number_id': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}),
'number_user': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}),
'oper_name': ('django.db.models.fields.CharField', [], {'max_length': '24', 'null': 'True', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.instrealm': {
'Meta': {'object_name': 'InstRealm'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'proxyto': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.InstServer']", 'symmetrical': 'False'}),
'realm': ('django.db.models.fields.CharField', [], {'max_length': '160'})
},
'edumanage.instrealmmon': {
'Meta': {'unique_together': "(('realm', 'mon_type'),)", 'object_name': 'InstRealmMon'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mon_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'realm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.InstRealm']"})
},
'edumanage.instserver': {
'Meta': {'object_name': 'InstServer'},
'acct_port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1813', 'max_length': '5', 'null': 'True', 'blank': 'True'}),
'addr_type': ('django.db.models.fields.CharField', [], {'default': "'ipv4'", 'max_length': '16'}),
'auth_port': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1812', 'max_length': '5', 'null': 'True', 'blank': 'True'}),
'ertype': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '1', 'db_column': "'type'"}),
'host': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True', 'blank': 'True'}),
'proto': ('django.db.models.fields.CharField', [], {'default': "'radius'", 'max_length': '12'}),
'secret': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'status_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.monlocalauthnparam': {
'Meta': {'object_name': 'MonLocalAuthnParam'},
'eap_method': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrealmmonid': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.InstRealmMon']", 'unique': 'True'}),
'passwp': ('django.db.models.fields.CharField', [], {'max_length': '24', 'db_column': "'pass'"}),
'phase2': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '24'})
},
'edumanage.monproxybackclient': {
'Meta': {'object_name': 'MonProxybackClient'},
'host': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instrealmmonid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.InstRealmMon']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'null': 'True', 'blank': 'True'}),
'proto': ('django.db.models.fields.CharField', [], {'max_length': '12'}),
'secret': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'status_server': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.name_i18n': {
'Meta': {'object_name': 'Name_i18n'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lang': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
},
'edumanage.realm': {
'Meta': {'object_name': 'Realm'},
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '24'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['edumanage.Contact']", 'symmetrical': 'False'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'stype': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'max_length': '1'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'edumanage.realmdata': {
'Meta': {'object_name': 'RealmData'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'number_IdP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_IdPSP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_SP': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_id': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '9'}),
'number_inst': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '5'}),
'number_user': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '9'}),
'realmid': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['edumanage.Realm']", 'unique': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {})
},
'edumanage.serviceloc': {
'AP_no': ('django.db.models.fields.PositiveIntegerField', [], {'max_length': '3'}),
'IPv6': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'Meta': {'object_name': 'ServiceLoc'},
'NAT': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'SSID': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
'address_city': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
'address_street': ('django.db.models.fields.CharField', [], {'max_length': '96'}),
'contact': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['edumanage.Contact']", 'null': 'True', 'blank': 'True'}),
'enc_level': ('edumanage.models.MultiSelectField', [], {'max_length': '64'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'institutionid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['edumanage.Institution']"}),
'latitude': ('django.db.models.fields.DecimalField', [], {'max_digits': '8', 'decimal_places': '6'}),
'longitude': ('django.db.models.fields.DecimalField', [], {'max_digits': '8', 'decimal_places': '6'}),
'port_restrict': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'transp_proxy': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'ts': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'wired': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'})
},
'edumanage.url_i18n': {
'Meta': {'object_name': 'URL_i18n'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lang': ('django.db.models.fields.CharField', [], {'max_length': '5'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'url': ('django.db.models.fields.CharField', [], {'max_length': '180', 'db_column': "'URL'"}),
'urltype': ('django.db.models.fields.CharField', [], {'max_length': '10', 'db_column': "'type'"})
}
}
complete_apps = ['edumanage']
......@@ -121,9 +121,9 @@ RADPROTOS = (
ADDRTYPES = (
(1, 'Default'),
(2, 'IPv4'),
(3, 'IPv6'),
('any', 'Default'),
('ipv4', 'IPv4 only'),
#('ipv6', 'IPv6 only'), # Commented for the time...not yet in use
)
class Name_i18n(models.Model):
......@@ -231,15 +231,15 @@ class InstServer(models.Model):
# hostname/ipaddr or descriptive label of server
name = models.CharField(max_length=80, help_text=_("Descriptive label"), null=True, blank=True) # ** (acts like a label)
# hostname/ipaddr of server, overrides name
addr_type = models.CharField(max_length=16, choices=ADDRTYPES, default='ipv4')
host = models.CharField(max_length=80, help_text=_("IP address | FQDN hostname")) # Handling with FQDN parser or ipaddr (google lib) * !!! Add help text to render it in template (mandatory, unique)
#TODO: Add description field or label field
# accept if type: 1 (idp) or 3 (idpsp) (for the folowing 4 fields)
auth_port = models.PositiveIntegerField(max_length=5, null=True, blank=True, default=1812, help_text=_("Default for RADIUS: 1812")) # TODO: Also ignore while exporting XML
acct_port = models.PositiveIntegerField(max_length=5, null=True, blank=True, default=1813, help_text=_("Default for RADIUS: 1813"))
addr_type = models.PositiveIntegerField(max_length=2, choices=ADDRTYPES)
status_server = models.BooleanField(help_text=_("Do you accept Status-Server requests?"))
secret = models.CharField(max_length=80)
proto = models.CharField(max_length=12, default=2, choices=RADPROTOS)
proto = models.CharField(max_length=12, choices=RADPROTOS, default='radius')
ts = models.DateTimeField(auto_now=True)
class Meta:
......
......@@ -1365,7 +1365,8 @@ def realmdataxml(request):
ids = 0
for inst in insts:
try:
ids = ids + inst.institutiondetails.number_id
if inst.institutiondetails.number_id:
ids = ids + inst.institutiondetails.number_id
except InstitutionDetails.DoesNotExist:
pass
nIdCountry.text = "%s" %ids
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-11-19 17:08+0200\n"
"POT-Creation-Date: 2012-11-19 18:24+0200\n"
"PO-Revision-Date: 2012-10-23 11:29+0300\n"
"Last-Translator: Leonidas Poulopoulos <leopoul@noc.grnet.gr>\n"
"Language-Team: Greek <leopoul@noc.grnet.gr>\n"
......@@ -38,68 +38,67 @@ msgstr ""
msgid "%sUser account activated"
msgstr ""
#: edumanage/forms.py:77 edumanage/forms.py:86 edumanage/forms.py:95
#: edumanage/forms.py:104 edumanage/forms.py:118
#: edumanage/forms.py:77 edumanage/forms.py:86 edumanage/forms.py:105
msgid "This field is required."
msgstr "Αυτό το πεδίο είναι απαραίτητο"
#: edumanage/forms.py:115
#: edumanage/forms.py:102
msgid "Invalid network address/hostname format"
msgstr "Λανθασμένη IP διεύθυνση ή όνομα host"
#: edumanage/forms.py:154 edumanage/forms.py:156
#: edumanage/forms.py:141 edumanage/forms.py:143
msgid "Fill in at least one location name in English"
msgstr "Συμπληρώστε τουλάχιστον ένα όνομα στα Αγγλικά"
#: edumanage/forms.py:181 edumanage/forms.py:183
#: edumanage/forms.py:168 edumanage/forms.py:170
msgid "Fill in at least the info url"
msgstr "Συμπληρώστε τουλάχιστον το info url"
#: edumanage/models.py:226 edumanage/models.py:293
#: edumanage/models.py:232 edumanage/models.py:299
msgid "Descriptive label"
msgstr "Περιγραφική ετικέτα"
#: edumanage/models.py:228 edumanage/models.py:295
#: edumanage/models.py:235 edumanage/models.py:301
msgid "IP address | FQDN hostname"
msgstr ""
#: edumanage/models.py:231
#: edumanage/models.py:238
msgid "Default for RADIUS: 1812"
msgstr "Προεπιλεγμένο για RADIUS: 1812"
#: edumanage/models.py:232
#: edumanage/models.py:239
msgid "Default for RADIUS: 1813"
msgstr "Προεπιλεγμένο για RADIUS: 1813"
#: edumanage/models.py:234
#: edumanage/models.py:240
msgid "Do you accept Status-Server requests?"
msgstr "Δέχεστε αιτήματα Status-Server;"
#: edumanage/models.py:244
#: edumanage/models.py:250
#, python-format
msgid "Server: %(servername)s, Type: %(ertype)s"
msgstr ""
#: edumanage/models.py:306
#: edumanage/models.py:312
#, python-format
msgid ""
"Institution: %(inst)s, Monitored Realm: %(monrealm)s, Proxyback Client: "
"%(servername)s"
msgstr ""
#: edumanage/models.py:349
#: edumanage/models.py:355
#, python-format
msgid ""
"Monitored Realm: %(monrealm)s, EAP Method: %(eapmethod)s, Phase 2: "
"%(phase2)s, Username: %(username)s"
msgstr ""
#: edumanage/models.py:395
#: edumanage/models.py:401
#, python-format
msgid "Institution: %(inst)s, Service Location: %(locname)s"
msgstr ""
#: edumanage/models.py:452
#: edumanage/models.py:458
msgid ""
"The primary, registered domain name for your institution, eg. example.com."
"<br>This is used to derive the Operator-Name attribute according to RFC5580, "
......@@ -109,7 +108,7 @@ msgstr ""
"παράγεται το attribute Operator-Name σύμφωνα με το RFC5580, παρ. 4.1, "
"χρησιμοποιώντας το REALM namespace, π.χ. 1example.com"
#: edumanage/models.py:454
#: edumanage/models.py:460
msgid ""
"Number of users (individuals) that are eligible to participate in eduroam "
"service"
......@@ -117,7 +116,7 @@ msgstr ""
"Συνολικός αριθμός χρηστών (προσώπων) που δύνανται να συμμετέχουν στην "
"υπηρεσία eduroam"
#: edumanage/models.py:455
#: edumanage/models.py:461
msgid ""
"Number of issued e-identities (credentials) that may be used for "
"authentication in eduroam service"
......@@ -125,17 +124,17 @@ msgstr ""
"Συνολικός αριθμός λογαριασμών που μπορούν να χρησιμοποιηθούν για ταυτοποίηση "
"χρηστών στην υπηρεσία eduroam"
#: edumanage/models.py:463
#: edumanage/models.py:469
#, python-format
msgid "Institution: %(inst)s, Type: %(ertype)s"
msgstr ""
#: edumanage/models.py:498
#: edumanage/models.py:504
#, python-format
msgid "Country: %(country)s, NRO: %(orgname)s"
msgstr ""
#: edumanage/models.py:528
#: edumanage/models.py:534
#, python-format
msgid ""
"Country: %(country)s, NRO: %(orgname)s, Institutions: %(inst)s, IdPs: "
......@@ -278,7 +277,6 @@ msgstr "Συμμετέχοντες"
#: templates/edumanage/contacts_edit.html:33
#: templates/edumanage/institution.html:35
#: templates/edumanage/institution_edit.html:87
#: templates/edumanage/server_details.html:37
#: templates/edumanage/servers.html:118 templates/edumanage/services.html:114
#: templates/edumanage/services_edit.html:349 templates/front/index.html:174
msgid "Name"
......@@ -451,7 +449,7 @@ msgstr "Προσθήκη Επαφής"
#: templates/edumanage/instrealmmon_edit.html:49
#: templates/edumanage/monlocauthpar_edit.html:77
#: templates/edumanage/realms_edit.html:59
#: templates/edumanage/servers_edit.html:102
#: templates/edumanage/servers_edit.html:110
#: templates/edumanage/services_edit.html:475
#: templates/registration/select_institution.html:57
msgid "Apply"
......@@ -511,7 +509,7 @@ msgstr "Αριθμός ΙDs"
#: templates/edumanage/institution.html:99
#: templates/edumanage/institution_edit.html:7
#: templates/edumanage/institution_edit.html:74
#: templates/edumanage/server_details.html:88
#: templates/edumanage/server_details.html:82
#: templates/edumanage/service_details.html:201
#: templates/edumanage/welcome.html:241
msgid "Edit"
......@@ -656,35 +654,38 @@ msgstr "Proxy σε Εξυπηρετητές"
msgid "Servers"
msgstr "Εξυπηρετητές"
#: templates/edumanage/server_details.html:37
#: templates/edumanage/servers_edit.html:58
msgid "Label"
msgstr "Ετικέτα"
#: templates/edumanage/server_details.html:43
msgid "Host"
#: templates/edumanage/servers_edit.html:42
msgid "Address Family"
msgstr ""
#: templates/edumanage/server_details.html:50
#: templates/edumanage/servers.html:120
msgid "Port"
#: templates/edumanage/server_details.html:49