Giter Site home page Giter Site logo

assem-ch / django-jet-reboot Goto Github PK

View Code? Open in Web Editor NEW
370.0 370.0 61.0 3.66 MB

Legacy Django jet rebooted to support Django 3 and Django 4, and latest python releases

Home Page: https://django-jet-reboot.readthedocs.io/

License: GNU Affero General Public License v3.0

Python 38.16% JavaScript 23.60% CSS 0.55% HTML 12.12% SCSS 25.57%
django django-admin django-admin-theme django-admin-tools django-jet

django-jet-reboot's Introduction

I like to build modern backend APIs. I've experience in those domains: Ecommerce,Delivery, Ride hailing, Search and Arabic NLP, Clinical trials

Open for external consultancy in:

  • Building MVPs for startups

The stack I prefer to work with: FastAPI, Django, Node.js, React-native. You may check my starred lists here.

Active projects that I maintain

django-fast-api
(Experimental)
Few hacks to speed up defining apis based on django rest framwork, inspired from fastapi.
Please give it a try and let me know your feedback.

django-jet-reboot a django admin based on django-jet that actually supports django 3.0 and django 4.0.
arabicstemmer an Arabic Light Stemmer aimed mainly to improve search.

For students and fresh graduates

  • Basic training for React-Native mobile dev: check Moumene's readme
  • Basic training for Django backend dev: Check link

django-jet-reboot's People

Contributors

assem-ch avatar bennylope avatar cobia avatar danielquinn avatar darccio avatar dbartenstein avatar dependabot[bot] avatar dnmellen avatar f1nality avatar frohus avatar grigory51 avatar harrylafranc avatar hbiboluo avatar jpic avatar lburdzy avatar leonardoarroyo avatar lmwgv avatar michaelkuty avatar minkoonim avatar normal-cock avatar pyzenberg avatar rense avatar retailify avatar salahaddin avatar sedir avatar theethergit avatar timgates42 avatar timur-orudzhov avatar tkanemoto avatar woutor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-jet-reboot's Issues

list filter gone after newest django update

before django admin's filter.html template used to be sorta

<h3>title</h3>
<ul><li>option<li><ul>

it became

<summary>
<h3>title</h3>
<ul><li>option<li><ul>
<summary>

and toolbar.js couldn't pick up them in moveFilter function
I overrided filter.html to old version, and it works.

Problem with Daterangefilter

Hello, i love this theme and thank you for the reboot.

I have a problem with the date range. The filter is not displaying

i am importing from jet.filters import DateRangeFilter

href missing in compact sidebar if user only has view permission

Versions
Django==4.1.3
django-jet-reboot=1.3.3

Description

If a django project is set up with JET_SIDE_MENU_COMPACT = True and a staff member has only a view access for a certain model, the href is missing from the sidebar item.

Screenshot 2022-11-21 at 17 32 52

In jet/utils/get_app_list the url only gets added to the model, if a user has change or add permission:
https://github.com/assem-ch/django-jet-reboot/blob/master/jet/utils.py#L85

I'd be happy to contribute and write a PR for this. But can someone tell me if it's as easy as I think or what should be done?

Would modifying the existing code as following be ok?

if perms.get('view', False) or perms.get('change', False) :
    try:
        model_dict['admin_url'] = reverse('admin:%s_%s_changelist' % info, current_app=admin_site.name)
    except NoReverseMatch:
        pass

127.0.0.1 refused to connect

Python interpreter: 3.8.7
Django version: 3.2.4
django-jet-reboot: 1.1.1

Problem: Cannot add data using the add icon

image
While clicking the add icon the following page shows:
image

Inlines are wrongly displayed

Hey there

I just tried to use django-jet-reboot with ModelAdmin and multiple StackedInline unfortunately they don't get rendered as tabs (as before) but just below the modeladmin.

any ideas what/if i'm doing something wrong? Or how this could be fixed?

Side menu link permissions

Hello!
Why you need change permissions to click in the changelist view of a model? I have a model user in the core app and I have a group with add and view permissions to this model but not change permissions and this group can't access to this view from the side menu but it can access to the changelist view if it clicks in the core app from the side menu it can click on the view of the users (or entering with the url). This is because of this piece of code:

