Skip to content
🐴 A centralized, pluggable admin app for Django
Branch: master
Clone or download
Pull request Compare This branch is 223 commits ahead, 3 commits behind disqus:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
nexus Version 2.1.2 May 17, 2019
tests Remove support for Django 1.8, 1.9, and 1.10 (#193) Apr 14, 2019
.coveragerc
.editorconfig
.gitignore Add .pytest_cache to .gitignore Feb 2, 2018
.travis.yml Support Django 2.2 (#195) Apr 28, 2019
HISTORY.rst Version 2.1.2 May 17, 2019
LICENSE Initial draft of modules/sites Dec 18, 2010
MANIFEST.in Tidy up metadata Dec 11, 2015
README.rst Retire project (#197) May 17, 2019
pytest.ini Move Pytest config from setup.cfg to pytest.ini (#187) Jan 26, 2019
requirements.in Support Django 2.2 (#195) Apr 28, 2019
requirements.txt Upgrade requirements (#196) May 8, 2019
runtests.py Remove Python 2 support (#189) Mar 2, 2019
screenshot.png New header font Feb 15, 2016
setup.cfg Remove Python 2 support (#189) Mar 2, 2019
setup.py Retire project (#197) May 17, 2019
tox.ini Support Django 2.2 (#195) Apr 28, 2019

README.rst

Nexus

https://travis-ci.org/adamchainz/nexus.svg?branch=master

Retired: this project is no longer maintained. I (Adam Johnson) no longer have time to continue maintaining this. I was doing so to support gargoyle-yplan, a fork for my ex-employer YPlan. If you'd like to sponsor ongoing maintenance or take it over yourself, please contact me@adamj.eu.

Nexus is a pluggable admin application in Django. It's designed to give you a simple design and architecture for building admin applications.

It was originally created by Disqus, but due to the inactivity we at YPlan have taken over maintenance on this fork.

Screenshot

https://raw.github.com/adamchainz/nexus/master/screenshot.png

Requirements

Tested with all combinations of:

  • Python: 3.6
  • Django: 1.11, 2.0, 2.1, 2.2

Python 3.4+ supported.

Installation

Install it with pip:

pip install nexus-yplan

Make sure you pip uninstall nexus first if you're upgrading from the original to this fork - the packages clash.

You'll need to enable it much like you would django.contrib.admin.

First, add it to your INSTALLED_APPS setting:

INSTALLED_APPS = (
    ...
    'nexus',
)

nexus has three dependencies from core Django - django.contrib.admin, django.contrib.auth, and django.contrib.sessions. If these applications are not in your INSTALLED_APPS, add them; or if you are using a custom auth system you can skip these requirements by adding the line NEXUS_SKIP_INSTALLED_APPS_REQUIREMENTS = True to your settings.

Second, include nexus at some url in your urls.py:

import nexus

# urls.py
urlpatterns = patterns('',
    ('^nexus/', include(nexus.site.urls)),
)

Nexus has autodiscovery similar to Django Admin - it will look in each of your INSTALLED_APPS for a nexus_modules submodule, and import that. This is where the app should declare a NexusModule subclass and use nexus.site.register to add it to the main Nexus site. Thus to add functionality you should install some packages with modules, or write your own.

Available Modules

The following modules are tested against nexus-yplan:

There are also some older applications that provide Nexus modules, however these were only developed against Disqus' Nexus and not this fork; your mileage may vary:

If you want to write a module, there are a couple of example modules in tests/testapp/nexus_modules.py, with templates in tests/testapp/templates/nexus/example. Also the source code shouldn't be too hard to understand.

A Note on Login

Until Version 1.1, Nexus included a login/logout functionality. Unfortunately these were copied and adapted from an old version of the code in Django Admin, and were thus not up to date with security changes in newer Django versions. Since keeping them up to date would be a burden, and most sites use Django Admin for adminstrator login, the login/logout functions have been removed.

Nexus now relies on Django Admin login, or for users to visit it having logged in through another route.

Settings

Nexus' behaviour can be customized by adding some values to your Django settings.

Media

By default Nexus serves its media files itself through Python, avoiding any configuration to integrate with your project. This is convenient but can be slow. You can control where the media files are served from with the setting NEXUS_MEDIA_PREFIX, for example:

NEXUS_MEDIA_PREFIX = '/served/here/'

This will make Nexus write its media URLs using this prefix, where it assumes you have set up serving its files.

You can’t perform that action at this time.