def get_urls(self): """Get urls accessible in admin interface """ def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return functools.update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name return ( urls.patterns( "", urls.url( "^get_layout_form/(?P<page_id>\w+)/(?P<layout_id>\w+)/" + "(?P<lang_code>\w+)$", wrap(self.layout_view), name="%s_%s_get_layout_form" % info, ), urls.url( "^get_layout_form/(?P<layout_id>\w+)/(?P<lang_code>\w+)$", wrap(self.layout_view), name="%s_%s_get_layout_form" % info, ), ) + super(PageAdmin, self).get_urls() )
def get_urls(self): """ Extends standard admin model urls with the following: - ``.../permissions/`` - ``.../permissions/user-manage/<user_id>/`` - ``.../permissions/group-manage/<group_id>/`` .. note:: ``...`` above are standard, instance detail url (i.e. ``/admin/flatpages/1/``) """ urls = super(GuardedModelAdmin, self).get_urls() info = self.model._meta.app_label, self.model._meta.module_name myurls = patterns('', url(r'^(?P<object_pk>.+)/permissions/$', view=self.admin_site.admin_view(self.obj_perms_manage_view), name='%s_%s_permissions' % info), url(r'^(?P<object_pk>.+)/permissions/user-manage/(?P<user_id>\-?\d+)/$', view=self.admin_site.admin_view( self.obj_perms_manage_user_view), name='%s_%s_permissions_manage_user' % info), url(r'^(?P<object_pk>.+)/permissions/group-manage/(?P<group_id>\-?\d+)/$', view=self.admin_site.admin_view( self.obj_perms_manage_group_view), name='%s_%s_permissions_manage_group' % info), ) return myurls + urls
def get_urls(self): def wrap(view): def wrapper(*args, **kwargs): # "super admin" doesn't ask for competition selection if hasattr(self.admin_site, 'competition_admin_view'): return self.admin_site.competition_admin_view(view)(*args, **kwargs) return view(*args, **kwargs) return update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name urlpatterns = patterns('', url(r'^$', wrap(self.changelist_view), name='%s_%s_changelist' % info), url(r'^add/$', wrap(self.add_view), name='%s_%s_add' % info), url(r'^(.+)/history/$', wrap(self.history_view), name='%s_%s_history' % info), url(r'^(.+)/delete/$', wrap(self.delete_view), name='%s_%s_delete' % info), url(r'^(.+)/$', wrap(self.change_view), name='%s_%s_change' % info), ) return urlpatterns
def get_urls(self): opts = self.model._meta buttons_urls = [url(r'^(\d+)/(%s)/$' % but.flag, self.wrap(self.button_view_dispatcher)) for but in self.buttons] buttons_urls.append(url(r'^lookup/related/$', self.wrap(self.related_lookup), name="%s_%s_related_lookup" % (opts.app_label, opts.object_name.lower()))) buttons_urls.append(url(r'^chained/$', self.wrap(self.filterchain), name="%s_%s_filterchain" % (opts.app_label, opts.object_name.lower()))) return patterns('', *buttons_urls) + super(PowerModelAdmin, self).get_urls()
def get_urls(self): urlpatterns = patterns('', url(r'^$', self.view_that_asks_for_money, name='paypal' ), url(r'^success$', self.paypal_successful_return_view, name='paypal_success'), url(r'^/somethinghardtoguess/instantpaymentnotification/$', include('paypal.standard.ipn.urls')), ) return urlpatterns
def override_urls(self): """Make resource's URL to match guid instead of real PK id, See also get_resource_uri above.""" return [ url(r"^(?P<resource_name>%s)/search%s$" % (self._meta.resource_name, trailing_slash()), self.wrap_view('get_search'), name="api_get_search"), url(r"^(?P<resource_name>%s)/(?P<guid>[\w\d\._-]+)/$" % self._meta.resource_name, self.wrap_view('dispatch_detail'), name="api_dispatch_detail"), ]
def create_urls(backend): return patterns('', url(r'^activate/complete/$', 'django.views.generic.simple.direct_to_template', { 'template': 'registration/activation_complete.html' }, name='registration_activation_complete'), # Activation keys get matched by \w+ instead of the more specific # [a-fA-F0-9]{40} because a bad activation key should still get to the view; # that way it can return a sensible "invalid key" message instead of a # confusing 404. url(r'^activate/(?P<activation_key>\w+)/$', 'registration.views.activate', { 'backend': backend }, name='registration_activate'), url(r'^register/$', 'registration.views.register', { 'backend': backend }, name='register'), url(r'^register/complete/$', 'django.views.generic.simple.direct_to_template', { 'template': 'registration/registration_complete.html' }, name='registration-complete'), url(r'^register/closed/$', 'django.views.generic.simple.direct_to_template', { 'template': 'registration/registration_closed.html' }, name='registration-disabled'), )
def get_urls(self): urlpatterns = patterns('', url(r'^$', self.view_that_asks_for_money, name='postfinance' ), url(r'^success$', self.postfinance_return_successful_view, name='postfinance_success' ), url(r'^/somethinghardtoguess/instantpaymentnotification/$', self.postfinance_ipn, 'postfinance_ipn'), ) return urlpatterns
def get_redirect_patterns(): """ Gets the redirect patterns out of the database and assigns them to the django patterns object. """ site_id = settings.SITE_ID url_patterns = [] url_list = [] db_filters = { 'status': 1, 'site': site_id, 'is_partial': False, 'uses_regex': True } redirects = Redirect.objects.filter(**db_filters) for redirect in redirects: extra = {} pattern = r'^%s$' % redirect.from_url extra.update({'url': '%s' % redirect.to_url}) if redirect.http_status == 302: extra.update({'permanent': False}) url_list.append(url(pattern, 'redirect_to', extra)) else: url_list.append(url(pattern, 'redirect_to', extra)) arg_groups = list(group_arguments(url_list)) for args in arg_groups: url_patterns += patterns('robustredirects.views', *args) return url_patterns
def get_urls(self): """New way of urls handling. """ from django.conf.urls.defaults import patterns, url info = "%sadmin_%s_%s" % (self.admin_site.name, self.model._meta.app_label, self.model._meta.module_name) # helper for url pattern generation pat = lambda regex, fn: url(regex, self.admin_site.admin_view(fn), name='%s_%s' % (info, fn.__name__)) url_patterns = patterns('', pat(r'add-plugin/$', add_plugin), url(r'edit-plugin/([0-9]+)/$', self.admin_site.admin_view(curry(edit_plugin, admin_site=self.admin_site)), name='%s_edit_plugin' % info), pat(r'remove-plugin/$', remove_plugin), pat(r'move-plugin/$', move_plugin), pat(r'^([0-9]+)/delete-translation/$', self.delete_translation), pat(r'^([0-9]+)/move-page/$', self.move_page), pat(r'^([0-9]+)/copy-page/$', self.copy_page), pat(r'^([0-9]+)/change-status/$', change_status), pat(r'^([0-9]+)/change-navigation/$', change_innavigation), pat(r'^([0-9]+)/jsi18n/$', self.redirect_jsi18n), pat(r'^([0-9]+)/permissions/$', self.get_permissions), pat(r'^([0-9]+)/moderation-states/$', self.get_moderation_states), pat(r'^([0-9]+)/change-moderation/$', change_moderation), pat(r'^([0-9]+)/approve/$', self.approve_page), # approve page pat(r'^([0-9]+)/remove-delete-state/$', self.remove_delete_state), pat(r'^([0-9]+)/dialog/copy/$', get_copy_dialog), # copy dialog pat(r'^([0-9]+)/preview/$', self.preview_page), # copy dialog ) url_patterns = url_patterns + super(PageAdmin, self).get_urls() return url_patterns
def get_urls(self): """ Expose the custom URLs for the subclasses and the URL resolver. """ urls = super(PolymorphicParentModelAdmin, self).get_urls() info = self.model._meta.app_label, self.model._meta.module_name # Patch the change URL so it's not a big catch-all; allowing all custom URLs to be added to the end. # The url needs to be recreated, patching url.regex is not an option Django 1.4's LocaleRegexProvider changed it. new_change_url = url(r'^(\d+)/$', self.admin_site.admin_view(self.change_view), name='{0}_{1}_change'.format(*info)) for i, oldurl in enumerate(urls): if oldurl.name == new_change_url.name: urls[i] = new_change_url # Define the catch-all for custom views custom_urls = patterns('', url(r'^(?P<path>.+)$', self.admin_site.admin_view(self.subclass_view)) ) # At this point. all admin code needs to be known. self._lazy_setup() # Add reverse names for all polymorphic models, so the delete button and "save and add" just work. # These definitions are masked by the definition above, since it needs special handling (and a ct_id parameter). dummy_urls = [] for model, _ in self.get_child_models(): admin = self._get_real_admin_by_model(model) dummy_urls += admin.get_urls() return urls + custom_urls + dummy_urls
def get_urls(self): from django.conf.urls.defaults import patterns, url def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) info = self.admin_site.name, self.model._meta.app_label, self.model._meta.module_name urlpatterns = patterns('', url(r'^$', wrap(self.changelist_view), name='%sadmin_%s_%s_changelist' % info), url(r'^add/$', wrap(self.add_view), name='%sadmin_%s_%s_add' % info), url(r'^(.+)/history/$', wrap(self.history_view), name='%sadmin_%s_%s_history' % info), url(r'^(.+)/delete/$', wrap(self.delete_view), name='%sadmin_%s_%s_delete' % info), url(r'^(.+)/$', wrap(self.change_view), name='%sadmin_%s_%s_change' % info), ) return urlpatterns
def get_urls(self): info = self.model._meta.app_label, self.model._meta.module_name urlpatterns = patterns('', url(r'^\.(?P<format>' + '|'.join(self.allowed_formats) + ')$', helpers.wrap_api_function( self.api_site, self.list_view, 1, self.list_allowed_methods ), name = '%s_%s_list' % info ), url(r'^/(?P<object_id>\d+)\.(?P<format>' + '|'.join(self.allowed_formats) + ')$', helpers.wrap_api_function( self.api_site, self.object_view, 2, self.object_allowed_methods ), name = '%s_%s_object' % info ) ) for inline in self.inline_instances: urlpatterns += patterns('', url( r'^/(?P<' + inline.rel_field.name + '>\d+)/' + inline.rel_name, include(inline.get_urls()) ) ) return urlpatterns
def get_urls(self): document = self.get_document() params = self.to_primitive(self) index = self.get_base_index() urlpatterns = patterns('', url(r'^$', self.list_view_class.as_view(document=document, queryset=index, configuration=self._configuration_from_prefix(params, 'list'), paginate_by=params.get('paginate_by', None)), name='index', ), ) if params.get('slug_field', None): urlpatterns += patterns('', url(r'^(?P<slug>.+)/$', self.detail_view_class.as_view(document=document, queryset=index, slug_field=params['slug_field'], configuration=self._configuration_from_prefix(params, 'detail'),), name='detail', ), ) else: urlpatterns += patterns('', url(r'^(?P<pk>.+)/$', self.detail_view_class.as_view(document=document, queryset=index, configuration=self._configuration_from_prefix(params, 'detail'),), name='detail', ), ) return urlpatterns
def get_urls(self): """Manages not only TreeAdmin URLs but also TreeItemAdmin URLs.""" urls = super(TreeAdmin, self).get_urls() sitetree_urls = patterns( "", # Django 1.4 Admin contrib new url handling workarounds below. # Sitetree item redirect on 'save' and breadcrumbs fix. url(r"^p_tree/$", redirects_handler, name="sitetree_treeitem_changelist"), # Sitetree item history breadcrumbs fix. url(r"^p_tree/(?P<item_id>\d+)", redirects_handler), # Sitetree item redirect on 'save and add another' fix. # Note that this is a stab, as actual redirect happens in TreeItemAdmin::response_change(). url(r"^dummy_another$", lambda x: x, name="sitetree_treeitem_add"), (r"^(?P<tree_id>\d+)/item_add/$", self.admin_site.admin_view(self.tree_admin.item_add)), (r"^(?P<tree_id>\d+)/item_(?P<item_id>\d+)/$", self.admin_site.admin_view(self.tree_admin.item_edit)), ( r"^(?P<tree_id>\d+)/item_(?P<item_id>\d+)/history/$", self.admin_site.admin_view(self.tree_admin.item_history), ), ( r"^(?P<tree_id>\d+)/item_(?P<item_id>\d+)/delete/$", self.admin_site.admin_view(self.tree_admin.item_delete), ), ( r"^(?P<tree_id>\d+)/item_(?P<item_id>\d+)/move_(?P<direction>(up|down))/$", self.admin_site.admin_view(self.tree_admin.item_move), ), ) return sitetree_urls + urls
def get_urls(self): from django.conf.urls.defaults import patterns, url, include def wrap(view, cacheable=False): def wrapper(*args, **kwargs): return self.manager_view(view, cacheable)(*args, **kwargs) return update_wrapper(wrapper, view) # Manager-site-wide views. urlpatterns = [] # Add in each model's common and manager views. for model, reg_dict in self._registry.iteritems(): info = model._meta.app_label, model._meta.module_name def fieldlist_view(*args, **kwargs): return self.modelfieldlist_view(model=model, *args, **kwargs) urlpatterns += patterns('', url(r'^%s/%s/$' % (info), wrap(fieldlist_view), name='%s_%s_fieldlist' % info ), url(r'^%s/%s/None' % (info), wrap(TemplateView.as_view(template_name=( 'ckeditor_filemodel_manager/unsaved.html' ))), name='%s_%s_unsaved' % info ), ) for fieldname_dict, manager in reg_dict.iteritems(): urlpatterns += patterns('', url(r'^%s/%s/' % info, include(manager.urls)) ) return urlpatterns
def _decorated_urls(self): urlpatterns = self._get_default_urlpatterns() self._autodiscover() default_panel = None # Add in each panel's views except for the default view. for panel in self._registry.values(): if panel.slug == self.default_panel: default_panel = panel continue urlpatterns += patterns('', url(r'^%s/' % panel.slug, include(panel._decorated_urls))) # Now the default view, which should come last if not default_panel: raise NotRegistered('The default panel "%s" is not registered.' % self.default_panel) urlpatterns += patterns('', url(r'', include(default_panel._decorated_urls))) # Require login if not public. if not self.public: _decorate_urlconf(urlpatterns, login_required) # Apply access controls to all views in the patterns roles = getattr(self, 'roles', []) services = getattr(self, 'services', []) _decorate_urlconf(urlpatterns, require_roles, roles) _decorate_urlconf(urlpatterns, require_services, services) _decorate_urlconf(urlpatterns, _current_component, dashboard=self) # Return the three arguments to django.conf.urls.defaults.include return urlpatterns, self.slug, self.slug
def get_urls(self): from django.conf.urls.defaults import patterns, url def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name urlpatterns = patterns('', url(r'^$', wrap(self.changelist_view), name='%s_%s_changelist' % info), url(r'^(?P<object_id>.+)/delete_selected/$', self.admin_site.admin_view(self.delete_selected_view), name='%s_%s_delete_selected' % info), url(r'^(?P<object_id>.+)/details/$', self.admin_site.admin_view(self.details_view), name='%s_%s_details' % info), url(r'^(?P<object_id>.+)/permissions/$', self.admin_site.admin_view(self.permissions_view), name='%s_%s_permissions' % info), url(r'^(?P<object_id>.+)/settings/$', self.admin_site.admin_view(self.container_settings), name='%s_%s_settings' % info), url(r'^None/$', self.admin_site.index, name='%s_%s_none_details' % info), url(r'^add/$', wrap(self.add_view), name='%s_%s_add' % info), url(r'^(.+)/history/$', wrap(self.history_view), name='%s_%s_history' % info), url(r'^(.+)/delete/$', self.delete_view, name='%s_%s_delete' % info), url(r'^(.+)/$', wrap(self.change_view), name='%s_%s_change' % info), ) return urlpatterns
def get_urls(self): """ Add URL patterns for the export formats. Really all these URLs do are set extra_context to contain the export_delimiter for the template which actually generates the "CSV". """ urls = super(ExportableAdmin, self).get_urls() app, mod = self.model._meta.app_label, self.model._meta.module_name # make a URL pattern for each export format new_urls = [ url( r'^export/%s$' % format_name.lower(), self.admin_site.admin_view(self.changelist_view), name="%s_%s_export_%s" % (app, mod, format_name.lower()), kwargs={'extra_context':{'export_delimiter':delimiter}}, ) for format_name, delimiter in self.export_formats ] for export_type in self.export_types: new_urls.append(url( r'^export/%s$' % export_type.lower(), self.admin_site.admin_view(self.changelist_view), name="%s_%s_export_%s" % (app, mod, export_type.lower()), kwargs={'extra_context':{'export_type':export_type.lower()}}, )) my_urls = patterns('', *new_urls) return my_urls + urls
def get_urls(self): urlpatterns = patterns('', url(r'^$', self.ceca_payment_view, name='ceca' ), url(r'^success$', self.ceca_successful_return_view, name='ceca_success' ), url(r'^ipn/$', self.payment_ipn, name='ceca_ipn' ), ) return urlpatterns
def override_urls(self): return [ url(r"^test$", self.test_custom_dispatch, name="api_dispatch_user"), url(r"^reload-test$", self.test_reload_tab, name="test_reload_tab"), url(r"^test-table-pagination$", self.test_table_pagination, name="table_pagination"), url(r"^test_create_table$", self._create_table, name="test_create_table"), ]
def get_urls(self): from django.conf.urls.defaults import patterns, url urlpatterns = super(RealEstateAppPopUpModelAdmin,self).get_urls() def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) info = self.model._meta.app_label, self.model._meta.module_name custom_urls = patterns('', url(r'^add/$', wrap(self.add_view_popup), name='%s_%s_add_popup' % info ), url(r'^(?P<object_id>\d+)/$', wrap(self.change_view_popup), name='%s_%s_chage_popup' % info ), url(r'^/$', wrap(self.changelist_view_popup), name='%s_%s_view_popup' % info ), url(r'^(?P<object_id>\d+)/delete/$', wrap(self.delete_view_popup), name='%s_%s_delete_popup' % info ), ) return custom_urls + urlpatterns
def get_redirect_patterns(): """ Gets the redirect patterns out of the database and assigns them to the django patterns object. """ redirects = Redirect.objects.filter(status=True).order_by('uses_regex') url_patterns = [] url_list = [] for redirect in redirects: extra = {} pattern = r'^%s/?$' % redirect.from_url if 'http' in redirect.to_url: extra.update({'url':'%s' % redirect.to_url}) elif 'https' in redirect.to_url: extra.update({'url':'%s' % redirect.to_url}) else: extra.update({'url':'/%s' % redirect.to_url}) if redirect.http_status == 302: extra.update({'permanent': False}) url_list.append(url(pattern, 'redirect_to', extra)) else: url_list.append(url(pattern, 'redirect_to', extra)) arg_groups = list(group_aruments(url_list)) for args in arg_groups: url_patterns += patterns('django.views.generic.simple',*args) return url_patterns
def override_urls(self): return [ url(r"^(?P<resource_name>%s)/(?P<project_slug>[a-z-]+)/highest/(?P<base>.+)/$" % self._meta.resource_name, self.wrap_view('version_compare'), name="version_compare"), url(r"^(?P<resource_name>%s)/(?P<project_slug>[a-z-]+)/highest/$" % self._meta.resource_name, self.wrap_view('version_compare'), name="version_compare"), url(r"^(?P<resource_name>%s)/(?P<project__slug>[a-z-_]+)/$" % self._meta.resource_name, self.wrap_view('dispatch_list'), name="api_version_list"), url(r"^(?P<resource_name>%s)/(?P<project_slug>[a-z-_]+)/(?P<version_slug>[a-z-]+)/build$" % self._meta.resource_name, self.wrap_view('build_version'), name="api_version_build_slug"), ]
def get_urls(self): urls = super(BaseModelAdmin, self).get_urls() my_urls = patterns('', url(r'^remove_dead_entries/$', self.admin_site.admin_view(self.remove_dead_entries)), url(r'^reset/$', self.admin_site.admin_view(self.reset)), ) return my_urls + urls
def get_urls(self): urlpatterns = patterns('', url(r'^$', self.index_view.as_view(), name='users-index'), url(r'^(?P<pk>[-\w]+)/$', self.user_detail_view.as_view(), name='user-detail'), ) return self.post_process_urls(urlpatterns)
def feed_patterns(self, base, get_items_attr, page_attr, reverse_name): """ Given the name to be used to reverse this view and the names of the attributes for the function that fetches the objects, returns patterns suitable for inclusion in urlpatterns. :param base: The base of the returned patterns - that is, the subpath pattern which will reference the page for the items. The :attr:`feed_suffix` will be appended to this subpath. :param get_items_attr: A callable or the name of a callable on the :class:`FeedView` which will return an (``items``, ``extra_context``) tuple. This will be passed directly to :meth:`feed_view` and :meth:`page_view`. :param page_attr: A :class:`.Page` instance or the name of an attribute on the :class:`FeedView` which contains a :class:`.Page` instance. This will be passed directly to :meth:`page_view` and will be rendered with the items from ``get_items_attr``. :param reverse_name: The string which is considered the "name" of the view function returned by :meth:`page_view` for the given parameters. :returns: Patterns suitable for use in urlpatterns. Example:: @property def urlpatterns(self): urlpatterns = self.feed_patterns(r'^', 'get_all_entries', 'index_page', 'index') urlpatterns += self.feed_patterns(r'^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})', 'get_entries_by_ymd', 'entry_archive_page', 'entries_by_day') return urlpatterns """ urlpatterns = patterns('') if self.feeds_enabled: feed_reverse_name = "%s_feed" % reverse_name feed_view = http_not_acceptable(self.feed_view(get_items_attr, feed_reverse_name)) feed_pattern = r'%s%s%s$' % (base, (base and base[-1] != "^") and "/" or "", self.feed_suffix) urlpatterns += patterns('', url(feed_pattern, feed_view, name=feed_reverse_name), ) urlpatterns += patterns('', url(r"%s$" % base, self.page_view(get_items_attr, page_attr), name=reverse_name) ) return urlpatterns
def override_urls(self): return [ url(r"^(?P<resource_name>%s)/schema/$" % self._meta.resource_name, self.wrap_view('get_schema'), name="api_get_schema"), url((r"^(?P<resource_name>%s)/(?P<project_slug>[a-z-_]+)/highest/" r"(?P<base>.+)/$") % self._meta.resource_name, self.wrap_view('version_compare'), name="version_compare"), url(r"^(?P<resource_name>%s)/(?P<project_slug>[a-z-_]+)/highest/$" % self._meta.resource_name, self.wrap_view('version_compare'), name="version_compare"), url(r"^(?P<resource_name>%s)/(?P<project__slug>[a-z-_]+[a-z0-9-_]+)/$" # noqa % self._meta.resource_name, self.wrap_view('dispatch_list'), name="api_version_list"), url((r"^(?P<resource_name>%s)/(?P<project_slug>[a-z-_]+)/(?P" r"<version_slug>[a-z0-9-_.]+)/build/$") % self._meta.resource_name, self.wrap_view('build_version'), name="api_version_build_slug"), ]
def override_urls(self): return [ url( r"^(?P<resource_name>%s)/(?P<mac_address>(?:[0-9a-fA-F]{2}[:-]){5}(?:[0-9a-fA-F]){2})/$" % self._meta.resource_name, self.wrap_view("dispatch_detail"), name="api_dispatch_detail_device", ), url( r"^(?P<resource_name>%s)/(?P<mac_address>(?:[0-9a-fA-F]{2}[:-]){5}(?:[0-9a-fA-F]){2})/%s/$" % (self._meta.resource_name, InterfaceResource._meta.resource_name), self.wrap_view("dispatch_list_device_interface"), name="api_dispatch_list_device_interface", ), url( r"^(?P<resource_name>%s)/(?P<mac_address>(?:[0-9a-fA-F]{2}[:-]){5}(?:[0-9a-fA-F]){2})/(?P<interface_resource_name>%s)/(?P<interface_name>[\w]+)/$" % (self._meta.resource_name, InterfaceResource._meta.resource_name), self.wrap_view("dispatch_detail_device_interface"), name="api_dispatch_detail_device_interface", ), url( r"^(?P<resource_name>%s)/(?P<mac_address>(?:[0-9a-fA-F]{2}[:-]){5}(?:[0-9a-fA-F]){2})/(?P<interface_resource_name>%s)/(?P<interface_name>[\w]+)/method/$" % (self._meta.resource_name, InterfaceResource._meta.resource_name), self.wrap_view("dispatch_list_device_interface_method"), name="api_dispatch_list_device_interface_method", ), url( r"^(?P<resource_name>%s)/(?P<mac_address>(?:[0-9a-fA-F]{2}[:-]){5}(?:[0-9a-fA-F]){2})/(?P<interface_resource_name>%s)/(?P<interface_name>[\w]+)/method/(?P<method_name>[\w]+)/$" % (self._meta.resource_name, InterfaceResource._meta.resource_name), self.wrap_view("dispatch_detail_device_interface_method"), name="api_dispatch_detail_device_interface_method", ), ]
def get_urls(self): def wrap(view, cacheable=False): def wrapper(*args, **kwargs): return self.as_view(view, cacheable)(*args, **kwargs) return update_wrapper(wrapper, view) init = self.get_view_kwargs() # Admin-site-wide views. urlpatterns = self.get_extra_urls() urlpatterns += patterns('', url(r'^$', wrap(self.index.as_view(**init)), name=self.app_name+'_changelist'), url(r'^add/$', wrap(self.create.as_view(**init)), name=self.app_name+'_add'), ) for key, view in self.get_detail_views().iteritems(): url_p = r'^(?P<pk>.+)/%s/$' % key if hasattr(view, 'get_url_pattern'): url_p = view.get_url_pattern(self) urlpatterns += patterns('', url(url_p, wrap(view.as_view(**init)), name='%s_%s' % (self.app_name, key)), ) urlpatterns += patterns('', #we shouldn't put anything after this url url(r'^(?P<pk>.+)/$', wrap(self.update.as_view(**init)), name=self.app_name+'_change'), ) return urlpatterns
from django.conf.urls.defaults import patterns, include, url from django.views.generic import TemplateView from kendoui_backend.views import KendoListProviderView from app.models import ExampleModel # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns( '', url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'), url(r'^example_model$', KendoListProviderView.as_view(model=ExampleModel), name='example_model'), # Examples: # url(r'^$', 'example.views.home', name='home'), # url(r'^example/', include('example.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls.defaults import patterns, url urlpatterns = patterns( 'twitter.views', url(r'^$', 'index', name='tweets'), url(r'^/request_oauth$', 'request_oauth', name='request_oauth'), url(r'^/oauth_callback$', 'oauth_callback', name='oauth_callback'), url(r'^/update$', 'update', name='update_tweet'), url(r'^/delete$', 'delete', name='delete_tweet'), )
from django.conf.urls.defaults import patterns, url urlpatterns = patterns( 'reviewboard.reviews.views', url(r'^$', 'all_review_requests', name="all-review-requests"), # Review request creation url(r'^new/$', 'new_review_request', name="new-review-request"), # Review request detail url(r'^(?P<review_request_id>[0-9]+)/$', 'review_detail', name="review-request-detail"), # Reviews (r'^(?P<review_request_id>[0-9]+)/reviews/draft/inline-form/$', 'review_draft_inline_form', { 'template_name': 'reviews/review_draft_inline_form.html' }), # Review request diffs url(r'^(?P<review_request_id>[0-9]+)/diff/$', 'diff', name="view_diff"), url(r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/$', 'diff', name="view_diff_revision"), url(r'^(?P<review_request_id>[0-9]+)/diff/raw/$', 'raw_diff', name='raw_diff'), (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/raw/$', 'raw_diff'), (r'^(?P<review_request_id>[0-9]+)/diff/(?P<revision>[0-9]+)/fragment/(?P<filediff_id>[0-9]+)/$',
#from django.conf.urls import patterns from Blog import views from . import Blog from Blog.views import * #from Blog.views import posts, search, searchform, i, searchh, MyView, BookListView, bloglist, item_edit, authorlist, entry, contact, contact2, contact3, searchblog #from Blog.models import Blog, Author, Entry #from Blog.views import posts #from django.conf.urls import patterns # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Examples: url(r'^$', 'openshift.views.home', name='home'), url(r'^index/', 'openshift.views.index', name='index'), url(r'^blog/index/', 'openshift.Blog.views.posts', name='posts'), url(r'^blog/authorlist/', 'openshift.Blog.views.authorlist', name='authorlist'), url(r'^blog/bloglist/', 'openshift.Blog.views.bloglist', name='bloglist'), url(r'^blog/searchform/', 'openshift.Blog.views.searchform', name='searchform'), url(r'^blog/posts/', 'openshift.Blog.views.posts', name='posts'), url(r'^blog/search/', 'openshift.Blog.views.search', name='search'), url(r'^blog/searchh/', 'openshift.Blog.views.searchh', name='searchh'), url(r'^blog/i/', 'openshift.Blog.views.i', name='i'), url(r'^blog/itemedit/', 'openshift.Blog.views.itemedit', name='itemedit'), url(r'^blog/entry/', 'openshift.Blog.views.entry', name='entry'),
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'src.views.home', name='home'), # url(r'^src/', include('src.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^$',include('core.twango.urls')), url(r'^grappelli/', include('grappelli.urls')), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), ) baseurlregex = r'^media/(?P<path>.*)$' if settings.SERVE_STATIC == True : urlpatterns = urlpatterns+patterns('', (baseurlregex, 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,'show_indexes': True}), ) urlpatterns = urlpatterns + patterns('',(url(r'^grid_designer/',include('src.apps.grid_designer.urls'))),) urlpatterns = urlpatterns + patterns('',(url(r'^twango_dashboard/',include('src.apps.twango_dashboard.urls'))),)
def get_urls(self): urlpatterns = patterns( '', url(r'^$', self.simple_view, name='pay-on-delivery'), ) return urlpatterns
# 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. from django.conf.urls.defaults import patterns, url IS_URL_NAMESPACED = True urlpatterns = patterns( 'oozie.views.editor', url(r'^list_workflows/$', 'list_workflows', name='list_workflows'), url(r'^list_trashed_workflows/$', 'list_trashed_workflows', name='list_trashed_workflows'), url(r'^create_workflow/$', 'create_workflow', name='create_workflow'), url(r'^edit_workflow/(?P<workflow>\d+)$', 'edit_workflow', name='edit_workflow'), url(r'^delete_workflow$', 'delete_workflow', name='delete_workflow'), url(r'^restore_workflow/$', 'restore_workflow', name='restore_workflow'), url(r'^clone_workflow/(?P<workflow>\d+)$', 'clone_workflow', name='clone_workflow'), url(r'^submit_workflow/(?P<workflow>\d+)$', 'submit_workflow', name='submit_workflow'), url(r'^schedule_workflow/(?P<workflow>\d+)$', 'schedule_workflow', name='schedule_workflow'), url(r'^import_workflow/$', 'import_workflow', name='import_workflow'), url(r'^import_coordinator/$', 'import_coordinator', name='import_coordinator'), url(r'^export_workflow/(?P<workflow>\d+)$', 'export_workflow', name='export_workflow'), url(r'^list_coordinators/(?P<workflow_id>[-\w]+)?$', 'list_coordinators', name='list_coordinators'), url(r'^list_trashed_coordinators/$', 'list_trashed_coordinators', name='list_trashed_coordinators'), url(r'^create_coordinator/(?P<workflow>[-\w]+)?$', 'create_coordinator', name='create_coordinator'),
# Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns( '', # Examples: # url(r'^$', 'proracun.views.home', name='home'), # url(r'^proracun/', include('proracun.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), url(r'^p/$', 'proracun.views.proracun_list'), # treemap url(r'^p/(?P<po>(:?prihodki|odhodki))/(?P<leto>\d{4})/(?P<date>\d{4}-\d\d-\d\d)/$', 'proracun.views.treemap', name='proracun_treemap'), url(r'^p/proracun_(?P<po>(:?prihodki|odhodki))_(?P<leto>\d{4})_(?P<date>\d{4}-\d\d-\d\d)\.js$', 'proracun.views.treemap_js', name='proracun_treemap_js'), # areachart url(r'^stuff/20letSlovenije/proracun_area_(?P<po>(:?prihodki|odhodki))_(?:(?P<language>(?:sl|en))_)?(?P<sifra>\d+)_(?P<inflacija>...)\.js$', 'proracun.views.areachart_js', name='proracun_areachart_js'), url(r'^stuff/20letSlovenije/(?:(?P<language>en)/)?(?P<po>(:?prihodki|odhodki))/(?P<inflacija>...)/$', 'proracun.views.areachart', name='proracun_areachart'), )
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', # Examples: url(r'^sample/', include('sample.urls', namespace="sample")), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^gettask/assignment/(?P<assignment_id>.+)$', 'retainer.gettask.get_task'), url( r'^ping/worker/(?P<worker_id>.+)/assignment/(?P<assignment_id>.+)/hit/(?P<hit_id>.+)/event/(?P<ping_type>.+)$', 'retainer.ping.ping'), url(r'^puttask$', 'retainer.puttask.put_task'), url(r'^putwork$', 'retainer.putwork.put_work'), url(r'^putwork/done$', 'retainer.putwork.finish_work'), # Examples: # url(r'^$', 'retainer.views.home', name='home'), # url(r'^retainer/', include('retainer.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
#!/usr/bin/python # -*- coding: utf-8 -*- # django-pyvows extensions # https://github.com/rafaelcaricio/django-pyvows # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 Rafael Caricio [email protected] from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'sandbox.main.views.home', name='home'), url(r'^say/$', 'sandbox.main.views.say_hello', name='say_hello'), url(r'^post_it/$', 'sandbox.main.views.post_it', name='post_it'), url(r'^post_file/$', 'sandbox.main.views.post_file', name='post_file'), # url(r'^sandbox/', include('sandbox.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: #url(r'^admin/', include('admin.site.urls')), )
from django.conf.urls.defaults import patterns, url, include from tastypie.api import Api from api import * from .views import * v1 = Api(api_name='v1') v1.register(ProfileResource()) # v1.register(EntryResource()) urlpatterns = patterns( '', url(r'^duo/signup/', Signup.as_view(), name='signup'), # url(r'^(?P<pk>\d+)/$', # DetailView.as_view(), # name="detail"), # url(r'^api/', include(v1.urls)), url(r'^duo/api/', include(v1.urls)), )
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'mozillacards.views.home', name='home'), url(r'^', include('mozillacards.cardmanager.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), )
class MockResource(ModelResource): """This is a mock model-based resource""" class MockResourceModel(models.Model): foo = models.BooleanField() bar = models.IntegerField(help_text='Must be an integer.') baz = models.CharField(max_length=32, help_text='Free text. Max length 32 chars.') model = MockResourceModel fields = ('foo', 'bar', 'baz') urlpatterns = patterns( 'djangorestframework.utils.staticviews', url(r'^accounts/login$', 'api_login'), url(r'^accounts/logout$', 'api_logout'), url(r'^mock/$', MockView.as_view()), url(r'^mock/final/$', MockViewFinal.as_view()), url(r'^resourcemock/$', ResourceMockView.as_view()), url(r'^model/$', ListOrCreateModelView.as_view(resource=MockResource)), url(r'^model/(?P<pk>[^/]+)/$', InstanceModelView.as_view(resource=MockResource)), ) class BaseViewTests(TestCase): """Test the base view class of djangorestframework""" urls = 'djangorestframework.tests.views' def test_view_call_final(self):
# GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """Defaults urls for the Gstudio project""" from django.conf.urls.defaults import url from django.conf.urls.defaults import include from django.conf.urls.defaults import patterns from django.conf.urls.defaults import * from registration.views import register from gstudio.forms import RecaptchaRegistrationForm urlpatterns = patterns( '', url(r'^templatetags/getsrc_addreln', 'gstudio.views.ajaxviews.getobjs'), url(r'^tags/', include('gstudio.urls.tags', )), url(r'^feeds/', include('gstudio.urls.feeds')), url(r'^authors/', include('gstudio.urls.authors')), url(r'^metatypes/', include('gstudio.urls.metatypes')), url(r'^search/', include('gstudio.urls.search')), url(r'^sitemap/', include('gstudio.urls.sitemap')), url(r'^trackback/', include('gstudio.urls.trackback')), url(r'^discussions/', include('gstudio.urls.discussions')), url(r'^add/', include('gstudio.urls.add')), url(r'^ajax/', include('gstudio.urls.ajaxurls')), url(r'^display/', include('gstudio.urls.history')), url(r'^graphs/', include('gstudio.urls.graphs')), url(r'^userdashboard/', include('gstudio.urls.dashboard')), url(r'^', include('gstudio.urls.quick_nodetype')), url(r'^', include('gstudio.urls.capabilities')),
# -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url from module.manage.ajax import get_title_list, get_subcategory_list, get_volume_list, get_writer_list, get_publisher_list urlpatterns = patterns( 'module.manage.views', url(r'^$', 'index', name='manage_index'), url(r'^index/(?P<set_type>\w+)/$', 'index', name='manage_index'), url(r'^regist/(?P<set_type>\w+)/$', 'regist', name='manage_regist'), url(r'^edit/(?P<set_type>\w+)/(?P<edit_id>\d+)/$', 'edit', name='manage_edit'), url(r'^delete/(?P<set_type>\w+)/(?P<del_id>\d+)/$', 'delete', name='manage_delete'), url(r'^delete_checked/(?P<set_type>\w+)/$', 'delete_checked', name='manage_delete_checked'), url(r'^search/(?P<set_type>\w+)/$', 'search', name='manage_search'), url(r'^status/$', 'status', name='manage_status'), url(r'^upload/$', 'upload', name='manage_upload'), url(r'^ajax/book_title/$', get_title_list, name='manage_get_title_list'), url(r'^ajax/book_subcategory/$', get_subcategory_list, name='manage_get_subcategory_list'), url(r'^ajax/book_volume/$', get_volume_list, name='manage_get_volume_list'), url(r'^ajax/book_writer/$', get_writer_list, name='manage_get_writer_list'), url(r'^ajax/book_publisher/$',
from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns( '', # Examples: url(r'^$', 'intranet.views.main'), url(r'^group/', include('intranet.group_manager.urls')), url(r'^members/', include('intranet.member_database.urls')), url(r'^event/', include('intranet.event_manager.urls')), url(r'^jobs/', include('intranet.job_manager.urls')), url(r'^chroma/', include('intranet.chroma.urls')), url(r'^resume/', include('intranet.resume_manager.urls')), url(r'^jobfair_manager/', include('intranet.jobfair_manager.urls')), url(r'^caffeine/', include('intranet.caffeine_manager.urls')), url(r'^quote/', include('intranet.quote.urls')))
from django.conf.urls.defaults import include, patterns, url from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'', include('shortener.urls')), url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), )
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns( 'home_page.views', url(r'^$', 'index'), # Examples: # url(r'^$', 'leeHouseSite.views.home', name='home'), # url(r'^leeHouseSite/', include('leeHouseSite.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), )
# # ebpub is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with ebpub. If not, see <http://www.gnu.org/licenses/>. # from django.conf.urls.defaults import patterns, url from ebpub.neighbornews import views urlpatterns = patterns( '', url(r'^message/new/$', views.new_message, name="new_message"), url(r'^message/(?P<newsitem>.+)/edit/$', views.edit_message, name="edit_message"), url(r'^message/(?P<newsitem>.+)/delete/$', views.delete_message, name="delete_message"), url(r'^event/new/$', views.new_event, name="new_event"), url(r'^event/(?P<newsitem>.+)/edit/$', views.edit_event, name="edit_event"), url(r'^event/(?P<newsitem>.+)/delete/$', views.delete_event, name="delete_event"), url(r'^by_user/(?P<userid>.+)/$', views.news_by_user, name="neighbornews_by_user"),
from django.conf.urls.defaults import url from addons.urls import ADDON_ID from . import views # All URLs under /editors/ urlpatterns = ( url(r'^$', views.home, name='editors.home'), url(r'^queue$', views.queue, name='editors.queue'), url(r'^queue/nominated$', views.queue_nominated, name='editors.queue_nominated'), url(r'^queue/pending$', views.queue_pending, name='editors.queue_pending'), url(r'^queue/preliminary$', views.queue_prelim, name='editors.queue_prelim'), url(r'^queue/fast$', views.queue_fast_track, name='editors.queue_fast_track'), url(r'^queue/reviews$', views.queue_moderated, name='editors.queue_moderated'), url(r'^queue/apps$', views.queue_apps, name='editors.queue_apps'), url(r'^queue/application_versions\.json$', views.application_versions_json, name='editors.application_versions_json'), url(r'^logs$', views.eventlog, name='editors.eventlog'), url(r'^log/(\d+)$', views.eventlog_detail, name='editors.eventlog.detail'), url(r'^reviewlog$', views.reviewlog, name='editors.reviewlog'), url(r'^queue_version_notes/%s?$' % ADDON_ID, views.queue_version_notes,
from django.conf.urls.defaults import patterns, url from . import views group_re = '(?P<group>' + '|'.join(views.SERIES_GROUPS) + ')' range_re = '(?P<start>\d{8})-(?P<end>\d{8})' format_re = '(?P<format>' + '|'.join(views.SERIES_FORMATS) + ')' series = dict((type, '^%s-%s-%s\.%s$' % (type, group_re, range_re, format_re)) for type in views.SERIES) urlpatterns = patterns( '', # page URLs url('^$', views.stats_report, name='stats.overview', kwargs={'report': 'overview'}), url('^downloads/$', views.stats_report, name='stats.downloads', kwargs={'report': 'downloads'}), url('^downloads/sources/$', views.stats_report, name='stats.downloads', kwargs={'report': 'sources'}), url('^usage/$', views.stats_report, name='stats.usage', kwargs={'report': 'usage'}), url('^usage/languages/$', views.stats_report,
from django.conf.urls.defaults import patterns, include, url from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: url('', include('lit.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: # url(r'^admin/', include(admin.site.urls)), )
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from django.contrib.auth.views import login, logout from django.views.generic import TemplateView # Uncomment the next two lines to enable the admin: admin.autodiscover() urlpatterns = patterns( '', url(r'^$', TemplateView.as_view(template_name="index.html")), url(r'^about$', TemplateView.as_view(template_name="about.html")), url(r'^logout$', logout, name="logout"), url(r'^login$', login, name="login"), url(r'^accounts/', include('accounts.urls')), url(r'^writing/', include('writing.urls')), url(r'^reading/', include('reading.urls')), url(r'^pointing/', include('pointing.urls')), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), )
if django.VERSION[:2] < (1, 4): from django.conf.urls.defaults import include, patterns, url else: if django.VERSION[:2] < (1, 8): from django.conf.urls import include, patterns, url else: from django.conf.urls import include, url try: import django_comments.urls as django_comments_urls except ImportError: import django.contrib.comments.urls as django_comments_urls pattern_list = [ url(r'', include(django_comments_urls)), url(r'^sent/$', views.sent, name='comments-xtd-sent'), url(r'^confirm/(?P<key>[^/]+)$', views.confirm, name='comments-xtd-confirm'), url(r'^mute/(?P<key>[^/]+)$', views.mute, name='comments-xtd-mute'), # New flags in addition to those provided by django-contrib-comments. url(r'^like/(\d+)/$', views.like, name='comments-xtd-like'), url(r'^liked/$', views.like_done, name='comments-xtd-like-done'), url(r'^dislike/(\d+)/$', views.dislike, name='comments-xtd-dislike'), url(r'^disliked/$', views.dislike_done, name='comments-xtd-dislike-done'), ] urlpatterns = None
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'main.views.home', name='home'), url(r'^familia/(?P<id>\d+)/$', 'main.views.familia', name='familia'), url(r'^get_detalle_familia/(?P<id>\d+)/$', 'main.views.get_detalle_familia', name='get_detalle_familia'), url(r'^get_condiciones_familia/(?P<id>\d+)/(?P<anio>\d+)/$', 'main.views.get_condiciones_familia', name='get_condiciones_familia'), url(r'^familia/(?P<id>\d+)/del/$', 'main.views.eliminar_familia', name='eliminar_familia'), url(r'^ficha/(?P<id>\d+)/(?P<anio>\d+)/$', 'main.views.ficha', name='ficha'), url(r'^ficha/(?P<id>\d+)/(?P<anio>\d+)/del/$', 'main.views.eliminar_ficha', name='eliminar_ficha'), url(r'^ficha/(?P<id>\d+)/(?P<anio>\d+)/cerrar/$', 'main.views.cerrar_ciclo', name='cerrar_ciclo'), url(r'^ficha/(?P<id_persona>\d+)/copiar/$', 'main.views.copiar_datos_anterior', name='copiar_datos_anterior'), url(r'^persona/del/(?P<id>\d+)/$', 'main.views.eliminar_persona', name='eliminar_persona'), url(r'^persona/update_aporta/$', 'main.views.update_aporta', name='update_aporta'), url(r'^get_persona_form/(?P<familia_id>\d+)/(?P<id>\d+)$', 'main.views.get_persona_form', name='get_persona_form'), url(r'^accounts/login/$', 'main.auth.login_view', name='login'), url(r'^accounts/logout/$', 'main.auth.logout_view', name='logout'), url(r'^accounts/changepasswd/$', 'django.contrib.auth.views.password_change', {'template_name': 'changepasswd.html'}, name='changepasswd'), url(r'^accounts/changepasswd/done/$', 'django.contrib.auth.views.password_change_done', {'template_name': 'changepasswd_done.html'}, name='changepasswd_done'), #reportes url(r'^reportes/$', 'main.reports_views.home', name='home_reports'), url(r'^reportes/(?P<anio>\d+)/$', 'main.reports_views.home', name='home_reports'), url(r'^reportes/(?P<anio>\d+)/cantidad_fichas/$', 'main.reports_views.home', name='home_reports'), url(r'^reportes/(?P<anio>\d+)/cantidad_fichas/(?P<tipo>\w+)/$', 'main.reports_views.cantidad_fichas', name='cantidad_fichas'), url(r'^reportes/(?P<anio>\d+)/tipos_familias/$', 'main.reports_views.tipos_familias', name='tipos_familias'), url(r'^reportes/(?P<anio>\d+)/estado_ciclos/$', 'main.reports_views.estado_ciclos', name='estado_ciclos'),
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # OF THE POSSIBILITY OF SUCH DAMAGE. # Copyright (c) 2011, 2012 Free Software Foundation # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """Urls for Objectapp forms""" from django.conf.urls.defaults import url from django.conf.urls.defaults import patterns urlpatterns = patterns( 'objectapp.views.add', url(r'^gbobject/$', 'addgbobject', name='objectapp_add_gbobject'), url(r'^process/$', 'addprocess', name='objectapp_add_gbobject'), url(r'^system/$', 'addsystem', name='objectapp_add_system'), )
from django.conf.urls.defaults import patterns, url urlpatterns = patterns( 'cyder.api.authtoken.views', url(r'request/', 'request_token', name='request-token'), url(r'revoke/(?P<pk>[\w\d-]+)?/$', 'revoke_token'), url(r'(?P<pk>[\w\d-]+)?/$', 'token_detail', name='authtoken_token-detail'), )
# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA from django.conf.urls.defaults import include, patterns, url from Arthur.views.exiles import exiles urlpatterns = patterns( 'Arthur.views.exiles', url(r'^exiles/$', 'exiles.exiles', name="exiles"), url(r'^exiles/(?P<page>\d+)/$', 'exiles.exiles', name="exilesp"), url(r'^exiles/through/(?P<x>\d+)[. :\-](?P<y>\d+)/$', 'exiles.galaxy', {'through': True}, name="galaxy_exiles"), url(r'^exiles/of/(?P<x>\d+)[. :\-](?P<y>\d+)/$', 'exiles.galaxy', {'through': False}), url(r'^exiles/of/(?P<x>\d+)[. :\-](?P<y>\d+)[. :\-](?P<z>\d+)/$', 'exiles.planet', {'through': False}, name="planet_exiles"), url(r'^exiles/through/(?P<x>\d+)[. :\-](?P<y>\d+)[. :\-](?P<z>\d+)/$', 'exiles.planet', {'through': True}), )
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """Urls for the Gstudio sitemap""" from django.conf.urls.defaults import url from django.conf.urls.defaults import patterns urlpatterns = patterns('gstudio.views.ajaxviews', url(r'^ajaxattribute/$', 'AjaxAttribute',name='ajax_views'), url(r'^relation/add/ajaxleft/$', 'AjaxRelationleft',name='ajax_relnleft_views'), url(r'^relation/add/ajaxright/$', 'AjaxRelationright',name='ajax_relnright_views'), url(r'^relation/ajaxleft/$', 'AjaxRelationleft',name='ajax_relnleft_views'), url(r'^relation/ajaxright/$', 'AjaxRelationright',name='ajax_relnright_views'), url(r'^contentorgadd/$', 'AjaxAddContentOrg', name='ajax_views_contentorgadd'), url(r'^ajaxcreatehtml/$', 'AjaxCreateHtml', name='ajax_views_createhtml'), url(r'^ajaxcreatefile/$', 'AjaxCreateFile', name='ajax_views_createfile'), url(r'^contentadd/$', 'AjaxAddContent', name='ajax_views_contentadd'), url(r'^draweradd/$', 'AjaxAddDrawer', name='ajax_views_draweradd'), url(r'^htmlexport/$', 'HtmlExport', name='ajax_view_htmlexport'), url(r'^collectionadd/$', 'AjaxAddCollection', name='ajax_view_collectionadd'), url(r'^iswiki/$', 'IsWiki', name='ajax_view_iswiki'), url(r'^deletepriorpage/$', 'ajaxDeletePriorpage', name='ajax_delete_priorpage'), url(r'^addresponsestotwist/$', 'ajaxAddResponsesToTwist', name='ajax_addresponsestotwist'), url(r'^userListForInvitation/$', 'ajaxuserListForInvitation', name='ajax_userListForInvitation'),