Coder Social home page Coder Social logo

optionalg / quokka Goto Github PK

View Code? Open in Web Editor NEW

This project forked from motoma/quokka

0.0 2.0 0.0 648 KB

Flask powered CMS on top of mongoengine/MongoDB (WIP)

Home Page: http://www.quokkaproject.org

License: MIT License

Makefile 0.34% Python 61.32% Batchfile 0.08% Shell 0.09% HTML 20.85% JavaScript 14.02% CSS 3.29%

quokka's Introduction

Flattr Gittip Travis CI Twitter

Quokka project

Flask and MongoDB powered CMS

(alpha version, work in progress)

quokka cms

Quokka is a flexible content management platform powered by Python, Flask and MongoDB.

Quokka provides a "full-stack" Flask application plus a bunch of selected extensions to provide all the needed CMS admin features and a flexible-easy way to extend the platform with quokka-modules built following the Flask Blueprints pattern.

Current features

  • Customizable admin interface
  • Export data to json or csv
  • Channel based content organization with multi-level unlimited nested channels (MPTT)
  • Beauty urls and SMART-SLUG
  • Default basic website theme based on zurb.foundation css framework
  • Extensible with Flask Blueprints modules
  • Management commands
  • Celery ready
  • Blog/News posting app
  • Comments
  • Role Based Access control for content and admin interface
  • Admin file browser
  • Tinymce WISIWYG Editor
  • Mobile detect middleware (if needed, defaut is responsible)
  • Multi themes based in Flask themes

Installing and running

NOTE: Quokka was tested in Linux and MacOs running in virtual-env with Python 2.7.

Requires Python 2.7+ (Python3 support is planed).

IMPORTANT: Use pip install -r requirements.txt to install dependencies, some packages are setted to specific versions.

On a *nix shell, do:

~/$ virtualenv quokka-env
~/$ ... creating virtualenv in quokka-env........
~/$ cd quokka-env
~/quokka-env$ source bin/activate
(quokka-env)~/quokka-env$ git clone https://github.com/rochacbruno/quokka
(quokka-env)~/quokka-env$ ...cloning in to quokka
(quokka-env)~/quokka-env$ cd quokka
(quokka-env)~/quokka-env/quokka$ pip install -r requirements.txt

configure your DATABASE settings

Note: You need to have mongoDB installed on your server, optionally you can use mongolab.

(quokka-env)~/quokka-env/quokka$ youreditor quokka/settings.py
######## YOUR EDITOR ################

MONGODB_SETTINGS = {'DB': "the_name_of_your_mongo_database"}

######################################

Test (optional)

NOTE: Before running the tests you need to specify a database connection for tests in test_settings.py

(quokka-env)~/quokka-env/quokka$ python runtests.py
...
----------------------------------------------------------------------
Ran 400 tests in 0.230s

OK

Create a super user

(quokka-env)~/quokka-env/quokka$ python manage.py createsuperuser
Name: Input your name
Email: [email protected]
password: ***not1234***

Run

(quokka-env)~/quokka-env/quokka$ python manage.py runserver
17.07 17:06:24 werkzeug     INFO      * Running on http://127.0.0.1:5000/

Enjoy!

NOTE: There are make commands available for test: make test, run: make run, shell: make shell

Quokka

Populating with sample data

You can populate Quokka Channels, Users and Posts with sample data

(quokka-env)~/quokka-env/quokka$ python manage.py populate

The above command will add some content and 3 users

The populate script is in utils/populate needs some work to populate using a json or yaml file, can you help?

Extending

Quokka tries to implement the Django-ish way to implement quokka-modules it means that you can develop like this:

quokka/modules
│
└── posts
    ├── admin.py  - defines the admin pages
    ├── commands.py - create management commands here
    ├── __init__.py - define module and routes
    ├── models.py - define the Mongo Documents models
    ├── populate.py - optional example fixtures
    ├── tasks.py - Tasks is for celery tasks
    ├── template_filters.py - Jinja filters
    ├── templates
    │   └── posts
    │       ├── detail.html
    │       └── list.html
    └── static
    └── views.py - module views

Important - read more about developing modules in the docs, to avoid name conflicts your module should follow the naming pattern described in docs.

Installing modules

There is no need to install or include your modules in config files or change quokka code to load the module.

Just drop your module package in quokka/modules restart your server and done!

Quokka admin also provides a web interface for admin-users to install and ENABLE/DISABLE modules.

Admin interface

Admin interface is powered by Flask-Admin customized with access control and theme tweaks.

Listing admin_list

Posting admin_overview

Requirements

  • Python 2.7
  • Flask
  • mongoengine
  • Babel
  • Flask-Cache
  • Flask-DebugToolbar
  • Flask-Gravatar
  • Flask-HTMLBuilder
  • Flask-Mail
  • Flask-Script
  • Flask-Security
  • Flask-Admin
  • Flask-Testing
  • Flask-WTF
  • Flask-Mongoengine

Project tree

