Giter Club home page Giter Club logo

quokka's Introduction

Gittip Stories in Ready Build Status Twitter

Quokka project - Flask and MongoDB powered CMS

logo

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.

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

Installing and running

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': "quokka_1"}

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

Test

(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!

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
    ├── 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

Project tree

.
├── LICENSE
├── Makefile
├── manage.py
├── MANIFEST.in
├── 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
│   │   ├── basic_auth.py
│   │   ├── db.py
│   │   ├── __init__.py
│   │   ├── mail.py
│   │   ├── middleware.py
│   │   ├── models.py
│   │   └── widgets.py
│   ├── ext
│   │   ├── babel.py
│   │   ├── before_request.py
│   │   ├── blueprints.py
│   │   ├── context_processors.py
│   │   ├── error_handlers.py
│   │   ├── generic.py
│   │   ├── __init__.py
│   │   ├── template_filters.py
│   │   └── views.py
│   ├── __init__.py
│   ├── local_settings.py
│   ├── media
│   │   ├── files
│   │   └── images
│   ├── 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
│   ├── settings.py
│   ├── static
│   │   ├── admin
│   │   ├── css
│   │   ├── img
│   │   │   └── logo.png
│   │   └── js
│   ├── templates
│   │   ├── admin
│   │   │   ├── base.html
│   │   │   ├── custom
│   │   │   │   ├── create.html
│   │   │   │   └── edit.html
│   │   │   ├── denied.html
│   │   │   └── index.html
│   │   ├── base.html
│   │   ├── errors
│   │   │   ├── access_forbidden.html
│   │   │   ├── method_not_allowed.html
│   │   │   ├── page_not_found.html
│   │   │   └── server_error.html
│   │   ├── _forms.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_settings.py
│   └── utils
│       ├── dateformat.py
│       ├── __init__.py
│       ├── routing.py
│       ├── settings.py
│       └── translation.py
├── README.md
├── README.rst
├── requirements.txt
├── roadmap.md
├── run.py
├── runtests.py
├── setup.py
└── wsgi.py

34 directories, 116 files

python flask mongo

quokka's People

Contributors

rochacbruno avatar

Watchers

 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.