New Feature discussion: making admin app & model url configurable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

New Feature discussion: making admin app & model url configurable

Ramez Ashraf
Hello guys, 

I use the admin quite extensively in my work with Django, and it's awesome.
One place that can use some polish is the urls.
As you know, the admin urls evolve around are the <app_label> /  <model_name> , and those two can get technical, long and in short not user friendly.
Hence, I propose a new feature of making those urls configurable

First of all, what do you think ? Would you benefit from this new feature? and mainly i'm asking devs with extensive use of the admin.

Now for the technical part:
The idea was initially is to state those configuration around the AppConfig (for the app part of the url) and in the model meta (for the model part)
I got a review from Tim, that he don't like the idea of the meta, and i can kinda agree with his point, and so, where do you suggest stating this configuration?

Another idea that cross my mind now, is to state those configuration in the `settings.py`, something like this 

ADMIN_URLS = {
    'apps': {
        'celery_queue_tools': 'cool-app-name'
    }, 
    'models': {
       'mylongmodelname': 'user-friendly'
    }
}

This is just another idea of where to write the url customization configuration, all is up for discussion.

Thank you all and awaiting your feedback.




--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/712bbe7e-91ed-4f63-89c6-f572e2cdfc48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: New Feature discussion: making admin app & model url configurable

knyght
Personally, I'm not sure I see that much value. As I see it, the admin is intended for technical users, not as a general admin interface for end users (in this context I'm mostly talking about non-programmers). While it can and I sometimes do allow end-users to use the admin directly, I really feel like it's not the intended use.

I'm also not really sure what modifying the URLs would achieve, since users aren't likely to be typing them in directly, anyway.

Tom

On Friday, June 29, 2018 at 10:49:26 AM UTC+1, Ramez Ashraf wrote:
Hello guys, 

I use the admin quite extensively in my work with Django, and it's awesome.
One place that can use some polish is the urls.
As you know, the admin urls evolve around are the <app_label> /  <model_name> , and those two can get technical, long and in short not user friendly.
Hence, I propose a new feature of making those urls configurable

First of all, what do you think ? Would you benefit from this new feature? and mainly i'm asking devs with extensive use of the admin.

Now for the technical part:
The idea was initially is to state those configuration around the AppConfig (for the app part of the url) and in the model meta (for the model part)
I got a review from Tim, that he don't like the idea of the meta, and i can kinda agree with his point, and so, where do you suggest stating this configuration?

Another idea that cross my mind now, is to state those configuration in the `settings.py`, something like this 

ADMIN_URLS = {
    'apps': {
        'celery_queue_tools': 'cool-app-name'
    }, 
    'models': {
       'mylongmodelname': 'user-friendly'
    }
}

This is just another idea of where to write the url customization configuration, all is up for discussion.

Thank you all and awaiting your feedback.




--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d6c3b94e-3bcd-49b5-b1b5-1c93c381ec11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: New Feature discussion: making admin app & model url configurable

Collin Anderson-2
Maybe we could make an AdminSite.get_urls_for_model(self, model, model_admin)


On Fri, Jun 29, 2018 at 8:57 AM <[hidden email]> wrote:
Personally, I'm not sure I see that much value. As I see it, the admin is intended for technical users, not as a general admin interface for end users (in this context I'm mostly talking about non-programmers). While it can and I sometimes do allow end-users to use the admin directly, I really feel like it's not the intended use.

I'm also not really sure what modifying the URLs would achieve, since users aren't likely to be typing them in directly, anyway.

Tom

On Friday, June 29, 2018 at 10:49:26 AM UTC+1, Ramez Ashraf wrote:
Hello guys, 

I use the admin quite extensively in my work with Django, and it's awesome.
One place that can use some polish is the urls.
As you know, the admin urls evolve around are the <app_label> /  <model_name> , and those two can get technical, long and in short not user friendly.
Hence, I propose a new feature of making those urls configurable

First of all, what do you think ? Would you benefit from this new feature? and mainly i'm asking devs with extensive use of the admin.

Now for the technical part:
The idea was initially is to state those configuration around the AppConfig (for the app part of the url) and in the model meta (for the model part)
I got a review from Tim, that he don't like the idea of the meta, and i can kinda agree with his point, and so, where do you suggest stating this configuration?

Another idea that cross my mind now, is to state those configuration in the `settings.py`, something like this 

ADMIN_URLS = {
    'apps': {
        'celery_queue_tools': 'cool-app-name'
    }, 
    'models': {
       'mylongmodelname': 'user-friendly'
    }
}

This is just another idea of where to write the url customization configuration, all is up for discussion.

Thank you all and awaiting your feedback.




--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d6c3b94e-3bcd-49b5-b1b5-1c93c381ec11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5WV7K_A1ZWqAVcXc85%3D5UZtHp_txm_rVmuvMDitNDwmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: New Feature discussion: making admin app & model url configurable

Ramez Ashraf
Sure that's a great idea Colin !

I'm little greedy, I wanted to make it little easier, ie without needing to subclass the AdminSite... But that's absolutely great implementation too!

On Fri, Jun 29, 2018, 4:07 PM Collin Anderson <[hidden email]> wrote:
Maybe we could make an AdminSite.get_urls_for_model(self, model, model_admin)


On Fri, Jun 29, 2018 at 8:57 AM <[hidden email]> wrote:
Personally, I'm not sure I see that much value. As I see it, the admin is intended for technical users, not as a general admin interface for end users (in this context I'm mostly talking about non-programmers). While it can and I sometimes do allow end-users to use the admin directly, I really feel like it's not the intended use.

I'm also not really sure what modifying the URLs would achieve, since users aren't likely to be typing them in directly, anyway.

Tom

On Friday, June 29, 2018 at 10:49:26 AM UTC+1, Ramez Ashraf wrote:
Hello guys, 

I use the admin quite extensively in my work with Django, and it's awesome.
One place that can use some polish is the urls.
As you know, the admin urls evolve around are the <app_label> /  <model_name> , and those two can get technical, long and in short not user friendly.
Hence, I propose a new feature of making those urls configurable

First of all, what do you think ? Would you benefit from this new feature? and mainly i'm asking devs with extensive use of the admin.

Now for the technical part:
The idea was initially is to state those configuration around the AppConfig (for the app part of the url) and in the model meta (for the model part)
I got a review from Tim, that he don't like the idea of the meta, and i can kinda agree with his point, and so, where do you suggest stating this configuration?

Another idea that cross my mind now, is to state those configuration in the `settings.py`, something like this 

ADMIN_URLS = {
    'apps': {
        'celery_queue_tools': 'cool-app-name'
    }, 
    'models': {
       'mylongmodelname': 'user-friendly'
    }
}

This is just another idea of where to write the url customization configuration, all is up for discussion.

Thank you all and awaiting your feedback.




--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d6c3b94e-3bcd-49b5-b1b5-1c93c381ec11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/H8y6_HOKU2o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5WV7K_A1ZWqAVcXc85%3D5UZtHp_txm_rVmuvMDitNDwmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAPtjUtiE3kTb7HYO9h3o2NYrHot0PpYDT9HBL3g25sccbDniFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: New Feature discussion: making admin app & model url configurable

Ramez Ashraf
Another comment, if i may, about the implementation after some thoughts

1- it does not customize the app_index url 
2- as a consequence, the "uniformity" the admin urls may be broken
So maybe there is a way, that this method `get_urls_for_model` get changed to include both the app_index, and the models customization ?

Finally, taking the app_index url into account,it would suggest that this method lives on the AdminSite (not in the ModelAdmin)

Thank you so much for your appreciated cooperation Collin



On Fri, Jun 29, 2018 at 4:23 PM Ramez Ashraf <[hidden email]> wrote:
Sure that's a great idea Colin !

I'm little greedy, I wanted to make it little easier, ie without needing to subclass the AdminSite... But that's absolutely great implementation too!

On Fri, Jun 29, 2018, 4:07 PM Collin Anderson <[hidden email]> wrote:
Maybe we could make an AdminSite.get_urls_for_model(self, model, model_admin)


On Fri, Jun 29, 2018 at 8:57 AM <[hidden email]> wrote:
Personally, I'm not sure I see that much value. As I see it, the admin is intended for technical users, not as a general admin interface for end users (in this context I'm mostly talking about non-programmers). While it can and I sometimes do allow end-users to use the admin directly, I really feel like it's not the intended use.

I'm also not really sure what modifying the URLs would achieve, since users aren't likely to be typing them in directly, anyway.

Tom

On Friday, June 29, 2018 at 10:49:26 AM UTC+1, Ramez Ashraf wrote:
Hello guys, 

I use the admin quite extensively in my work with Django, and it's awesome.
One place that can use some polish is the urls.
As you know, the admin urls evolve around are the <app_label> /  <model_name> , and those two can get technical, long and in short not user friendly.
Hence, I propose a new feature of making those urls configurable

First of all, what do you think ? Would you benefit from this new feature? and mainly i'm asking devs with extensive use of the admin.

