Skip to main content

Library to easy install, configure and use Semantic UI framework with Django project

Project description

Django Semantic UI

Easy python package that allow install, configure and use Semantic UI Framework with a Django project.


  • npm (last stable version)
  • Python 2.7.x
  • Django 1.11.x


  1. Install gulp (CLI), the version 3.9.1 is the available to work with Semantic UI Framework.
$ sudo npm install -g gulp@3.9.1
  1. Install the django-semantic-ui package:
$ pip install django-semantic-ui
  1. Configure django-semantic-ui in the
  1. Running the install command
$ python semantic_ui install

NOTE: You need to define the settings required to install semantic-ui module, see: Install Semantic

  • You can use the follow options when the semantic-ui module is configured:
 Automatic (Use default locations and all components)

? We detected you are using NPM Nice! Is this your project folder? /home/franklinitiel/Documents/TSJ/projects/personal/python_tests/semanticui/static (Use arrow keys) Yes

? Where should we put Semantic UI inside your project? (semantic/) semantic
  1. Running the gulp build command
$ python semantic_ui gulp_build

Settings Development or Local environment

  1. Add 'django.template.context_processors.static' to context_processors option on the TEMPLATES settings
# TEMPLATES settings
'context_processors': [
  1. Configure the static files and folder, see: Managing static files
STATIC_URL = '/static/'
  1. Add CSS and JS to your django project
{% load dsu %}
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Semantic UI Test</title>
    {% dsu_stylesheet_url %}
    <!-- Your HTML code -->
    {% dsu_jquery_url %}
    {% dsu_javascript_url %}

Settings Production environment

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  • And execute the collectstatic command
$ python collectstatic

Additional settings

  • GULP_VERSION by default is None, if you want to install a specific version of gulp module (local), you can use this settings, by example:
GULP_VERSION = '3.9.1'
  • SEMANTIC_UI_VERSION by default is None, if you want to install a specific version of semantic-ui module (local), you can use this settings, by example:
  • SEMANTIC_DIRNAME by default is 'semantic'', if you have defined a custom dirname for the JS and CSS files when the Semantic UI Framework was installed (step 4), you need to add it on this settings.
DSU_JQUERY_URL = '...your jquery path...'

Uninstall django-semantic-ui

  • You can uninstall Semantic UI Framework and Gulp (local version) using the follow command:
$ python semantic_ui uninstall && pip uninstall django-semantic-ui

Releases notes:

  • 1.0.0: Initial and beta version (only installation and settings).
  • 1.0.1: Bugs fixed semantic folder not found or not exists.
  • 1.0.2: Bugs fixed semantid and static folders not found or not exists.
  • 1.0.3: file updated, bugs fixed self.semantic_ui_version undefined.
  • 1.1.0: Logic updated to install / uninstall django-semantic-ui, new settings added.
  • 1.1.1: Bugs fixed related with the semantic files path.
  • 1.1.2: updated
  • 1.2.0: New templatetags added to load the javascripts and stylesheets files
  • 1.2.1: Bugs fixed using the DSU_JQUERY_URL settings.
  • 1.2.2: updated, New static method added to load the STATIC_URL from django project.
  • 1.2.3: updated, bugs fixed to execute the command "python runserver" after installed.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_semantic_ui-1.2.3.tar.gz (7.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page