if perms.get('change', False):
try:
model_dict['admin_url'] = reverse('admin:%s_%s_changelist' % info, current_app=admin_site.name)
except NoReverseMatch:
pass

Doesn't this perms.get("change", False) should be perms.get("view", False)?

Uncaught ReferenceError: DateTimeShortcuts is not defined

django==4.1.7 django-jet-reboot==1.3.3 django-admin-rangefilter==0.9.0
If I uninstall django-admin-rangefilter, I will occur error: cant find jet.filters.DateRangeFilter.

However i use django-admin-rangefilter or django-jet-reboot, like
from rangefilter.filters import DateRangeFilter or from jet.filters import DateRangeFilter

will occur error:
Uncaught ReferenceError: DateTimeShortcuts is not defined at Array.<anonymous> ((index):283:17) at fire (jquery.js:3500:31) at Object.fireWith [as resolveWith] (jquery.js:3630:7) at Object.<anonymous> (jquery.js:4013:15) at fire (jquery.js:3500:31) at Object.fireWith [as resolveWith] (jquery.js:3630:7) at done (jquery.js:9796:14) at XMLHttpRequest.<anonymous> (jquery.js:10057:9)

Many to many field too little

📄 Description

Hello ! I'm working with this amazing admin customization, and everything is pretty fine and fancy, but I noticed that in many to many fields the field looks actually too little making this way kind of hard to work with them. Even compared with the main Django field, looks very little. So I was wondering if there is a way to make it bigger or something.

📸 Screenshot

CleanShot 2022-07-17 at 17 41 21

🕐 Versions used

Django==4.0.6
django-jet-reboot==1.3.1

"Found another file with the destination path ..."

Right after following install instructions for django-jet-reboot, I ran python manage.py collectstatic and got these messages:

Found another file with the destination path 'admin\css\base.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\changelists.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\dashboard.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\fonts.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\forms.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\login.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\rtl.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\css\widgets.css'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\js\SelectFilter2.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\js\admin\DateTimeShortcuts.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.
Found another file with the destination path 'admin\js\admin\RelatedObjectLookups.js'. It will be ignored since only the first encountered file is collected. If this is not what you want, make sure every static file has a unique path.

Is this normal or should I do something to address that?

Thanks in advance.

Adding permissions to groups and users

The form fields for adding permissions to groups and users does not work as it did in the original django-jet. I;m not sure if it should work differently but in it's current state I cannot add permission. I'm using Django 3.2.12 and django-jet-reboot=1.3.0. Screenshot is attached.

Screenshot from 2022-03-24 17-56-15

in jet/dashboard/dashboard_modules/google_analytics.py add renderer=None

in jet/dashboard/dashboard_modules/google_analytics.py add renderer=None class CredentialWidget(Widget): module = None def render(self, name, value, attrs=None, renderer=None): if value and len(value) > 0: link = '%s' % ( reverse('jet-dashboard:google-analytics-revoke', kwargs={'pk': self.module.model.pk}), force_str(('Revoke access')) ) else: link = '%s' % ( reverse('jet-dashboard:google-analytics-grant', kwargs={'pk': self.module.model.pk}), force_str(('Grant access')) ) attrs = self.build_attrs({ 'type': 'hidden', 'name': 'credential', }) attrs['value'] = force_unicode(value) if value else '' return format_html('%s<input{} />' % link, flatatt(attrs))

jquery

JQuery is not included in jet, so dropdowns not working
It is missing this lines

<script src="{% static 'admin/js/vendor/jquery/jquery.js' %}" type="text/javascript"></script> <script src="{% static 'admin/js/jquery.init.js' %}"></script>

Add new user group from User Admin Page

Hello,

When I tried to add a new user group via User Admin Page, it showed that:
`bundle.min.js?v=1.3.1:2 TypeError: django.gettext is not a function
at e.exports (bundle.min.js?v=1.3.1:2:22302)
at HTMLFieldSetElement. (bundle.min.js?v=1.3.1:2:11432)
at Function.each (bundle.min.js?v=1.3.1:8:1086)
at ot.fn.init.each (bundle.min.js?v=1.3.1:7:30940)
at s.findTabs (bundle.min.js?v=1.3.1:2:11353)
at s.run (bundle.min.js?v=1.3.1:2:12228)
at HTMLBodyElement. (bundle.min.js?v=1.3.1:2:12403)
at Function.each (bundle.min.js?v=1.3.1:8:1086)
at ot.fn.init.each (bundle.min.js?v=1.3.1:7:30940)
at HTMLDocument. (bundle.min.js?v=1.3.1:2:12372) 'TypeError: django.gettext is not a function\n at e.exports (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:22302)\n at HTMLFieldSetElement. (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:11432)\n at Function.each (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:8:1086)\n at ot.fn.init.each (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:7:30940)\n at s.findTabs (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:11353)\n at s.run (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:12228)\n at HTMLBodyElement. (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:12403)\n at Function.each (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:8:1086)\n at ot.fn.init.each (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:7:30940)\n at HTMLDocument. (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:12372)'
run @ bundle.min.js?v=1.3.1:2
(anonymous) @ bundle.min.js?v=1.3.1:2
each @ bundle.min.js?v=1.3.1:8
each @ bundle.min.js?v=1.3.1:7
(anonymous) @ bundle.min.js?v=1.3.1:2
u @ bundle.min.js?v=1.3.1:8
fireWith @ bundle.min.js?v=1.3.1:8
ready @ bundle.min.js?v=1.3.1:8
a @ bundle.min.js?v=1.3.1:7
bundle.min.js?v=1.3.1:1 TypeError: django.gettext is not a function
at e.exports (bundle.min.js?v=1.3.1:2:22302)
at n.t.render (bundle.min.js?v=1.3.1:1:25456)
at n.i.render (bundle.min.js?v=1.3.1:12:16872)
at n.c (bundle.min.js?v=1.3.1:11:14250)
at n.t.render (bundle.min.js?v=1.3.1:1:25041)
at n.c [as render] (bundle.min.js?v=1.3.1:11:14250)
at new o (bundle.min.js?v=1.3.1:12:31581)
at HTMLSelectElement. (bundle.min.js?v=1.3.1:13:6954)
at Function.each (bundle.min.js?v=1.3.1:8:1086)
at ot.fn.init.each (bundle.min.js?v=1.3.1:7:30940) 'TypeError: django.gettext is not a function\n at e.exports (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:2:22302)\n at n.t.render (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:1:25456)\n at n.i.render (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:12:16872)\n at n.c (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:11:14250)\n at n.t.render (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:1:25041)\n at n.c [as render] (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:11:14250)\n at new o (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:12:31581)\n at HTMLSelectElement. (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:13:6954)\n at Function.each (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:8:1086)\n at ot.fn.init.each (http://127.0.0.1:8000/static/jet/js/build/bundle.min.js?v=1.3.1:7:30940)'
run @ bundle.min.js?v=1.3.1:1
(anonymous) @ bundle.min.js?v=1.3.1:1
u @ bundle.min.js?v=1.3.1:8
fireWith @ bundle.min.js?v=1.3.1:8
ready @ bundle.min.js?v=1.3.1:8
a @ bundle.min.js?v=1.3.1:7
inject.js:359 GET http://127.0.0.1:8000/favicon.ico 404 (Not Found)
extractIconBase64 @ inject.js:359
(anonymous) @ inject.js:323
(anonymous) @ inject.js:736
inject.js:359 GET http://127.0.0.1:8000/favicon.ico 404 (Not Found)
extractIconBase64 @ inject.js:359
setTimeout (async)
(anonymous) @ inject.js:325
load (async)
(anonymous) @ inject.js:324
(anonymous) @ inject.js:736
chrome-error://chromewebdata/:1 Refused to display 'http://127.0.0.1:8000/' in a frame because it set 'X-Frame-Options' to 'deny'.'

Please help us how to add many to many model from "edit screen" of a model. Thank you!

Consider `@media (prefers-color-scheme: dark)` for themes

I'm using the theme dark together with a admin tree package which shows icons for drag and collapse.
This packages considers @media (prefers-color-scheme: dark) and shows white icons which I can't see with the green theme.

Therefore I suggest to adjust styles to consider this.
For example the background color of a table could be a dark(er) green instead of white, if you have set dark mode in your OS.

Second Pop Up Can't Open In Firefox

ảnh

When I open second iframe popup it can't open in firefox.

This is first popup and button to open second pop-up.
ảnh

This second popup when opened
ảnh

ảnh
related-popup iframe was display none. How can i fix it?

THIS BUG ONLY IN FIREFOX

Popup is opening in new window in list view

When setting eg. a Foreign Key to list_editable, popup does not work as usual. It's opened in a new frame and is not able to save/close.

image

Steps to Reproduce:

  1. Add foreign key to list_editable
  2. Try to add a new item

Note: Popup in edit detail page works normally.

UI breaks after logging out

I have Django 4.2.1 installed and the latest version of Jet installed. I followed the instructions to the letter on read the docs website, but when I go to log out I get a strange UI. The logout message doesn't cover the whole page. The bug only happens when the side menu is open. If the side menu is closed then the log out message covers the whole page as shown by the screenshots below.

Screenshot 2023-05-08 at 23 27 29

Screenshot 2023-05-08 at 23 34 38

Migration does work with custom user-model

Hey,

in the case that someone use a custom User model with a UUID instead of (Big)Integer as primary key, the migrations fail for (at least) a postgresql.
As far as I see, the error comes from the migration fiels, which declare "user" as a PositiveIntegerField, first, and then alter "user" to ForeignKey. The cast for the second step won't work, if the User model has a non-integer field as its primary key.

Squashing or regenerating of the migration fields should solve the problem.

TemplateSyntaxError appeared after downloading 1.3.3.

Hi !

As the title explains, I have a TemplateSyntaxError in my project. When I force my project to use the 1.3.2 version, this error does not happen anymore.
image

Does someone have any idea about that ?

Thanks in advance !

Migration fails when using UUID

User model with a UUID instead of BIGINT, the migrations fail for PostgreSQL.
tried django-jet-reboot==1.3.1/1.3.3 still fails.

Error message:
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: cannot cast type integer to uuid
LINE 1: ..." ALTER COLUMN "user_id" TYPE uuid USING "user_id"::uuid, AL...

django.gettext and django.jQuery is not a function

Hi, I've just installed jet-reboot and dashboard, but I'm having these erros on the console.

django.jQuery is not a function is happening under the dashboard index page.
django.gettext is not a function is happening under adding model page.

I couldn't find a way to fix this in the repo.

Thanks

Cannot Select all objects on a list display page

Usually, when selecting all objects on a list display page, it will only select the objects that are actually shown on the page, but then it gives options to select all objects. The option to "select all" is usually shown beside the actions field. Below is a screenshot which shows what i'm seeing. You can see in the html code, that the information exists, but it's hidden from view due to CSS rules.

image

No collaboration info

Hi!

@assem-ch - You mention that this project needs more collaborators. I want to start collaborating but can't find any working contact or collaboration info. Is the project still active?

[Question] Makemigrations denied, what is the best practice to resolve?

Trying to generate makemigration files from local.yml :

docker-compose -f local.yml run --rm django python manage.py makemigrations

  1. Why jet and dashboard migration files went to /usr/local/lib/python3.10/site-packages folder and not to my local migrations folder as in the 0001_initial.py migration?

Migrations for 'dashboard':
/usr/local/lib/python3.10/site-packages/jet/dashboard/migrations/0003_alter_userdashboardmodule_id.py
- Alter field id on userdashboardmodule
Migrations for 'jet':
/usr/local/lib/python3.10/site-packages/jet/migrations/0002_alter_bookmark_id_alter_pinnedapplication_id.py
- Alter field id on bookmark
- Alter field id on pinnedapplication
Migrations for 'paf':
arthur_paf/paf/migrations/0001_initial.py
- Create model AddressImpSet
- Create model BuildingName

EDIT: it is trying to create it not does not exist:

cat: /usr/local/lib/python3.10/site-packages/jet/dashboard/migrations/0003_alter_userdashboardmodule_id.py: No such file or directory

cat: /usr/local/lib/python3.10/site-packages/jet/migrations/0002_alter_bookmark_id_alter_pinnedapplication_id.py: No such file or directory

  1. But using production.yml:

sudo docker-compose -f production.yml run --rm django python manage.py makemigrations
WARN[0000] The "MONGO_USERNAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "MONGO_PASSWORD" variable is not set. Defaulting to a blank string.
WARN[0000] The "MONGO_HOST" variable is not set. Defaulting to a blank string.
WARN[0000] The "MONGO_PORT" variable is not set. Defaulting to a blank string.
[+] Running 1/1
⠿ Container mongo Recreated 0.2s
[+] Running 1/1
⠿ Container mongo Started 0.4s
DATABASE_URL inside entrypoint: mongodb://@mongo:27017/?authMechanism=SCRAM-SHA-1
Migrations for 'dashboard':
/usr/local/lib/python3.10/site-packages/jet/dashboard/migrations/0003_alter_userdashboardmodule_id.py
- Alter field id on userdashboardmodule
Traceback (most recent call last):
File "/app/manage.py", line 31, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.10/site-packages/django/core/management/init.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 98, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py", line 214, in handle
self.write_migration_files(changes)
File "/usr/local/lib/python3.10/site-packages/django/core/management/commands/makemigrations.py", line 256, in write_migration_files
with open(writer.path, "w", encoding="utf-8") as fh:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/jet/dashboard/migrations/0003_alter_userdashboardmodule_id.py'

Why is it now saying permission error?

Do we change chmod in /usr/local/lib to make it writable?

Side menu item corresponding to the currently active page is not being visually highlighted

Expected Behavior:
The side menu item related to the active page should be visually distinguished from the other menu items. This could be achieved by applying a different background color, dark color would be great.

Steps to Reproduce:

  1. Log in to the Django admin site.
  2. Navigate to any model admin page.
  3. Observe the side menu and note that the corresponding menu item is not visually highlighted.

Actual Results:
The side menu item related to the active page does not stand out in any way, making it challenging for users to identify their current location within the application.

Additional Information:
See the image below. The page is opened at /admin/store/sparepart/. However, the "Spare parts" side menu is not highlighted.

jet issue

Does Google analytics work Ga4

I have managed to get the oauth to Google auth done, when it returns to callback via redirect uri it doesn't populate counter drop-down. Will it run with Ga4 or is this configured for ga3 and will not get any data. As per my understanding the counter should populate with the properties I have under the specified Google account mentioned in the clientsecrets.json. please advice.

GeoDjango maps don't get displayed

I'm having an issue with GeoDjango maps on the admin interface when using Django Jet Reboot. The maps are registered on the admin using django.contrib.gis.admin.OSMGeoAdmin, and they display correctly on the default admin interface. However, when using Django Jet Reboot, the map is just blank.

Steps to reproduce

  1. Register the maps on the admin using OSMGeoAdmin
  2. View the maps on the default admin interface
  3. Switch to Django Jet Reboot and view the maps on the admin interface

Expected behavior

The maps should display correctly on the admin interface when using Django Jet Reboot, just like they do on the default admin interface.

Actual behavior

When using Django Jet Reboot, the maps are just blank on the admin interface.

Additional information

  • Django version: 3.2.6
  • Django Jet Reboot version: 1.3.3

If anyone has experienced this issue or has any suggestions for how to fix it, please let me know! Thank you in advance for any help.

Using RelatedFieldAjaxListFilter for autocomplete erase previous applied filters

I defined some filters using RelatedFieldAjaxListFilter (following the instructions inhttps://django-jet-reboot.readthedocs.io/en/latest/autocomplete.html) and I noticed that everytime I apply a new filter the previous ones are removed from the URL.

Using as example the code bellow: When I apply the user's filter the URL is changed to http://localhost:8000/admin/example_admin/?user__id__exact=24. Applying the 'product's filter the URL changes to http://localhost:8000/admin/example_admin/?product__id__exact=3 (erases the previous filter). The right one should be http://localhost:8000/admin/example_admin/?user__id__exact=24&product__id__exact=3.

`