Now for the technical part:
The idea was initially is to state those configuration around the AppConfig (for the app part of the url) and in the model meta (for the model part)
I got a review from Tim, that he don't like the idea of the meta, and i can kinda agree with his point, and so, where do you suggest stating this configuration?

Another idea that cross my mind now, is to state those configuration in the `settings.py`, something like this 

ADMIN_URLS = {
    'apps': {
        'celery_queue_tools': 'cool-app-name'
    }, 
    'models': {
       'mylongmodelname': 'user-friendly'
    }
}

This is just another idea of where to write the url customization configuration, all is up for discussion.

Thank you all and awaiting your feedback.




--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d6c3b94e-3bcd-49b5-b1b5-1c93c381ec11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/H8y6_HOKU2o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5WV7K_A1ZWqAVcXc85%3D5UZtHp_txm_rVmuvMDitNDwmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Ramez Ashraf
Co-Founder and lead developer Ra Systems

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAPtjUtjJ1inrCm1q5e9nEjVTEdqzEB3t%2BSY%2BwC4puM9JBTk2-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: New Feature discussion: making admin app & model url configurable

Ramez Ashraf
Taking it off from Collin's crucial suggestion
https://github.com/django/django/pull/10111

Implement it as an AdminSite method, Which, after some thoughts, i think it's fair that if one wants to customize the admin urls, then they should sub class the AdminSite, 
Also i believe for developers relying "heavily" on the admin (those who will actually use of this feature), they already did sub class AdminSite for one reason or the other.



On Fri, Jun 29, 2018 at 5:09 PM Ramez Ashraf <[hidden email]> wrote:
Another comment, if i may, about the implementation after some thoughts

1- it does not customize the app_index url 
2- as a consequence, the "uniformity" the admin urls may be broken
So maybe there is a way, that this method `get_urls_for_model` get changed to include both the app_index, and the models customization ?

Finally, taking the app_index url into account,it would suggest that this method lives on the AdminSite (not in the ModelAdmin)

Thank you so much for your appreciated cooperation Collin



On Fri, Jun 29, 2018 at 4:23 PM Ramez Ashraf <[hidden email]> wrote:
Sure that's a great idea Colin !

I'm little greedy, I wanted to make it little easier, ie without needing to subclass the AdminSite... But that's absolutely great implementation too!

On Fri, Jun 29, 2018, 4:07 PM Collin Anderson <[hidden email]> wrote:
Maybe we could make an AdminSite.get_urls_for_model(self, model, model_admin)


On Fri, Jun 29, 2018 at 8:57 AM <[hidden email]> wrote:
Personally, I'm not sure I see that much value. As I see it, the admin is intended for technical users, not as a general admin interface for end users (in this context I'm mostly talking about non-programmers). While it can and I sometimes do allow end-users to use the admin directly, I really feel like it's not the intended use.

I'm also not really sure what modifying the URLs would achieve, since users aren't likely to be typing them in directly, anyway.

Tom

On Friday, June 29, 2018 at 10:49:26 AM UTC+1, Ramez Ashraf wrote:
Hello guys, 

I use the admin quite extensively in my work with Django, and it's awesome.
One place that can use some polish is the urls.
As you know, the admin urls evolve around are the <app_label> /  <model_name> , and those two can get technical, long and in short not user friendly.
Hence, I propose a new feature of making those urls configurable

First of all, what do you think ? Would you benefit from this new feature? and mainly i'm asking devs with extensive use of the admin.

Now for the technical part:
The idea was initially is to state those configuration around the AppConfig (for the app part of the url) and in the model meta (for the model part)
I got a review from Tim, that he don't like the idea of the meta, and i can kinda agree with his point, and so, where do you suggest stating this configuration?

Another idea that cross my mind now, is to state those configuration in the `settings.py`, something like this 

ADMIN_URLS = {
    'apps': {
        'celery_queue_tools': 'cool-app-name'
    }, 
    'models': {
       'mylongmodelname': 'user-friendly'
    }
}

This is just another idea of where to write the url customization configuration, all is up for discussion.

Thank you all and awaiting your feedback.




--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d6c3b94e-3bcd-49b5-b1b5-1c93c381ec11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/H8y6_HOKU2o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFO84S5WV7K_A1ZWqAVcXc85%3D5UZtHp_txm_rVmuvMDitNDwmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Ramez Ashraf
Co-Founder and lead developer Ra Systems



--
Ramez Ashraf
Co-Founder and lead developer Ra Systems

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAPtjUth0%2BaPOO89W9j6cn7kTB%3DAmJFvqGWFRQQEeNtrRE7wyCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.