Total Pageviews

Friday 24 June 2016

cms系统-Bombolone

Bombolone is a tasty Content Management System based on Flask, MongoDB, AngularJS, Sass and Bootstrap. It's designed to be a simple, flexible toolset for projects of any size.


Bombolone is a tasty Content Management System for Python based on FlaskMongoDBAngularJSSass and Bootstrap. It's designed to be a simple, flexible toolset for projects of any size.
Based from the Python and Angular implementation of Opentaste.co.

Important dependecies

Before starting check if you have all you need.
# Install Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

# Install MongoDB
brew install mongodb

# Install Virtualenv
sudo pip install virtualenv
Important, if you use a Mac OSX please install the commandline tools manually from Apple's Developer site.developer.apple.com/downloads/…

Quick start

Just for running a new app let's follow these 6 steps.
# Clone the latest stable version in your new web app folder
git clone --branch 0.3.3 https://github.com/Opentaste/bombolone.git new_app && cd new_app

# Run Mongodb
sudo mongod

# Create your own environment from the new_app folder
virtualenv venv && . venv/bin/activate

# Install libraries
python setup.py install && cd bombolone

# Init Bombolone Mongodb
bombolone bake

# Run Bombolone 
bombolone serve
Registered users are:
  • Admin with username 'admin' and password 'admin123'
  • User with username 'user' and password 'user123'

Overview

Sometimes you simply don’t need to use all the features of a CMS. Bombolone lets you have a good core, with five modules are essential for almost all web applications.
You can control them from the administration panel, and each has different tools to edit, create or delete. It's important to note that beginning the application has two types of users: administrators and users. Administrator can do everything. Users can only edit content and other little things, but configurable to allow multiple levels of access depending on rank.

Core Modules

Users

Allows user administration: 
  • Administrators : can create, modify or delete users.
  • Users : can only read the account list by default.

Rank

The rank module allows you to see what ranks are available.

Pages

Allows you to quickly create dynamic and static pages.
  • Administrators : can create, edit, modify or delete pages.
  • Users : can edit any content pages by default.

Languages

From here you can decide which languages you want the site to use.

HashTable

With the HashTable module you can create different hashmap be used inside modules or the site.
  • Administrators : can create, edit, modify or delete hash map.
  • Users : can edit any content of hash map by default.

How compile CSS

Setting up the ruby environment
gem update --system
gem install compass
gem install compass-h5bp
In a new tab with the same path run Compass
compass watch

Fabric command-line

We use Fabric to provide a basic suite of operations for executing local or remote shell commands, as well as auxiliary functionality such as prompting the running user for input, or aborting execution. If you find trouble to installing Fabric, you can check this page.
pip install fabric
sudo pip install yuicompressor
Available commands:
Check if is running the MongoDB database
fab check_database
Init the basic database
fab init_database            
fab local_backup
Minify .js files that have been changed since last run
fab minify                   
fab mongodb_restore
fab update
fab write_db_in_config

Tests

Python

Run python test
python unit_test.py 

Js Unit/Integration Tests

Before run the test, you need install some dependecies. Download and install Node from http://nodejs.org/download/ If you never use Protractor before you can have a quick intro here.
# Install Nvm
curl https://raw.githubusercontent.com/creationix/nvm/v0.11.1/install.sh | bash

# Select Nvm
nvm alias default v0.10.29

# Installing all node packaged modules
npm install

# Install Protractor global
npm install -g protractor

# Install Selenium
webdriver-manager update
Run Unit tests
npm test
Run Integration tests not log in
webdriver-manager start
protractor conf.js
Run Integration tests as admin
webdriver-manager start
protractor conf.js --params.admin true --params.login.user 'admin' --params.login.password 'admin123'
from https://github.com/Opentaste/bombolone
-------------------------------
Bombolone.js is a tasty Node App based on Express, Mongodb, AngularJS, jQuery, Sass and Bootstrap. It's designed to be a simple, flexible toolset for projects of any size. 

Quick start in 5 steps

# Run Mongodb
sudo mongod

# Clone the git repo in your new web app folder
git https://github.com/Opentaste/bombolone.js.git node_app

# Go to new_app and Install all the dependencies
npm install
sudo npm install -g nodemon

# In two new tabs with the same path run Compass
compass watch

# Run Bombolone in development
nodemon app.js

Directory Layout

app.js              --> app config
package.json        --> for npm
public/             --> all of the files to be used in on the client side
    ...
routes/
  ...
views/
  ...
from https://github.com/Opentaste/bombolone.js