class ExampleAdmin():

    list_filter = (('user', RelatedFieldAjaxListFilter), ('product', RelatedFieldAjaxListFilter),)

`

Someone knows a way to fix that?

Invalid block tag on line 2: 'blocktranslate'. Did you forget to register or load this tag?

I'm trying to install django-jet-reboot and all is going as expected. Until I tried to open a model list (e.g. Users list) I got the following error

Invalid block tag on line 2: 'blocktranslate'. Did you forget to register or load this tag?

After looking deeper in the traceback, I found out that the error is coming from jet/templates/admin/filter.html

{% load i18n %}
<h3>{% blocktranslate with filter_title=title %} {{ filter_title }} {% endblocktranslate %}</h3>
<ul>
	{% for choice in choices %}
		<li{% if choice.selected %} class="selected"{% endif %}>
			<a href="{{ choice.query_string|iriencode }}" title="{{ choice.display }}">{{ choice.display }}</a></li>
	{% endfor %}
</ul>

image

I ran the following commands in the installation process

  • pip install django-jet-reboot
  • Added "jet.dashboard", "jet" to the INSTALLED_APPS
  • Added
urlpatterns = [
    # Jet admin settings
    path('jet', include('jet.urls', 'jet')),
    path('jet/dashboard', include('jet.dashboard.urls', 'jet-dashboard')),
    ...
]
  • Added themes
JET_THEMES = [
    {
        'theme': 'default', # theme folder name
        'color': '#47bac1', # color of the theme's button in user menu
        'title': 'Default' # theme title
    },
  ...
]
  • python manage.py migrate
  • python manage.py collectstatic

Custom Admin Page

Hello,

Thank you for making it great again!

Could I ask if I want to have a custom admin page, how I can do that because I searched there is no changelist file to override.

Thank you!

Pagination is not formatted correctly on the list display pages

When the number of pages exceed 10 on a list display page, pagination breaks. The 3 dots are misplaced. I believe that they are supposed to be inserted into the "pages-wrapper" element followed by the last 2 pages in the pagination list, instead they are position just outside "pages-wrapper" element. See screenshot below.

This is tested on an installation of jet-reboot version=1.3.1 with no other packages installed. Django version=3.2.13. Tested in Chrome, Firefox, Edge, Chromium.

image

Connection refused by localhost when trying to add a foreign key model inside a model

I have 2 models, one has a foreign key pointing to the other model. When I press "Add item" in the first model, I can press the plus button next to the foreign key field to add another to that model, but when I click it, it says "Connection refused by localhost".

`class Currency(models.Model):
name = models.CharField(max_length=200, null=False, blank=False)

