mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
names: Make all apps use new api to retrieve domain names
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
ab42b9b241
commit
b684b07d11
10 files changed
+28
-55
No files matched your search
+4
-2
@@ -30,7 +30,6 @@ from django.utils.translation import get_language_info
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
import plinth
|
||||
from plinth import utils
|
||||
|
||||
|
||||
class AppForm(forms.Form):
|
||||
@@ -46,7 +45,10 @@ class DomainSelectionForm(forms.Form):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['domain_name'].choices = utils.get_domain_names()
|
||||
|
||||
from plinth.modules.names.components import DomainName
|
||||
domains = list(DomainName.list_names())
|
||||
self.fields['domain_name'].choices = zip(domains, domains)
|
||||
|
||||
domain_name = forms.ChoiceField(
|
||||
label=_('Select a domain name to be used with this application'),
|
||||
|
||||
Reference in new issue
Block a user