Creating internal/admin pages without Models

81 views
Skip to first unread message

Vasanth Mohan

unread,
Oct 25, 2022, 5:22:11 AM10/25/22
to Django developers (Contributions to Django itself)
Hello,

I'd like to gauge the general opinion of more experienced devs before starting on a project.

I personally love the sheer flexibility that the django admin provides me to get started on the DB and manage the backend. I can add actions, filters and charts with just a few third-party apps. On top of that, permissions to control user access to everything.

However, I find myself having to build a separate set of templates and view for internal use often as the admin is tightly tied to the DB. I find myself not being able to expose the admin as it requires too much customisation to be useful to tech & non-tech teams at the same time. Moreover, DB structure is not as intuitive to non-tech users.

So I'd like to build a generic admin view that is not tied to the DB but can still leverage the widgets (tables, inputs, messages etc.) that Django offers. A set of tools to design custom pages like django-etc and design easy-to-customise top/sidebars

My question to the reader is quite simple, is this something feasible ? Are all widgets tightly coupled and expect models to function ? Anything you believe that might trip me up?

Thanks,
Vaz

Igor Margitich

unread,
Oct 25, 2022, 8:10:05 AM10/25/22
to django-d...@googlegroups.com
Hi Vasanth,

Can you ptovide an example when do you need generic admin view? I have case where I need gather some information from different not directly related tables. I have used https://pypi.org/project/django-nonrelated-inlines/. Can't say it is exactly what I need but seems it does the job.
Also sometimes I need action's intermediate page which is more then just simple template. This is the case where would be nice to have CBV. Watch this presentation to get some ideas about CBV actions https://youtu.be/HJfPkbzcCJQ?t=1817.

Best regards,
Ihor

вт, 25 окт. 2022 г. в 11:22, Vasanth Mohan <vasant...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d6146414-c423-4f2a-b482-5eccb971f16cn%40googlegroups.com.

Vasanth Mohan

unread,
Oct 25, 2022, 12:16:57 PM10/25/22
to django-d...@googlegroups.com
Hi Igor,

Most of my cases are for internal tools and grouping together unrelated tables as you just summarised. Some examples are,

- Writing text that can need to send out to clients by triggering a predefined email templates
- Creating internal forms that should be saved to multiple tables or throw an error
- Custom templates for showing unrelated & unrelated data

While these can be done normally with templates, the key difference is these are internal pages and do not need to be super stylised. Performance is far more important than the UI. A minimal stylisation would be good enough is most cases.

Being able to leverage admin widgets would improve task turnaround time and reduce frontend work to only client-facing logic.


Vasanth MOHAN


You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/yFJz4GPTJPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAHi_fyv7QrWwpNOdyv8ZvOg%2B84mzTLKvrc-iYHjee8SQ6gPd%2Bg%40mail.gmail.com.

Carlton Gibson

unread,
Oct 25, 2022, 3:40:29 PM10/25/22
to django-d...@googlegroups.com
Check out Django-admin-views 


I think it needs a bit of an update for recent versions of Django (but I suspect those are minor) and o tho knit does what you’re after (or close)
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/yFJz4GPTJPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-developers+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAOAVv_NQpKDOsEEYoGe13DyKWkb9Hm-VidrcLv%2BKrwbVQ30v1A%40mail.gmail.com.

Vasanth Mohan

unread,
Oct 26, 2022, 4:16:15 AM10/26/22
to django-d...@googlegroups.com
Hi Carlton,

While django-admin-views indeed gives us the option to add custom views, it still is locked to the App/Model based organisation which reflects the DB. Moreover, it still necessitates that I build the page by hand.

I'm interested to know if it would be possible to reuse the admin widgets like ListView Table with its filters, search etc on a custom view.

Thanks,
Vasanth MOHAN


To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/yFJz4GPTJPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/yFJz4GPTJPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJwKpyRA%3DfzXBVnvUp%2BiTtrHZSeOzQPQBAE84QoERbXWFCOTqg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages