Commit 8cba74b0 by Őry Máté

info: add help context

parent f84f11f8
...@@ -23,7 +23,7 @@ from django.shortcuts import redirect ...@@ -23,7 +23,7 @@ from django.shortcuts import redirect
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from circle.settings.base import get_env_variable from circle.settings.base import get_env_variable
from dashboard.views import circle_login from dashboard.views import circle_login, HelpView
from dashboard.forms import CirclePasswordResetForm, CircleSetPasswordForm from dashboard.forms import CirclePasswordResetForm, CircleSetPasswordForm
admin.autodiscover() admin.autodiscover()
...@@ -57,8 +57,7 @@ urlpatterns = patterns( ...@@ -57,8 +57,7 @@ urlpatterns = patterns(
), ),
url(r'^accounts/login/?$', circle_login, name="accounts.login"), url(r'^accounts/login/?$', circle_login, name="accounts.login"),
url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^info/help/$', url(r'^info/help/$', HelpView.as_view(template_name="info/help.html"),
TemplateView.as_view(template_name="info/help.html"),
name="info.help"), name="info.help"),
url(r'^info/policy/$', url(r'^info/policy/$',
TemplateView.as_view(template_name="info/policy.html"), TemplateView.as_view(template_name="info/policy.html"),
......
...@@ -3122,6 +3122,15 @@ class UserKeyCreate(LoginRequiredMixin, SuccessMessageMixin, CreateView): ...@@ -3122,6 +3122,15 @@ class UserKeyCreate(LoginRequiredMixin, SuccessMessageMixin, CreateView):
return kwargs return kwargs
class HelpView(TemplateView):
def get_context_data(self, *args, **kwargs):
ctx = super(HelpView, self).get_context_data(*args, **kwargs)
ctx.update({"saml": hasattr(settings, "SAML_CONFIG"),
"store": settings.STORE_URL})
return ctx
class StoreList(LoginRequiredMixin, TemplateView): class StoreList(LoginRequiredMixin, TemplateView):
template_name = "dashboard/store/list.html" template_name = "dashboard/store/list.html"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment