Did I find the right examples for you? yes no

All Samples(28)  |  Call(20)  |  Derive(0)  |  Import(8)

src/i/o/ionyweb-0.3/ionyweb/administration/views/plugin.py   ionyweb(Download)
from ionyweb.website.rendering import RenderingContext
from ionyweb.administration.views import IsAdminView
from ionyweb.administration.utils import (MESSAGES,
                                         check_object_html_id,
                                         check_placeholder_html_id,
        if relation_html_id is not None:
            # Get the ID relation
            pk = check_object_html_id(relation_html_id)[1]
            try:
                obj = PluginRelation.objects.filter(
          - csrf token
        """
        pk = check_object_html_id(relation_html_id)[1]
        try:
            plugin_relation = PluginRelation.objects.filter(
        """
 
        pk = check_object_html_id(relation_html_id)[1]
 
        try:
            for plugin_id in plugins_order:                
                # Check plugin HTML ID
                plugin_type, relation_id = check_object_html_id(plugin_id,
                                                           types=[settings.SLUG_PLUGIN,
                                                                  settings.SLUG_APP])

src/i/o/ionyweb-HEAD/ionyweb/administration/views/plugin.py   ionyweb(Download)
from ionyweb.website.rendering import RenderingContext
from ionyweb.administration.views import IsAdminView
from ionyweb.administration.utils import (MESSAGES,
                                         check_object_html_id,
                                         check_placeholder_html_id,
        if relation_html_id is not None:
            # Get the ID relation
            pk = check_object_html_id(relation_html_id)[1]
            try:
                obj = PluginRelation.objects.filter(
          - csrf token
        """
        pk = check_object_html_id(relation_html_id)[1]
        try:
            plugin_relation = PluginRelation.objects.filter(
        """
 
        pk = check_object_html_id(relation_html_id)[1]
 
        try:
            for plugin_id in plugins_order:                
                # Check plugin HTML ID
                plugin_type, relation_id = check_object_html_id(plugin_id,
                                                           types=[settings.SLUG_PLUGIN,
                                                                  settings.SLUG_APP])

src/i/o/ionyweb-0.3/ionyweb/administration/views/action.py   ionyweb(Download)
from ionyweb.plugin.models import PluginRelation
from ionyweb.administration.views import IsAdminView
from ionyweb.administration.utils import MESSAGES, check_object_html_id
 
 
        # If slug not valid => raise HTTP_400_BAD_REQUEST
        object_type, object_id = check_object_html_id(
            html_id_object, types=[settings.SLUG_PLUGIN, settings.SLUG_APP])
 
        # Case #1 - Object Type : PluginRelation

src/i/o/ionyweb-HEAD/ionyweb/administration/views/action.py   ionyweb(Download)
from ionyweb.plugin.models import PluginRelation
from ionyweb.administration.views import IsAdminView
from ionyweb.administration.utils import MESSAGES, check_object_html_id
 
 
        # If slug not valid => raise HTTP_400_BAD_REQUEST
        object_type, object_id = check_object_html_id(
            html_id_object, types=[settings.SLUG_PLUGIN, settings.SLUG_APP])
 
        # Case #1 - Object Type : PluginRelation

src/i/o/ionyweb-0.3/ionyweb/administration/actions/views.py   ionyweb(Download)
from ionyweb.plugin.models import AbstractPlugin
from ionyweb.administration.views import IsAdminView
from ionyweb.administration.utils import MESSAGES, check_object_html_id, check_placeholder_html_id
 
 
    def render_to_response_with_refresh(self, relation_id, app_obj, msg=None):
 
        id_items = check_object_html_id(relation_id,
                                        types=[settings.SLUG_PLUGIN,
                                               settings.SLUG_APP])

src/i/o/ionyweb-HEAD/ionyweb/administration/actions/views.py   ionyweb(Download)
from ionyweb.plugin.models import AbstractPlugin
from ionyweb.administration.views import IsAdminView
from ionyweb.administration.utils import MESSAGES, check_object_html_id, check_placeholder_html_id
 
 
    def render_to_response_with_refresh(self, relation_id, app_obj, msg=None):
 
        id_items = check_object_html_id(relation_id,
                                        types=[settings.SLUG_PLUGIN,
                                               settings.SLUG_APP])

src/i/o/ionyweb-0.3/ionyweb/administration/tests/utils.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.utils import unittest
from django.conf import settings
from djangorestframework.response import ErrorResponse
from ionyweb.administration.utils import (check_object_html_id as cohi,
        # Accept a valid html id plugin
        html_id_plugin = '%s%d' % (settings.HTML_ID_PLUGIN, 1)
        items_returned = cohi(html_id_plugin)
        self.assertEqual(items_returned, [settings.SLUG_PLUGIN, '1'])
        # Reject a valid html id App
        # Accept a valid app html id
        html_id_app = '%s%d' % (settings.HTML_ID_APP, 1)
        items_returned = cohi(html_id_app, types)
        self.assertEqual(items_returned, [settings.SLUG_APP, '1'])
        # Reject a valid plugin html id
        # Accept a valid html id plugin
        html_id_plugin = '%s%d' % (settings.HTML_ID_PLUGIN, 1)
        items_returned = cohi(html_id_plugin, types)
        self.assertEqual(items_returned, [settings.SLUG_PLUGIN, '1'])
        # Accept a valid html id app
        html_id_app = '%s%d' % (settings.HTML_ID_APP, 1)
        items_returned = cohi(html_id_app, types)

src/i/o/ionyweb-HEAD/ionyweb/administration/tests/utils.py   ionyweb(Download)
# -*- coding: utf-8 -*-
from django.utils import unittest
from django.conf import settings
from djangorestframework.response import ErrorResponse
from ionyweb.administration.utils import (check_object_html_id as cohi,
        # Accept a valid html id plugin
        html_id_plugin = '%s%d' % (settings.HTML_ID_PLUGIN, 1)
        items_returned = cohi(html_id_plugin)
        self.assertEqual(items_returned, [settings.SLUG_PLUGIN, '1'])
        # Reject a valid html id App
        # Accept a valid app html id
        html_id_app = '%s%d' % (settings.HTML_ID_APP, 1)
        items_returned = cohi(html_id_app, types)
        self.assertEqual(items_returned, [settings.SLUG_APP, '1'])
        # Reject a valid plugin html id
        # Accept a valid html id plugin
        html_id_plugin = '%s%d' % (settings.HTML_ID_PLUGIN, 1)
        items_returned = cohi(html_id_plugin, types)
        self.assertEqual(items_returned, [settings.SLUG_PLUGIN, '1'])
        # Accept a valid html id app
        html_id_app = '%s%d' % (settings.HTML_ID_APP, 1)
        items_returned = cohi(html_id_app, types)