GithubHelp home page GithubHelp logo

d-demirci / django-adminlte3 Goto Github PK

View Code? Open in Web Editor NEW
244.0 15.0 111.0 33.94 MB

AdminLTE Templates, Template Tags, and Admin Theme for Django

Home Page: https://django-adminlte3.herokuapp.com/admin

License: Other

Python 0.13% HTML 0.56% CSS 6.12% JavaScript 93.19%
django adminlte adminlte3 adminlte-dashboard-template pypi-package

django-adminlte3's Introduction

AdminLTE Templates, Template Tags, and Admin Theme for Django

pypi_badge

Django AdminLTE3 provides the functionality of the AdminLTE3 theme to developers in the form of standard base templates. Optional styling for Django's built-in admin interface is also provided.

Installation

Installation using pip:

pip install django-adminlte3

Add to installed apps:

INSTALLED_APPS = [
     # General use templates & template tags (should appear first)
    'adminlte3',
     # Optional: Django admin theme (must be before django.contrib.admin)
    'adminlte3_theme',

    ...
]

Don't forget to collect static

python manage.py collectstatic 

Usage

The base template is designed to be highly customisable. Template blocks are provided to allow you to hook in customisations as you wish

Admin Theme Usage

Install as per the above installation instructions. The django admin UI should then change as expected.

Documentation

Can be found at: http://django-adminlte3.readthedocs.io

Credits

This project a based heavily on work by the following:

Screenshots

Admin Area:

  • Home :admin screenshot

  • Model :model screenshot

  • Editing Model: model edit

Site Area:

  • Landing: site area

django-adminlte3's People

Contributors

adamcharnock avatar atnartur avatar basitsattar avatar bgunebakan avatar clover-es avatar d-demirci avatar hmphu avatar krejcar25 avatar sstroube avatar zdnumxo 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-adminlte3's Issues

Autocomplete field: The results could not be loaded.

When I installed AdminLTE3 it started showing me this error on autocomplete fields like this

image

Here's the error log

[09/Oct/2021 17:35:05] "GET /admin/autocomplete/ HTTP/1.1" 403 9745
Not Found: /favicon.ico
[09/Oct/2021 17:35:05] "GET /favicon.ico HTTP/1.1" 404 12180
Forbidden (Permission denied): /admin/autocomplete/
Traceback (most recent call last):
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\utils\datastructures.py", line 76, in __getitem__
    list_ = super().__getitem__(key)
KeyError: 'app_label'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\contrib\admin\views\autocomplete.py", line 61, in process_request
    app_label = request.GET['app_label']
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\utils\datastructures.py", line 78, in __getitem__
    raise MultiValueDictKeyError(key)
