|
a/Allura/allura/lib/plugin.py |
|
b/Allura/allura/lib/plugin.py |
|
... |
|
... |
271 |
from allura.lib.widgets import forms as forms
|
271 |
from allura.lib.widgets import forms as forms
|
272 |
self.add_project_widget = forms.NeighborhoodAddProjectForm
|
272 |
self.add_project_widget = forms.NeighborhoodAddProjectForm
|
273 |
|
273 |
|
274 |
@classmethod
|
274 |
@classmethod
|
275 |
def get(cls):
|
275 |
def get(cls):
|
|
|
276 |
from allura.lib import app_globals
|
276 |
method = config.get('registration.method', 'local')
|
277 |
method = config.get('registration.method', 'local')
|
277 |
return g.entry_points['registration'][method]()
|
278 |
return app_globals.Globals().entry_points['registration'][method]()
|
278 |
|
279 |
|
279 |
def name_taken(self, project_name):
|
280 |
def name_taken(self, project_name):
|
280 |
from allura import model as M
|
281 |
from allura import model as M
|
281 |
p = M.Project.query.get(shortname=project_name)
|
282 |
p = M.Project.query.get(shortname=project_name)
|
282 |
if p:
|
283 |
if p:
|