Re: get_manager short ut function proposal

2023-01-01 Thread Ramez Ashraf
. This can be your or someone else's fully baked idea. With respect. On Sun, 1 Jan 2023, 19:00 Shai Berger, wrote: > On Sun, 1 Jan 2023 16:33:45 +0200 > Ramez Ashraf wrote: > > > > > Interested or do you think the function can be enhanced it to make > > more usea

Re: get_manager short ut function proposal

2023-01-01 Thread Ramez Ashraf
r project, but > perhaps not suitable for Django itself. I think it's worth sharing in a > blog post though! > > On Mon, Dec 19, 2022 at 10:51 PM Ramez Ashraf > wrote: > >> Hello everyone, >> >> I want to propose a helper function >> `get_manager(parent_manager=N

get_manager short ut function proposal

2022-12-19 Thread Ramez Ashraf
Hello everyone, I want to propose a helper function `get_manager(parent_manager=None, *args, **kwargs)` A shortcut to return a manager, *args & **kwargs are passed to the manager .filter() pass parent_manager to customize the parent manager, defaults to ``Manager``. it can be used like this

Re: Permissions don't get translated in admin interface

2022-09-25 Thread Ramez Ashraf
Hello it's for this reason, i created this package https://github.com/RamezIssac/django-tabular-permissions It displays the permissions in a table that is easily translated , and easier to work with Aside from a 3rd party app, a workaround (like the one suggested above) will be the way to

Re: Digest for django-developers@googlegroups.com - 2 updates in 1 topic

2022-01-27 Thread Ramez Ashraf
I almost never use `id` and always use `pk`.. at least whenever possible. It gives me more freedom and sets a normalisation to code logic. Very *very* useful  On Fri, 28 Jan 2022, 05:40 , wrote: > django-developers@googlegroups.com >

Re: Admin change list header for languages with grammatical cases

2021-05-24 Thread Ramez Ashraf
et/g_cases.html#acc > > Kind regards, > Maciej > > pon., 24 maj 2021 o 10:18 Ramez Ashraf napisał(a): > >> Thank you for bringing this up >> >> Arabic is one of those language, the issue comes with masculine and >> feminine nouns. >> " Select {

Re: Admin change list header for languages with grammatical cases

2021-05-24 Thread Ramez Ashraf
Thank you for bringing this up Arabic is one of those language, the issue comes with masculine and feminine nouns. " Select {model} to change" If model noun is masculine then it's ok... if a feminine one then it's not correct. Example: Correct أختر مقال لتغييره Wrong/awkward اختر هيئه

Re: Translation of group permissions

2021-05-24 Thread Ramez Ashraf
This is an old decision not to store translated strings in the db... and it's makes sense what if your site is multi lingual ? Solution: The widget should be replaced with a another widget that display the permissions in a dynamically translated fashion. There is this app to address that and to

Multi theme support for admin

2020-12-21 Thread Ramez Ashraf
Hello Django Developers list I'm sending on this thread to hopefully open a discussion about *Adding the ability for a multi custom theme in Django's Admin*. *What do i mean ?* We can have many multiple Django admin sites

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

2018-06-29 Thread Ramez Ashraf
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 wrote: > Another comment, if i may, about the implementation after some thoughts > > 1- it

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

2018-06-29 Thread Ramez Ashraf
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 wrote: > Sure that's

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

2018-06-29 Thread Ramez Ashraf
eve, 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 wit

New Feature discussion: making admin app & model url configurable

2018-06-29 Thread 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 / , and those two can get technical, long and in short not user friendly. Hence, I propose a new feature

Re: New Permissions Scheme

2017-09-22 Thread Ramez Ashraf
> > > After some some thoughts, i figured out that one route to change how permissions work in Django can be done by changing AUTHENTICATION_BACKENDS to a Custom ModelBackend Subclass that query for Permissions in a different way or from a different model / Table; And this solution can be

Re: New Permissions Scheme

2017-09-21 Thread Ramez Ashraf
g most of the useful stuff > out of the permission system. > > 2017-09-21 22:14 GMT+02:00 Ramez Ashraf <ramezash...@gmail.com>: > > Good day dear fellow Django developers, > > > > Current permissions scheme in Django does suffer many flaws > > Like

New Permissions Scheme

2017-09-21 Thread Ramez Ashraf
Good day dear fellow Django developers, Current permissions scheme in Django does suffer many flaws Like Inconsistency with permissions for proxy models #11154 and the fact that permission names are not translatable (no translation in the database)

Re: thinking about the admin's scope and its description in the docs

2016-03-14 Thread Ramez Ashraf
Like what is "site front end" that the admin shouldn't replace ?! I work with business application where clients puts data in and get reports back... (Like Sales/Store/Client balances and stuff) I tried to work "my front end" (after getting the bad/wrong message from the docs) but it was so much

Re: Django startproject template enhancement proposal

2016-03-14 Thread Ramez Ashraf
app... > > -- > Curtis > > > > On 15/03/16 10:51, Ramez Ashraf wrote: > >> May i add to the proposal suffixing the project_name inner directory >> (the one containing settings.py) with '_proj' >> Usually i start project called 'my_client_name', then i want

Re: Translate permission Django

2016-03-14 Thread Ramez Ashraf
Hello, I created a 3rd party app for this issue , which will also display the app and model verbose names + display permissions in a tabular format for more easy setting when you have dozens of models. Check it out at https://github.com/RamezIssac/django-tabular-permissions Hope it helps :-)

Admin widget to display user_permissions in tabular format

2015-12-13 Thread Ramez Ashraf
Hello, I came across the idea of having a new permissions widget that display basic permissions (add,change & delete) in a tabular format, and fall back to FilteredSelectMultiple for any extra custom permissions The merits of having this widget are: 1- Setting the permissions is more easy and

Re: Django Admin - ModelAdmin exclude

2015-09-02 Thread Ramez Ashraf
I agree that there are a lot of of hooks in the admin and we might need to better document them or remove unneeded or maybe make a revolution :) But, with the current api and scheme, having get_exclude is more of the expected behavior of Django and i think it should be implemented. What we

Re: Okay to use form field labels in admin history?

2015-08-26 Thread Ramez Ashraf
urrent approach has worked "well enough" for 10 years. I think we can > wait a little longer for a better solution rather than change the message > format twice. Want to give it a try? > > On Tuesday, August 25, 2015 at 11:07:45 AM UTC-4, Ramez Ashraf wrote: >> >

Re: Okay to use form field labels in admin history?

2015-08-25 Thread Ramez Ashraf
Dear devs I'm the PR mentioned contributor. While I understand your concern about translated content in the database and the other ticket mentioned (having the info stored as Json or yaml) I see that these are different ways and are not mutually exclusive. The issue mentioned regards having