class Item(models.Model):
name = models.CharField(max_length=200, verbose_name="Megnevezés", blank=False)
curr = models.ForeignKey(Currency, max_length=50, blank=False, on_delete=models.CASCADE)
`

screenshot: https://imgur.com/a/f1AFAY1

Django version: 4.0.6
jet version: newest.

InlineTabular and ManyToMany Form Field Layout messed up.

Hi

First of all, thanks for maintaining this package!

I am experiencing issues with the Layout with django-jet-reboot version 1.3.3.

TabularInlines are not shown as tabs but rather appended at the bottom of the page and the many to many admin form widget is squeezed, not showing single selected values in the box.

I expect the following layout:

Screenshot from 2023-01-27 14-53-07

But what i get is this:

image

Interestingly the issue is not present when developing locally and serving on localhost. However on the server running nginx reverse proxy it is messed up like described. I don't know what could cause this difference. I am running in a virtualenv with dependencies managed by poetry. So dependencies should be all else equal. Django version is at 3.2.16.

Any ideas? The tabs are not a big issue but this many to many form widget is almost impossible to select multiple values properly.

Thanks in advance!

fieldsets option

Hello,

I recently migrate to Django 4 and I use your jet modification interface. Thanks for your help to use it

But I use fieldsets in my admin panel (model) like this

        fieldsets = (
                (None, {'fields': (
                        'identification',
                        'date_joined',
                )}),
                ('options', {
                        'fields': (
                        'image_logo',
.....

In previous jet module, I have tabs but not now with this version
Is there an option to get tabs navigation in admin panel ?

thanks for your help :)

Mick

some view error on microsoft edge browser

This my first time trying django-jet-reboot, but I got a problem that when the admin site open in microsoft edge browser the layout broken. view on firefox or brave just normal as expected.

Screencast.from.Thursday.29.June.2023.11.51.26.AM.PST.webm

is there any solutions for this issue?

module 'collections' has no attribute 'MutableSet'

When jet.dashboard URLs are included in the project URLs, the following AttributeError is raised:

  File ".../jet/dashboard/urls.py", line 10, in <module>
    from jet.dashboard import dashboard
  File ".../jet/dashboard/dashboard.py", line 11, in <module>
    from jet.ordered_set import OrderedSet
  File ".../jet/ordered_set.py", line 4, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'

Django v. 4.0.2
Python v. 3.10

The issue is Python 3.10:

DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working

Thank you for maintaining this project!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.