# Path: multiseek/views.py
# SAVED = "saved"
# OVERWRITE_PROMPT = "overwrite-prompt"
# ERR_FORM_NAME = _("Form name must not be empty")
# ERR_LOADING_DATA = _("Error while loading form data")
# ERR_PARSING_DATA = _("Error while parsing form data")
# ERR_NO_FORM_DATA = _("No form data provided")
# MULTISEEK_SESSION_KEY = "multiseek_json"
# MULTISEEK_SESSION_KEY_REMOVED = "multiseek_json_removed"
# LAST_FIELD_REMOVE_MESSAGE = _("The ability to remove the last field has been disabled.")
# JSON_OK = HttpResponse(json.dumps({"status": "OK"}), content_type="application/json")
# def reverse_or_just_url(s):
# def user_allowed_to_save_forms(user):
#     def get_context_data(self):
#         def get_values(values):
# def reset_form(request):
# def load_form(request, search_form_pk):
#     def render_to_response(self, context):
#     def get_json_response(self, content, **httpresponse_kwargs):
#     def convert_context_to_json(self, context):
#     def get(self, request, *args, **kw):
#     def get_context_data(self):
#     def post(self, request, *args, **kwargs):
#     def get_multiseek_data(self):
#     def get_removed_records(self):
#     def describe_multiseek_data(self):
#         def _recur(d):
#     def get_context_data(self, **kwargs):
#     def get_queryset(self):
# def manually_add_or_remove(request, pk, add=True):
# def remove_by_hand(request, pk):
# def remove_from_removed_by_hand(request, pk):
# def reenable_removed_by_hand(request):
# class MultiseekPageMixin:
# class MultiseekFormPage(MultiseekPageMixin, TemplateView):
# class JSONResponseMixin(object):
# class MultiseekSaveForm(MultiseekPageMixin, JSONResponseMixin, TemplateView):
# class MultiseekResults(MultiseekPageMixin, ListView):
# 
# Path: multiseek/views.py
# def load_form(request, search_form_pk):
#     try:
#         sf = SearchForm.objects.get(pk=search_form_pk)
#     except SearchForm.DoesNotExist:
#         return HttpResponseNotFound()
# 
#     if request.user.is_anonymous and not sf.public:
#         return HttpResponseForbidden()
# 
#     request.session[MULTISEEK_SESSION_KEY] = sf.data
#     return shortcuts.redirect("..")


from django.conf.urls import  url
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.views.i18n import JavaScriptCatalog
from multiseek import views
from multiseek.views import load_form
# -*- encoding: utf-8 -*-




urlpatterns = [

    url(r'^jsi18n/$',
        JavaScriptCatalog.as_view(packages=['multiseek']),
        name="js_i18n"),

    url(r'^$', csrf_exempt(views.MultiseekFormPage.as_view(
        registry=settings.MULTISEEK_REGISTRY,
        template_name="multiseek/index.html"
    )), name="index"),

    url(r'^results/$',
        csrf_exempt(views.MultiseekResults.as_view(
            registry=settings.MULTISEEK_REGISTRY,
            template_name="multiseek/results.html"
        )), name="results"),

    url(r'^save_form/$',
        csrf_exempt(views.MultiseekSaveForm.as_view(
            registry=settings.MULTISEEK_REGISTRY
        )), name="save_form"),

    url(r'^reset/$',

# Path: multiseek/views.py
# SAVED = "saved"
# OVERWRITE_PROMPT = "overwrite-prompt"
# ERR_FORM_NAME = _("Form name must not be empty")
# ERR_LOADING_DATA = _("Error while loading form data")
# ERR_PARSING_DATA = _("Error while parsing form data")
# ERR_NO_FORM_DATA = _("No form data provided")
# MULTISEEK_SESSION_KEY = "multiseek_json"
# MULTISEEK_SESSION_KEY_REMOVED = "multiseek_json_removed"
# LAST_FIELD_REMOVE_MESSAGE = _("The ability to remove the last field has been disabled.")
# JSON_OK = HttpResponse(json.dumps({"status": "OK"}), content_type="application/json")
# def reverse_or_just_url(s):
# def user_allowed_to_save_forms(user):
#     def get_context_data(self):
#         def get_values(values):
# def reset_form(request):
# def load_form(request, search_form_pk):
#     def render_to_response(self, context):
#     def get_json_response(self, content, **httpresponse_kwargs):
#     def convert_context_to_json(self, context):
#     def get(self, request, *args, **kw):
#     def get_context_data(self):
#     def post(self, request, *args, **kwargs):
#     def get_multiseek_data(self):
#     def get_removed_records(self):
#     def describe_multiseek_data(self):
#         def _recur(d):
#     def get_context_data(self, **kwargs):
#     def get_queryset(self):
# def manually_add_or_remove(request, pk, add=True):
# def remove_by_hand(request, pk):
# def remove_from_removed_by_hand(request, pk):
# def reenable_removed_by_hand(request):
# class MultiseekPageMixin:
# class MultiseekFormPage(MultiseekPageMixin, TemplateView):
# class JSONResponseMixin(object):
# class MultiseekSaveForm(MultiseekPageMixin, JSONResponseMixin, TemplateView):
# class MultiseekResults(MultiseekPageMixin, ListView):
# 
# Path: multiseek/views.py
# def load_form(request, search_form_pk):
#     try:
#         sf = SearchForm.objects.get(pk=search_form_pk)
#     except SearchForm.DoesNotExist:
#         return HttpResponseNotFound()
# 
#     if request.user.is_anonymous and not sf.public:
#         return HttpResponseForbidden()
# 
#     request.session[MULTISEEK_SESSION_KEY] = sf.data
#     return shortcuts.redirect("..")


# Path: multiseek/urls.py
from django.conf.urls import  url
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.views.i18n import JavaScriptCatalog
from multiseek import views
from multiseek.views import load_form

# -*- encoding: utf-8 -*-




urlpatterns = [

    url(r'^jsi18n/$',
        JavaScriptCatalog.as_view(packages=['multiseek']),
        name="js_i18n"),

    url(r'^$', csrf_exempt(views.MultiseekFormPage.as_view(
        registry=settings.MULTISEEK_REGISTRY,
        template_name="multiseek/index.html"
    )), name="index"),

    url(r'^results/$',
        csrf_exempt(views.MultiseekResults.as_view(
            registry=settings.MULTISEEK_REGISTRY,
            template_name="multiseek/results.html"
        )), name="results"),

    url(r'^save_form/$',
        csrf_exempt(views.MultiseekSaveForm.as_view(
            registry=settings.MULTISEEK_REGISTRY
        )), name="save_form"),

    url(r'^reset/$',

        csrf_exempt(views.reset_form),