MozReview: Migrate rbbz/forms.py to mozreview/forms.py (
Bug 1262548). r?smacleod
MozReview-Commit-ID: Ct5UC27ivYN
--- a/pylib/mozreview/mozreview/forms.py
+++ b/pylib/mozreview/mozreview/forms.py
@@ -1,13 +1,25 @@
from django import forms
from django.utils.translation import ugettext as _
from djblets.extensions.forms import SettingsForm
+from djblets.siteconfig.forms import SiteSettingsForm
import mozreview.extension
class MozReviewSettingsForm(SettingsForm):
config = forms.CharField(
required=False,
help_text=_('Configure this extension by editing ' +
mozreview.extension.SETTINGS_PATH)
)
+
+
+class BugzillaAuthSettingsForm(SiteSettingsForm):
+
+ auth_bz_xmlrpc_url = forms.CharField(
+ label="Bugzilla XMLRPC URL",
+ help_text="URL for your Bugzilla installation's XMLRPC interface",
+ required=True)
+
+ class Meta:
+ title = "Bugzilla Backend Settings"
--- a/pylib/rbbz/rbbz/auth.py
+++ b/pylib/rbbz/rbbz/auth.py
@@ -19,17 +19,17 @@ from mozreview.bugzilla.models import (
BugzillaUserMap,
get_bugzilla_api_key,
get_or_create_bugzilla_users,
)
from mozreview.errors import (
BugzillaAPIKeyNeededError,
WebLoginNeededError,
)
-from rbbz.forms import BugzillaAuthSettingsForm
+from mozreview.forms import BugzillaAuthSettingsForm
logger = logging.getLogger(__name__)
class BugzillaBackend(AuthBackend):
"""
Authenticate a user via Bugzilla XMLRPC.
deleted file mode 100644
--- a/pylib/rbbz/rbbz/forms.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from django import forms
-from djblets.siteconfig.forms import SiteSettingsForm
-
-
-class BugzillaAuthSettingsForm(SiteSettingsForm):
-
- auth_bz_xmlrpc_url = forms.CharField(
- label="Bugzilla XMLRPC URL",
- help_text="URL for your Bugzilla installation's XMLRPC interface",
- required=True)
-
- class Meta:
- title = "Bugzilla Backend Settings"