|
@@ -36,6 +36,17 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
The naming convention is different from Python/django so that it
|
|
The naming convention is different from Python/django so that it
|
|
matches exactly the format (which uses CamelCase...)
|
|
matches exactly the format (which uses CamelCase...)
|
|
"""
|
|
"""
|
|
|
|
+
|
|
|
|
+ @property
|
|
|
|
+ def memberCount(self):
|
|
|
|
+ """Number of members"""
|
|
|
|
+ return count_active_members()
|
|
|
|
+
|
|
|
|
+ @property
|
|
|
|
+ def subscriberCount(self):
|
|
|
|
+ """Number of subscribers to an internet access"""
|
|
|
|
+ return count_active_subscriptions()
|
|
|
|
+
|
|
name = models.CharField(max_length=512,
|
|
name = models.CharField(max_length=512,
|
|
help_text="The ISP's name")
|
|
help_text="The ISP's name")
|
|
|
|
|
|
@@ -70,10 +81,14 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
longitude = models.FloatField(blank=True, null=True,
|
|
longitude = models.FloatField(blank=True, null=True,
|
|
help_text="Coordinates of the registered office (longitude)")
|
|
help_text="Coordinates of the registered office (longitude)")
|
|
|
|
|
|
-
|
|
+
|
|
-
|
|
+
|
|
-
|
|
+
|
|
-
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
administrative_email = models.EmailField(
|
|
administrative_email = models.EmailField(
|
|
@@ -89,16 +104,6 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
help_text="URL du serveur de listes de discussions/diffusion")
|
|
help_text="URL du serveur de listes de discussions/diffusion")
|
|
|
|
|
|
@property
|
|
@property
|
|
- def memberCount(self):
|
|
|
|
- """Number of members"""
|
|
|
|
- return count_active_members()
|
|
|
|
-
|
|
|
|
- @property
|
|
|
|
- def subscriberCount(self):
|
|
|
|
- """Number of subscribers to an internet access"""
|
|
|
|
- return count_active_subscriptions()
|
|
|
|
-
|
|
|
|
- @property
|
|
|
|
def version(self):
|
|
def version(self):
|
|
"""Version of the API"""
|
|
"""Version of the API"""
|
|
return API_VERSION
|
|
return API_VERSION
|