|
@@ -53,48 +53,55 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
return count_active_subscriptions()
|
|
return count_active_subscriptions()
|
|
|
|
|
|
name = models.CharField(max_length=512,
|
|
name = models.CharField(max_length=512,
|
|
- help_text="The ISP's name")
|
|
|
|
|
|
+ verbose_name="Nom",
|
|
|
|
+ help_text="Nom du FAI")
|
|
# Length required by the spec
|
|
# Length required by the spec
|
|
shortname = models.CharField(max_length=15, blank=True,
|
|
shortname = models.CharField(max_length=15, blank=True,
|
|
- help_text="Shorter name")
|
|
|
|
|
|
+ verbose_name="Abréviation",
|
|
|
|
+ help_text="Nom plus court")
|
|
description = models.TextField(blank=True,
|
|
description = models.TextField(blank=True,
|
|
- help_text="Short text describing the project")
|
|
|
|
|
|
+ verbose_name="Description",
|
|
|
|
+ help_text="Description courte du projet")
|
|
logoURL = models.URLField(blank=True,
|
|
logoURL = models.URLField(blank=True,
|
|
- verbose_name="logo URL",
|
|
|
|
- help_text="HTTP(S) URL of the ISP's logo")
|
|
|
|
|
|
+ verbose_name="URL du logo",
|
|
|
|
+ help_text="Adresse HTTP(S) du logo du FAI")
|
|
website = models.URLField(blank=True,
|
|
website = models.URLField(blank=True,
|
|
- help_text='URL to the official website')
|
|
|
|
- email = models.EmailField(help_text="Contact email address")
|
|
|
|
|
|
+ verbose_name="URL du site Internet",
|
|
|
|
+ help_text='Adresse URL du site Internet')
|
|
|
|
+ email = models.EmailField(verbose_name="Courriel",
|
|
|
|
+ help_text="Adresse courriel de contact")
|
|
mainMailingList = models.EmailField(blank=True,
|
|
mainMailingList = models.EmailField(blank=True,
|
|
- verbose_name="main mailing list",
|
|
|
|
- help_text="Main public mailing-list")
|
|
|
|
|
|
+ verbose_name="Liste de discussion principale",
|
|
|
|
+ help_text="Principale liste de discussion publique")
|
|
phone_number = models.CharField(max_length=25, blank=True,
|
|
phone_number = models.CharField(max_length=25, blank=True,
|
|
- verbose_name="phone number",
|
|
|
|
- help_text='Main contact phone number')
|
|
|
|
|
|
+ verbose_name="Numéro de téléphone",
|
|
|
|
+ help_text='Numéro de téléphone de contact principal')
|
|
creationDate = models.DateField(blank=True, null=True,
|
|
creationDate = models.DateField(blank=True, null=True,
|
|
- verbose_name="creation date",
|
|
|
|
- help_text="Date of creation for legal structure")
|
|
|
|
|
|
+ verbose_name="Date de création",
|
|
|
|
+ help_text="Date de création de la structure légale")
|
|
ffdnMemberSince = models.DateField(blank=True, null=True,
|
|
ffdnMemberSince = models.DateField(blank=True, null=True,
|
|
- verbose_name="FFDN member since",
|
|
|
|
- help_text="Date at wich the ISP joined the Federation")
|
|
|
|
|
|
+ verbose_name="Membre de FFDN depuis",
|
|
|
|
+ help_text="Date à laquelle le FAI a rejoint la Fédération FDN")
|
|
# TODO: choice field
|
|
# TODO: choice field
|
|
progressStatus = models.PositiveSmallIntegerField(
|
|
progressStatus = models.PositiveSmallIntegerField(
|
|
validators=[MaxValueValidator(7)],
|
|
validators=[MaxValueValidator(7)],
|
|
- blank=True, null=True, verbose_name='progress status',
|
|
|
|
- help_text="Progression status of the ISP")
|
|
|
|
|
|
+ blank=True, null=True, verbose_name="État d'avancement",
|
|
|
|
+ help_text="État d'avancement du FAI")
|
|
# TODO: better model for coordinates
|
|
# TODO: better model for coordinates
|
|
latitude = models.FloatField(blank=True, null=True,
|
|
latitude = models.FloatField(blank=True, null=True,
|
|
- help_text="Coordinates of the registered office (latitude)")
|
|
|
|
|
|
+ verbose_name="Latitude",
|
|
|
|
+ help_text="Coordonnées latitudinales du siège")
|
|
longitude = models.FloatField(blank=True, null=True,
|
|
longitude = models.FloatField(blank=True, null=True,
|
|
- help_text="Coordinates of the registered office (longitude)")
|
|
|
|
|
|
+ verbose_name="Longitude",
|
|
|
|
+ help_text="Coordonnées longitudinales du siège")
|
|
|
|
|
|
# Uncomment this (and handle the necessary migrations) if you want to
|
|
# Uncomment this (and handle the necessary migrations) if you want to
|
|
# manage one of the counters by hand. Otherwise, they are computed
|
|
# manage one of the counters by hand. Otherwise, they are computed
|
|
# automatically, which is probably what you want.
|
|
# automatically, which is probably what you want.
|
|
- #memberCount = models.PositiveIntegerField(help_text="Number of members",
|
|
|
|
|
|
+ #memberCount = models.PositiveIntegerField(help_text="Nombre de membres",
|
|
# default=0)
|
|
# default=0)
|
|
#subscriberCount = models.PositiveIntegerField(
|
|
#subscriberCount = models.PositiveIntegerField(
|
|
- # help_text="Number of subscribers to an internet access",
|
|
|
|
|
|
+ # help_text="Nombre d'abonnés à un accès Internet",
|
|
# default=0)
|
|
# default=0)
|
|
|
|
|
|
# field outside of db-ffdn format:
|
|
# field outside of db-ffdn format:
|
|
@@ -110,9 +117,13 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
verbose_name="serveur de listes", blank=True,
|
|
verbose_name="serveur de listes", blank=True,
|
|
help_text="URL du serveur de listes de discussions/diffusion")
|
|
help_text="URL du serveur de listes de discussions/diffusion")
|
|
|
|
|
|
|
|
+ class Meta:
|
|
|
|
+ verbose_name = "Information du FAI"
|
|
|
|
+ verbose_name_plural = "Informations du FAI"
|
|
|
|
+
|
|
@property
|
|
@property
|
|
def version(self):
|
|
def version(self):
|
|
- """Version of the API"""
|
|
|
|
|
|
+ """Version de l'API"""
|
|
return API_VERSION
|
|
return API_VERSION
|
|
|
|
|
|
@property
|
|
@property
|
|
@@ -168,25 +179,33 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
|
|
|
|
|
|
|
|
class OtherWebsite(models.Model):
|
|
class OtherWebsite(models.Model):
|
|
- name = models.CharField(max_length=512)
|
|
|
|
|
|
+ name = models.CharField(max_length=512, verbose_name="Nom")
|
|
url = models.URLField(verbose_name="URL")
|
|
url = models.URLField(verbose_name="URL")
|
|
isp = models.ForeignKey(ISPInfo)
|
|
isp = models.ForeignKey(ISPInfo)
|
|
|
|
|
|
|
|
+ class Meta:
|
|
|
|
+ verbose_name = "Autre site Internet"
|
|
|
|
+ verbose_name_plural = "Autres sites Internet"
|
|
|
|
+
|
|
|
|
|
|
class RegisteredOffice(models.Model):
|
|
class RegisteredOffice(models.Model):
|
|
""" http://json-schema.org/address """
|
|
""" http://json-schema.org/address """
|
|
- post_office_box = models.CharField(max_length=512, blank=True)
|
|
|
|
- extended_address = models.CharField(max_length=512, blank=True)
|
|
|
|
- street_address = models.CharField(max_length=512, blank=True)
|
|
|
|
- locality = models.CharField(max_length=512)
|
|
|
|
- region = models.CharField(max_length=512)
|
|
|
|
- postal_code = models.CharField(max_length=512, blank=True)
|
|
|
|
- country_name = models.CharField(max_length=512)
|
|
|
|
|
|
+ post_office_box = models.CharField(max_length=512, blank=True, verbose_name="Boîte postale")
|
|
|
|
+ extended_address = models.CharField(max_length=512, blank=True, verbose_name="Adresse complémentaire")
|
|
|
|
+ street_address = models.CharField(max_length=512, blank=True, verbose_name="Adresse")
|
|
|
|
+ locality = models.CharField(max_length=512, verbose_name="Ville")
|
|
|
|
+ region = models.CharField(max_length=512, verbose_name="Région")
|
|
|
|
+ postal_code = models.CharField(max_length=512, blank=True, verbose_name="Code postal")
|
|
|
|
+ country_name = models.CharField(max_length=512, verbose_name="Pays")
|
|
isp = models.OneToOneField(ISPInfo)
|
|
isp = models.OneToOneField(ISPInfo)
|
|
|
|
|
|
# not in db.ffdn.org spec
|
|
# not in db.ffdn.org spec
|
|
siret = FRSIRETField('SIRET')
|
|
siret = FRSIRETField('SIRET')
|
|
|
|
|
|
|
|
+ class Meta:
|
|
|
|
+ verbose_name = "Siège social"
|
|
|
|
+ verbose_name_plural = "Sièges sociaux"
|
|
|
|
+
|
|
def to_dict(self):
|
|
def to_dict(self):
|
|
d = dict()
|
|
d = dict()
|
|
for field in ('post_office_box', 'extended_address', 'street_address',
|
|
for field in ('post_office_box', 'extended_address', 'street_address',
|
|
@@ -202,11 +221,15 @@ class ChatRoom(models.Model):
|
|
verbose_name="URL", max_length=256, validators=[chatroom_url_validator])
|
|
verbose_name="URL", max_length=256, validators=[chatroom_url_validator])
|
|
isp = models.ForeignKey(ISPInfo)
|
|
isp = models.ForeignKey(ISPInfo)
|
|
|
|
|
|
|
|
+ class Meta:
|
|
|
|
+ verbose_name = "Salon de discussions"
|
|
|
|
+ verbose_name_plural = "Salons de discussions"
|
|
|
|
+
|
|
|
|
|
|
class CoveredArea(models.Model):
|
|
class CoveredArea(models.Model):
|
|
- name = models.CharField(max_length=512)
|
|
|
|
|
|
+ name = models.CharField(max_length=512, verbose_name="Nom")
|
|
|
|
|
|
- technologies = MultiSelectField(choices=TECHNOLOGIES, max_length=42)
|
|
|
|
|
|
+ technologies = MultiSelectField(choices=TECHNOLOGIES, max_length=42, verbose_name="Technologie")
|
|
# TODO: find a geojson library
|
|
# TODO: find a geojson library
|
|
#area =
|
|
#area =
|
|
isp = models.ForeignKey(ISPInfo)
|
|
isp = models.ForeignKey(ISPInfo)
|
|
@@ -215,6 +238,10 @@ class CoveredArea(models.Model):
|
|
return {"name": self.name,
|
|
return {"name": self.name,
|
|
"technologies": self.technologies}
|
|
"technologies": self.technologies}
|
|
|
|
|
|
|
|
+ class Meta:
|
|
|
|
+ verbose_name = "Zone couverte"
|
|
|
|
+ verbose_name_plural = "Zones couvertes"
|
|
|
|
+
|
|
|
|
|
|
class BankInfo(models.Model):
|
|
class BankInfo(models.Model):
|
|
"""Information about bank account and the bank itself
|
|
"""Information about bank account and the bank itself
|