New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

django-urls

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-urls

URL decorator for django views

  • 1.1.4
  • PyPI
  • Socket score

Maintainers
1

Build Status PyPI - License PyPI - Downloads

What is django_urls?

It is flask style urls for django.

How to use it?

# app/urls.py or where-ever you want really.
from django_urls import UrlManager
app_urls = UrlManager(views_root='dotted.path.to.app.views.module')

app_urls.extend(extra_urls_list)
# app/views/foo.py

from app.urls import app_urls

@app_urls.path('path/', name='MyView', importance=5) # the bigger the importance higher in the list it goes
class MyView(View):
    ...
    
@app_urls.re_path('path2/', name='my_view', importance=1)
def my_view(request):
    ...    
# project/urls.py
from django.urls import include, path
from app.urls import app_urls

url_patterns = [
    path('some_path/', include(app_urls.url_patterns))
]

That's it, not too much setup, right?

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc