jsocol / jsocol/django-adminplus

Can't hit url pattern of custom view

Open
#32 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
602
Forks
76
PR merge metrics
No merged PRs in 30d

Description

I'm using the latest django 1.8 My urls.py looks this:

from django.contrib import admin
from adminplus.sites import AdminSitePlus
from django.conf.urls import include, url

admin.site = AdminSitePlus()
admin.autodiscover()

urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^chaining/', include('smart_selects.urls')),
]

My view looks like this:

def my_view(request, _args, *_kwargs):
pass
admin.site.register_view('somepath', view=my_view)

When i go to

mysite.com/admin/somepath I get a 404. Do you know what I'm doing wrong?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the urls.py configuration and the my_view/admin.site.register_view entry point shown in the report, then reproduce the 404 at /admin/somepath. Trace how the custom view is added to the admin URL routing and confirm that the path resolves to the view instead of returning 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.