django.utils.datastructures.MultiValueDictKeyError: 'app_label'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\contrib\admin\sites.py", line 250, in wrapper
    return self.admin_view(view, cacheable)(*args, **kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\utils\decorators.py", line 130, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\views\decorators\cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\contrib\admin\sites.py", line 232, in inner
    return view(request, *args, **kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\contrib\admin\sites.py", line 417, in autocomplete_view
    return AutocompleteJsonView.as_view(admin_site=self)(request)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\views\generic\base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\views\generic\base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\contrib\admin\views\autocomplete.py", line 20, in get
    self.term, self.model_admin, self.source_field, to_field_name = self.process_request(request)
  File "C:\Users\moizh\.virtualenvs\djangoMaxerp-d8UvVia_\lib\site-packages\django\contrib\admin\views\autocomplete.py", line 65, in process_request
    raise PermissionDenied from e
django.core.exceptions.PermissionDenied
[09/Oct/2021 17:35:06] "GET /admin/autocomplete/ HTTP/1.1" 403 9745```

Dark mode not implemented ?

I use the class dark-mode but it doesn't work.
In the adminlte.min.css i can't find it.
I trying to add it but it doesn't work.

Is it safe to assume this repo is dead? No update in over a year

Just wondering whether this module's developer is still around. Hopefully they are ok health-wise.

As noted in #30, AdminLTE 3.1.0 was released over a year ago. 3.2.0 has now been out since 7 Feb 2022. And yet there has not been a single update in release or response to any of the issues raised in well over a year.

If it is abandoned, would be a shame. It's a useful module.

Font Awesome CSS rules are not valid for some elements

Hey, thanks for your project!

But I found that you have a lot of class="far ...blah-blah-blah" , and it produces a strange error - add button on each and every admin page has blank rectangle instead of plus sign.
This is because of far styling is available only for pro version of the font (according to https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use). As well as fal and fad.
The short search shows that there are a huge amount of far occurances on the project.

Chances I will have time to fix it by myself if you're going to accept that via pull request. But it's not certain.

FYI: django-adminlte3 module module still not tracking with actual AdminLTE project

This Python module looks quite interesting. I was just wondering how it handles updates created by the actual AdminLTE (https://adminlte.io/) project itself?

That is, this module's last release was v0.1.2 on 11 Dec 2019 (https://pypi.org/project/django-adminlte-3/#history). But AdminLTE has had 3 releases since then, the latest being v3.0.4 just 8 days ago (https://github.com/ColorlibHQ/AdminLTE/releases).

I was wondering how this tracks. The django-adminlte3 files on GitHub are all 5+ months old. Obviously the version of AdminLTE v3 included in this module is at best v3.0.1 (released 20 Nov 2019). But does this module provide a mechanism to self-update? And if not, is there a way to update the version of AdminLTE v3 so that this module can still be used?

Or is the general idea that whenever a new version of AdminLTE v3 comes out, a corresponding update should occur to this module so that a simple pip command patches things up? Just trying to sort out whether it's best to use this module or simply use the direct AdminLTE code.

collectstatic fails when using ManifestStaticFilesStorage

The collectstatic command fails to process when you are using STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' within your project.

This is because jquery-ui css files contain comments which have paths in them that match the collectstatic regex parsing.

A similar issue has been documented here: django-helpdesk/django-helpdesk#479

As I am using this package within a Docker container and have control over my build process, I have implemented the following workaround within my Dockerfile build process just before the build does the collectstatic command:

# - Dynamically locate the python install directory and tack the package path on the end,
# - Iterate over each of the css files and delete out the offending line with sed outputting it to a new file with .2 on the end,
# - Iterate over the .2 files and move them over the top of the original by moving to the name without the last extension.
# I found that merely directing the output of sed to the same file caused empty files so that is another hacky workaround - but it works!
RUN cd $(pip show django-adminlte3 | grep Location | cut -d" " -f2)/adminlte3/static/admin-lte/plugins/jquery-ui && for f in *.css; do echo "Removing offending comments from $f"; sed '/To view and modify this theme/d' $f > $f.2; done && for f in *.css.2; do mv "$f" "${f%.*}"; done

Not sure how else to get around it given that the jQuery files will be brought in from somewhere else and there isn't really any control over it - but this has fit my use case and my build process is now able to 'collectstatic' as needed without any issues.

URL on main GitHub page points to a Django admin login page; Doc link points to page that doesn't exist

[Hope it's ok to report this here. I really do appreciate the work you've done, so doing it to help, not be a nuisance.]

On main GitHub page: https://github.com/d-demirci/django-adminlte3

  1. Top line has URL https://django-adminlte3.herokuapp.com/admin
    which lands on what looks like the login/admin page of a Django site. Is that what you really intended? (If I strip /admin from the URL, I see a demo page of a Django site using AdminLTE3.)

  2. As others noted, in the README.md content further down, you indicate Documentataion can be found at http://django-adminlte3.readthedocs.io/ . But that page doesn't exist. To date, I've relied on Google, the django-adminlte2 docs (https://django-adminlte2.readthedocs.io), and going through the project to discern what I needed to do. Am taking notes so I can write something up (mostly for myself as I'll forget otherwise :-)). Will share once it's not an utter mess if interested.

On PyPi page: https://pypi.org/project/django-adminlte3/

Looks like same content as README.md, so same issue here as #2 above: URL to docs lands on a page that doesn't exist.

Feature : Update README.md

Hi,

Please could you update the README.md to explain how to test / launch your django sample ?

Thank you very much.

Best regards,

block nav_bar overriding other navbar blocks

When extending from _main_header.html, I noticed that {% block nav_bar%} will override other block such as nav_bar_center and nav_custom_menu's content.
After checking the source code, i found that nav_bar's {% endblock %} was placed in the end of the main_header code(in front the tag), causing the overriding problem.

image

Although it can be fixed by moving {% endblock %} to the end of navbar-nav part, i think that problem should be mentioned.

image

The whole project does very significant improvements for developing adminlte-template web to me, thanks for the all hard work!

Question about installation

Hi,

I'm writting this issue because I have question about the installation of your django-adminlte3.

INSTALLED_APPS = [
     # General use templates & template tags (should appear first)
    'adminlte3',
     # Optional: Django admin theme (must be before django.contrib.admin)
    'adminlte3_theme',

    ...
]

What is the difference between 'adminlte3', 'adminlte3_theme' and 'django_adminlte3' and why the order is mandatory ?

AdmintLTE 3.1.0 released; just curious when module will be updated (and if it'll be on PyPi)

Again, more informational than anything. Intention here is to help if anything, and because I truly appreciate this module.

  1. I noticed that AdminLTE released the official 3.1.0 version
  2. I also noticed that the last release candidate of this module here indicated

The size of this release exceeds the maximum size allowed at pypi.org. So this one won't be on pypi. But you can install using...

I'm assuming that was just as you were working on things, so maybe you had extra files/folders there. (I see the entire AdminLTE 3.1.0 fully decompressed is ~106MB, and that's with ~27MB in docs not to mention build files, etc., that could be pruned out if need be.)

Anyway, wanted to say thank you for the work you've done with this. I've found it very useful and easy to use this module to make apps look much nicer, vs. having to manage it manually. So kudos.

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.