.
quokka
├── Makefile
├── manage.py
├── quokka
│   ├── babel
│   │   ├── babel.bat
│   │   ├── babel.ini
│   │   ├── babel.sh
│   │   └── quokka.pot
│   ├── bin
│   │   ├── __init__.py
│   │   └── quokka-admin.py
│   ├── contrib
│   │   └── __init__.py
│   ├── core
│   │   ├── admin
│   │   │   ├── __init__.py
│   │   │   ├── models.py
│   │   │   └── views.py
│   │   ├── app.py
│   │   ├── db.py
│   │   ├── __init__.py
│   │   ├── middleware.py
│   │   ├── models.py
│   │   ├── templates.py
│   │   ├── views.py
│   │   └── widgets.py
│   ├── ext
│   │   ├── babel.py
│   │   ├── before_request.py
│   │   ├── blueprints.py
│   │   ├── context_processors.py
│   │   ├── error_handlers.py
│   │   ├── fixtures.py
│   │   ├── generic.py
│   │   ├── __init__.py
│   │   ├── template_filters.py
│   │   ├── themes.py
│   │   └── views.py
│   ├── media
│   │   ├── files
│   │   └── images
│   │       ├── 2PsPN.jpeg
│   │       ├── 2PsPN_thumb.jpg
│   │       ├── dopy.png
│   │       ├── dopy_thumb.jpg
│   │       ├── period.jpg
│   │       ├── period_thumb.jpg
│   │       ├── quokka_beach.jpg
│   │       └── quokka_beach_thumb.jpg
│   ├── modules
│   │   ├── accounts
│   │   │   ├── admin.py
│   │   │   ├── commands.py
│   │   │   ├── __init__.py
│   │   │   └── models.py
│   │   ├── __init__.py
│   │   └── posts
│   │       ├── admin.py
│   │       ├── commands.py
│   │       ├── __init__.py
│   │       ├── models.py
│   │       ├── tasks.py
│   │       ├── template_filters.py
│   │       ├── templates
│   │       │   └── posts
│   │       │       ├── detail.html
│   │       │       └── list.html
│   │       └── views.py
│   ├── static
│   │   ├── admin
│   │   │   └── custom.js
│   │   ├── css
│   │   │   └── main.css
│   │   ├── favicon.ico
│   │   ├── img
│   │   │   └── logo.png
│   │   ├── js
│   │   │   └── main.js
│   │   ├── robots.txt
│   │   └── tinymce
│   ├── templates
│   │   ├── admin
│   │   │   ├── base.html
│   │   │   ├── custom
│   │   │   │   ├── create.html
│   │   │   │   ├── edit.html
│   │   │   │   └── _lib.html
│   │   │   ├── denied.html
│   │   │   └── index.html
│   │   ├── base.html
│   │   ├── content
│   │   │   ├── detail.html
│   │   │   └── list.html
│   │   ├── errors
│   │   │   ├── access_forbidden.html
│   │   │   ├── method_not_allowed.html
│   │   │   ├── page_not_found.html
│   │   │   └── server_error.html
│   │   ├── _forms.html
│   │   ├── _menu.html
│   │   └── security
│   │       ├── change_password.html
│   │       ├── email
│   │       │   ├── change_notice.html
│   │       │   ├── change_notice.txt
│   │       │   ├── confirmation_instructions.html
│   │       │   ├── confirmation_instructions.txt
│   │       │   ├── login_instructions.html
│   │       │   ├── login_instructions.txt
│   │       │   ├── reset_instructions.html
│   │       │   ├── reset_instructions.txt
│   │       │   ├── reset_notice.html
│   │       │   ├── reset_notice.txt
│   │       │   ├── welcome.html
│   │       │   └── welcome.txt
│   │       ├── forgot_password.html
│   │       ├── login_user.html
│   │       ├── _macros.html
│   │       ├── _menu.html
│   │       ├── _messages.html
│   │       ├── register_user.html
│   │       ├── reset_password.html
│   │       ├── send_confirmation.html
│   │       └── send_login.html
│   ├── tests
│   │   ├── __init__.py
│   │   ├── test_basic.py
│   │   └── test_text_utils.py
│   ├── themes
│   │   └── default
│   │       ├── favicon.ico
│   │       ├── img
│   │       │   └── logo.png
│   │       ├── info.json
│   │       ├── license.txt
│   │       ├── static
│   │       │   ├── css
│   │       │   │   └── main.css
│   │       │   └── js
│   │       │       └── main.js
│   │       └── templates
│   │           ├── base.html
│   │           ├── content
│   │           │   ├── detail.html
│   │           │   └── list.html
│   │           └── _helpers.html
│   ├── __init__.py
│   ├── local_settings.py
│   ├── test_settings.py
│   ├── settings.py
│   └── utils
│       ├── dateformat.py
│       ├── __init__.py
│       ├── populate.py
│       ├── routing.py
│       ├── settings.py
│       ├── text.py
│       └── translation.py
├── README.md
├── requirements.txt
├── roadmap.md
├── run.py
├── runtests.py
├── setup.py
└── wsgi.py

97 directories, 242 files

python   flask   mongo   pythonhub

quokka's People

Contributors

rochacbruno avatar ellisonleao avatar guswidrig avatar

Watchers

 avatar  avatar

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.