Code Monkey home page Code Monkey logo

django-wpadmin's Introduction

Django WP Admin

WordPress look and feel for Django administration panel.

image

Features

  • WordPress look and feel
  • New styles for selector, calendar and timepicker widgets
  • More responsive (admin panel should look fine and be usable on displays with minimum 360px width)
  • Editable top menu
  • Optional fully configurable left menu
  • Left menu can be pinned (fixed CSS position) or unpinned and collapsed or expanded
  • Awesome Font Awesome icons supported in both menus
  • Multiple AdminSite's support with possibility to have different menus, colors and titles for each one
  • 9 additional color themes included
  • Collapsible fieldsets can be opened by default
  • Python3 compatible

Django compatibility

On GitHub there is specific branch of Django WP Admin for each major Django version and master branch is always for current stable Django. Releases on PyPI have numbering matching proper Django versions, so for instance for Django 1.7.x you should install Django WP Admin 1.7.y (pip install "django-wpadmin>=1.7,<1.8"). Branches of Django WP Admin for Django older than current stable usually will not have new features added, only bugs will be fixed. Only version for current stable Django will have new features, but any pull requests for older branches are welcome.

TODO

  • Add support (in 3.0.x branch) for Django 3.0
  • Host test project on PythonAnywhere or Heroku
  • Add support (in 2.2.x branch) for Django 2.2
  • Add support (in 1.11.x branch) for Django 1.11
  • Add support (in 1.9.x branch) for Django 1.9
  • Make sure everything works fine with GeoDjango
  • Do not rely on Django admin styles, move everything to Django WP Admin styles.
  • Better documentation
  • django-filebrowser or django-filer support
  • django-mptt support
  • Optional templates for django-rosetta

Demo

Try test_project here or download django-wpadmin from GitHub and run it on your own machine. test_project contains SQLite database file with prepopulated sample data.

Installation

  • Install django-wpadmin from PyPI:

    pip install django-wpadmin
  • Or from GitHub:

    pip install git+https://github.com/barszczmm/django-wpadmin.git#egg=django-wpadmin

Basic configuration

Documentation

Basic configuration above will only change look of Django's admin page, but there's much more you can do with Django WP Admin. Check out documentation on Read the Docs for details (there is also changelog there).

Translations

Many translations are already available thanks to good people that helped. If you want to help to translate this software, please join me on Transifex: transifex.com/projects/p/django-wp-admin/

Troubleshooting

Please create an issue on GitHub if you have any problems or requests.

Credits

Python code is based on django-admin-tools app.

WordPress look and feel is of course inspired by WordPress.

Included icons comes from Font Awesome.

django-wpadmin's People

Contributors

barszczmm avatar edrmp avatar ionelmc avatar vstoykov 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  avatar  avatar  avatar  avatar  avatar  avatar

django-wpadmin's Issues

Unable to create jQuery modal dialog

Hi,

I'm trying to create a modal dialog to display when the admin page is ready using this code in the change_list.txt template :

<script type="text/javascript">

    (function($) {
        $(document).ready(function($) {
             $("#dialog").dialog({
                modal: true,
                autoOpen: true
            });
        });
    })(django.jQuery);
</script>

..but when I load the page I'm getting "Uncaught TypeError: undefined is not a function".

Dialog is defined in change_list.txt (which is overriden) inside block content like this :

<div id="dialog" title="Title">This is dialog.</div>

What should I do to set this dialog to show?

import Error

ImportError raised when trying to load 'w
padmin.templatetags.wpadmin_menu_tags': No module named 'django.utils.importlib'

Site Header difficult to change

If in yourapp/admin.py you configure a site header like this, wpadmin won't show it:

admin.site.site_header = "My site administration"

A workaround in menu/menus.py, in class DefaultTopMenu:

from django.contrib.admin import site
title=getattr(site, 'site_header', _('Django administration')),

You may want to get the site from settings.wpadmin['admin']['admin_site'].

I hope it's helpin'.

Appearance is off in Django 1.6.5

