Skip to content

An alternative to `startapp` command, Yeoman that generates the set of files (including cms_plugins.py, templates, scss with class names related to plugin name) you need to start a new Django CMS Plugin.

License

Notifications You must be signed in to change notification settings

marcelox/generator-simpleplugins

Repository files navigation

generator-simpleplugins NPM version Build Status Dependency Status

This Yeoman generates a simple Django CMS plugin. It is thought for Django CMS projects that need a simple and fast custom plugin initialization

Installation

First, install Yeoman and generator-simpleplugins using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-simpleplugins

Usage in a Django CMS Project

Assuming your workspace (directory structure) looks (roughly!) like this:

├── env/
├── mysite/
   ├── scss/
   ├── static/
   ├── templates/
      ├── base.html
   ├── __init__.py
   ├── settings.py
   ├── urls.py
   ├── wsgi.py
├── requirements.txt
├── plugins/   <-- here is your friend
├── manage.py
├── project.db

Inside the plugins directory in your Django CMS Project, create a new directory named after your plugin name: mkdir myplugin, and your tree will look like this:

...
├── plugins/
   ├── myplugin/
...

After cd myplugin, generate your new plugin with yeoman (please make sure to be inside the fresh myplugin directory):

yo simpleplugins

Don't forget to add your new plugin to INSTALLED_APPS in settings.py

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

MIT © marcelo cordeiro correia

About

An alternative to `startapp` command, Yeoman that generates the set of files (including cms_plugins.py, templates, scss with class names related to plugin name) you need to start a new Django CMS Plugin.

Topics

Resources

License

Stars

Watchers

Forks