Exemple #1
0
"""@package src.wi.urls.admin_clm.cm

@author Krzysztof Danielowski, Piotr Wojcik
@date 17.03.2011
"""

from django.conf.urls import url, patterns, include
from django.utils.translation import ugettext_lazy as _
from wi.forms.cm import EditCMForm, CreateCMForm
from wi.utils.decorators import admin_clm_permission
from wi.utils.views import direct_to_template, simple_generic_id, \
    form_generic_id, form_generic

cm_patterns = patterns('wi.views.admin_clm.cm',
    url(r'^cms$', admin_clm_permission(direct_to_template), {'template_name': 'admin_clm/cms.html'}, name='clm_cms'),
    url(r'^ajax/get_table_cms/$', 'clm_ajax_get_table_cms', name='clm_ajax_get_table_cms'),
    url(r'^ajax/delete_cm/(?P<id1>\d+)/$', admin_clm_permission(simple_generic_id),
        {'template_name':   'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully deleted CM <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to delete CM <b>%(desc)s</b>?') % {'desc': desc}),
         'request_url':     'admin_clm/cluster/delete/',
         'id_key':          'cluster_id'},
        name='clm_ajax_delete_cm'),
    url(r'^ajax/lock_cm/(?P<id1>\d+)/$', admin_clm_permission(simple_generic_id),
         {'template_name':  'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully locked CM <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to lock CM <b>%(desc)s</b>?') % {'desc': desc}),
         'request_url':     'admin_clm/cluster/lock/',
         'id_key':          'cluster_id'},
        name='clm_ajax_lock_cm'),
Exemple #2
0
#    You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.
#
# @COPYRIGHT_end

"""@package src.wi.urls.admin_clm

@author Piotr Wójcik
@date 31.01.2014
"""

from django.conf.urls import patterns, url, include

from wi.utils.decorators import admin_clm_permission
from wi.utils.views import direct_to_template


urlpatterns = patterns('',
                       (r'', include('wi.urls.admin_clm.news')),
                       (r'', include('wi.urls.admin_clm.user')),
                       (r'', include('wi.urls.admin_clm.cm')),
                       url(r'^admin_clm/$', admin_clm_permission(direct_to_template), {'template_name': 'admin_clm/base.html'}, name='admin_clm'),
                      )
Exemple #3
0
@author Krzysztof Danielowski, Piotr Wojcik
@date 17.03.2011
"""

from django.conf import settings
from django.conf.urls import url, patterns, include
from django.utils.translation import ugettext_lazy as _
from wi.forms.user import AccountDataEditAdminCLM
from wi.utils.decorators import admin_clm_permission
from wi.utils.views import direct_to_template, simple_generic_id, \
    form_generic_id, get_list_generic_id


user_patterns = patterns('wi.views.admin_clm.user',

    url(r'^users/$', admin_clm_permission(direct_to_template), {'template_name': 'admin_clm/users.html'}, name='clm_users'),
    url(r'^user_account/(?P<userid>\d+)/$', 'clm_user_account', name='clm_user_account'),
    url(r'^ajax/get_table_users/$', 'clm_ajax_get_table_users', name='clm_ajax_get_table_users'),
    url(r'^ajax/activate_user/(?P<id1>\d+)/$', admin_clm_permission(simple_generic_id),
        {'template_name':   'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully activated user <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to activate user <b>%(desc)s</b>?') % {'desc': desc}),
         'request_url':     'admin_clm/user/activate/',
         'id_key':          'user_id',
         'param':           {'wi_data': settings.WI_DATA}},
        name='clm_ajax_activate_user'),

    url(r'^ajax/block_user/(?P<id1>\d+)/$', admin_clm_permission(simple_generic_id),
        {'template_name':   'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully blocked user <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to block user <b>%(desc)s</b>?') % {'desc': desc}),
Exemple #4
0
"""@package src.wi.urls.admin_clm.news

@author Krzysztof Danielowski, Piotr Wojcik
@date 17.03.2011
"""

from django.conf.urls import url, patterns, include
from django.utils.translation import ugettext_lazy as _

from wi.utils.decorators import user_permission, admin_clm_permission
from wi.forms.news import NewsForm
from wi.utils.views import form_generic, simple_generic_id


news_patterns = patterns('wi.views.admin_clm.news',
    url(r'^ajax/add_news/$', admin_clm_permission(form_generic),
        {'template_name':        'generic/form.html',
         'success_msg':          (lambda desc, data: _('News entry added.') % {'desc': desc}),
         'confirmation':         _('Create'),
         'request_url_post':    'admin_clm/news/add/',
         'form_class':           NewsForm},
        name='mai_ajax_add_news'),
    url(r'^ajax/delete_news/(?P<id1>\d+)/$', user_permission(simple_generic_id),
        {'template_name':   'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully removed news entry <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to delete news entry <b>%(desc)s</b>?') % {'desc': desc}),
         'request_url':     'admin_clm/news/delete/',
         'id_key':          'news_id'},
         name='mai_ajax_delete_news'),
    url(r'^ajax/edit_news/(?P<id1>\d+)/$', 'mai_ajax_edit_news', name='mai_ajax_edit_news'),
)
Exemple #5
0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.
#
# @COPYRIGHT_end
"""@package src.wi.urls.admin_clm

@author Piotr Wójcik
@date 31.01.2014
"""

from django.conf.urls import patterns, url, include

from wi.utils.decorators import admin_clm_permission
from wi.utils.views import direct_to_template

urlpatterns = patterns(
    '',
    (r'', include('wi.urls.admin_clm.news')),
    (r'', include('wi.urls.admin_clm.user')),
    (r'', include('wi.urls.admin_clm.cm')),
    url(r'^admin_clm/$',
        admin_clm_permission(direct_to_template),
        {'template_name': 'admin_clm/base.html'},
        name='admin_clm'),
)
Exemple #6
0
@author Krzysztof Danielowski, Piotr Wojcik
@date 17.03.2011
"""

from django.conf import settings
from django.conf.urls import url, patterns, include
from django.utils.translation import ugettext_lazy as _

from wi.forms.user import AccountDataEditAdminCLM
from wi.utils.decorators import admin_clm_permission
from wi.utils.views import direct_to_template, simple_generic_id, form_generic_id, get_list_generic_id


user_patterns = patterns('wi.views.admin_clm.user',

    url(r'^users/$', admin_clm_permission(direct_to_template), {'template_name': 'admin_clm/users.html'}, name='clm_users'),
    url(r'^user_account/(?P<userid>\d+)/$', 'clm_user_account', name='clm_user_account'),
    url(r'^ajax/get_table_users/$', 'clm_ajax_get_table_users', name='clm_ajax_get_table_users'),
    url(r'^ajax/activate_user/(?P<id1>\d+)/$', admin_clm_permission(simple_generic_id),
        {'template_name':   'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully activated user <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to activate user <b>%(desc)s</b>?') % {'desc': desc}),
         'request_url':     'admin_clm/user/activate/',
         'id_key':          'user_id',
         'param':           {'wi_data': settings.WI_DATA}},
        name='clm_ajax_activate_user'),

    url(r'^ajax/block_user/(?P<id1>\d+)/$', admin_clm_permission(simple_generic_id),
        {'template_name':   'generic/simple.html',
         'success_msg':     (lambda desc: _('You have successfully blocked user <b>%(desc)s</b>.') % {'desc': desc}),
         'ask_msg':         (lambda desc: _('Do you want to block user <b>%(desc)s</b>?') % {'desc': desc}),