Not sure if this is really an issue or the fact I'm upgrading a legacy site from 1.3 to 1.6.5, but when I add this app, the left-hand bar does not appear and the colors are off. It's the same in Chrome and Firefox and I don't see any missing files/ 404s in the network panel. I've removed the custom /templates/admin/*.html files the site did have and I've run collectstatic, but the site still looks like this:

wpadmin

There are a couple of other admin packages in use, django-wysiwyg-redactor and filebrowser but shutting those off has no effect. What's the best way to debug this?

Django WP Admin 1.7.4 is not compatible with Django 1.8.5

Hello there, we was install django-wpadmin from pip, and have an error like this:

/home/agaust/ENV/djangowp/local/lib/python2.7/site-packages/wpadmin/__init__.py:20: UserWarning: Django WP Admin 1.7.4 is not compatible with Django 1.8.5 and may not work properly. You should install Django WP Admin from 1.8.x branch.
  UserWarning)

Can i fix this please?

Not working with Django 2.0.1

I am using Django 2.0.1 I installed django-wpadmin from master branch.
When I entered ./manage.py runserver, I saw the following warning:

UserWarning: Django WP Admin 1.7.4 is not compatible with Django 2.0.1 and may not work properly. You should install Django WP Admin from 2.0.x branch.

However, I cannot find 2.0.x branch.

Horizontal scroll on mobile devices doesn't work

Horizontal scroll on mobile devices doesn't work.
I'm using admin panel from mobile. I discovered that horizontal scroll doesn't appear on mobile devices.
Do we have any update on responsiveness of wp-admin theme?

Bullseye icon

is there a quick/clean way to override the bullseye icon? By this I mean to an arbitrary icon unrelated to a font.

Warning message django 1.7

Hi, congrats for the project, I like it very much.
I am getting following message on start: UserWarning: Django WP Admin 1.6.3 is not compatible with Django 1.7.1 and may not work properly. You should install Django WP Admin from 1.7.x branch. , but cannot see branch 1.7 here. Can you tell me what is not compatible with django 1.7 to be aware of it.

P.S. Also you should add z-index above 1020 to #bottombar , because In django geo admin the map has z-index 726 and it overlaps your controls.
map1

Use a GPL Licence

I wanna use and contribute with this project, but the licence shoud be more GPL friendly and my project is AGPLv3.
Another reason is that I think you need change de licence to include Font Awesome with your code.
If you change de Licence, I can test this with geodjango.

Cheers

There is no object-tools block in change_list.html

I just tried to use the django-wpadmin app together with the django-reversion app and noticed that the "Recover deleted [object name plural]" link was missing. Django reversion obviously uses the object-tools block to add this link to the change list. And because the django-wpadmin's change_list.html is not using this block, nothing is being displayed.

Is there any proper solution for this?

Thank you very much in advance.

Best regards,
Rico Moorman

costum site_name

Hii.. there.. big pardon to ask something...

I already add this code on my django settings.py:
SITE_URL='www.mydomain.tld/somewhere/'
SITE_NAME='My site'

but doesnt works..still doesnt anything happen...
11

how to costum text and icon, i found on https://github.com/barszczmm/django-wpadmin/blob/master/wpadmin/menu/menus.py , and just re-write class BasicTopMenu(Menu):

class BasicTopMenu(Menu):
    """
    Basic default top menu.
    """

    def init_with_context(self, context):

        admin_site_name = get_admin_site_name(context)

        if 'django.contrib.sites' in settings.INSTALLED_APPS:
            from django.contrib.sites.models import Site
            site_name = Site.objects.get_current().name
            site_url = 'http://' + Site.objects.get_current().domain
        else:
            site_name = _('Site')
            site_url = '/'

        self.children += [
            items.MenuItem(
                title=site_name,
                url=site_url,
                icon='fa-bullseye',
                css_styles='font-size: 1.5em;',
            ),

I change site_name and site_url directly from the code, and also the icon url . Does have a method change the text very simple to do?

Very big thanks and appreciation for the response

django 3.0 support

Hello :D

I get this error when installing:
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'wpadmin.templatetags.wpadmin_menu_tags': No module named 'django.utils.importlib

Any fix?

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.