On Sunday, February 24, 2019 at 11:25:13 AM UTC+11, Scot Hacker wrote:
>
> Django Admin is customizable to an extent, but at a certain point those 
> customizations can cost you more time than they save, and it makes more 
> sense to build your business logic in a standard app/view. Without digging 
> into your code, my spidey sense tells me your app is at that point - stop 
> trying to do it in the admin and you'll have all the control you need or 
> want.
>
> ./s
>
> Scot

I agree. How do I do that? 

The entire system is in the Admin except for some trivial search and 
non-is_staff stuff. If I was to redo it without the Admin I would have to 
reinvent that entire wheel.

Specifically, how do I call an external view from within the admin? I only 
want to call that view if the model instance attributes demand it. That 
means it cannot be an optional/clickable link. It must be automatic.

Currently the admin url is (e.g.) 
http://localhost:8000/admin/substance/substance/1450/change/ while the 
substance is being edited. That url doesn't change while adding an 
ingredient. If the ingredient hasn't been paid for by *that* user the 
payment screen has to pop up. Currently it does this via 
modelAdmin.change_view() calling billing_payment_view()

That url doesn't change until after a successful payment when 
billing_payment_view() calls billing_success_view() directly. At that point 
the url becomes 
http://localhost:8000/admin/substance/substance/1450/change/payment 
(without a trailing slash). Thereafter valid admin urls fail to show any 
content..

If I make settings APPEND_SLASH False, it says 404.

Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e019f0a5-04be-4106-a2fd-594c9f3d5b0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to