Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #333 from rochacbruno/development
Browse files Browse the repository at this point in the history
New model paths and sitemaps released
  • Loading branch information
rochacbruno committed Mar 3, 2016
2 parents 51f9ac2 + 05974a5 commit cd9099e
Show file tree
Hide file tree
Showing 94 changed files with 1,861 additions and 1,221 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
quokka/themes/* linguist-vendored
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ etc/mongodata/*.0
etc/mongodata/*.ns
etc/mongodata/*.lock
etc/mongodata/*.bson
etc/logs/*.log
*.log
*.pid
14 changes: 13 additions & 1 deletion .landscape.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# python-targets:
# - 2
# - 3

# uses:
# - flask

pylint:
disable:
- bare-except
Expand Down Expand Up @@ -28,4 +35,9 @@ requirements:
- requirements/requirements.txt
- requirements/test.txt

#max-line-length: 120

# doc-warnings: yes
# test-warnings: no
# strictness: veryhigh
# max-line-length: 120
# autodetect: yes
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COPY requirements/requirements.txt /tmp/
COPY requirements/test.txt /tmp/
COPY requirements/dev.txt /tmp/
RUN apk update
RUN apk add gcc python py-pip libjpeg zlib zlib-dev tiff freetype git py-pillow python-dev musl-dev bash
RUN apk add gcc python py-pip jpeg libjpeg jpeg-dev zlib zlib-dev tiff freetype git py-pillow python-dev musl-dev bash
RUN pip install -r /tmp/requirements.txt
RUN pip install -r /tmp/test.txt
RUN pip install -r /tmp/dev.txt
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Licensed under MIT license. http://opensource.org/licenses/MIT

Copyright (c) 2015 Quokka Project. and other contributors
Copyright (c) 2013-2016 Quokka Project. and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
.PHONY: run
.PHONY: run shell test install pep8 clean

run:
python manage.py runserver --reloader --debug

.PHONY: shell
shell:
python manage.py shell

.PHONY: test
test: pep8
QUOKKA_MODE=test py.test --cov quokka
QUOKKA_MODE=test py.test --cov=quokka -l --tb=short --maxfail=1 quokka/

.PHONY: install
install:
python setup.py develop

.PHONY: pep8
pep8:
@flake8 quokka --ignore=F403 --exclude=migrations

.PHONY: sdist
sdist: test
@python setup.py sdist upload

.PHONY: clean
clean:
@find ./ -name '*.pyc' -exec rm -f {} \;
@find ./ -name 'Thumbs.db' -exec rm -f {} \;
Expand Down
116 changes: 30 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[![Flask Registered](https://img.shields.io/badge/flask-registered-green.svg?style=flat)](https://github.com/pocoo/metaflask)
[![Travis CI](http://img.shields.io/travis/quokkaproject/quokka.svg)](https://travis-ci.org/quokkaproject/quokka)
[![Coverage Status](http://img.shields.io/coveralls/quokkaproject/quokka.svg)](https://coveralls.io/r/quokkaproject/quokka)
[![Code Health](https://landscape.io/github/quokkaproject/quokka/development/landscape.svg?style=flat)](https://landscape.io/github/quokkaproject/quokka/development)
[![Requirements Status](https://requires.io/github/quokkaproject/quokka/requirements.svg?branch=development)](https://requires.io/github/quokkaproject/quokka/requirements/?branch=development)
[![Travis CI](http://img.shields.io/travis/rochacbruno/quokka.svg)](https://travis-ci.org/rochacbruno/quokka)
[![Coverage Status](http://img.shields.io/coveralls/rochacbruno/quokka.svg)](https://coveralls.io/r/rochacbruno/quokka)
[![Code Health](https://landscape.io/github/rochacbruno/quokka/development/landscape.svg?style=flat)](https://landscape.io/github/rochacbruno/quokka/development)
[![Requirements Status](https://requires.io/github/rochacbruno/quokka/requirements.svg?branch=development)](https://requires.io/github/rochacbruno/quokka/requirements/?branch=development)

[![Stories in Ready](https://badge.waffle.io/quokkaproject/quokka.png?label=ready&title=Ready)](http://waffle.io/quokkaproject/quokka)
[![Stories in Ready](https://badge.waffle.io/rochacbruno/quokka.png?label=ready&title=Ready)](http://waffle.io/rochacbruno/quokka)
[![Join Slack Chat](https://img.shields.io/badge/JOIN_SLACK-CHAT-green.svg)](https://quokkaslack.herokuapp.com/)
[![Slack](http://quokkaslack.herokuapp.com/badge.svg)](https://quokkaproject.slack.com/messages/)

Expand All @@ -13,7 +13,7 @@
<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=rochacbruno%40gmail%2ecom&amp;lc=BR&amp;item_name=quokkaproject&amp;no_note=0&amp;currency_code=USD&amp;bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHostedGuest"><img alt='Donate with Paypal' src='http://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif' /></a>

[![wercker status](https://app.wercker.com/status/e9cbc4497ee946083aa19fbd3f756c91/m "wercker status")](https://app.wercker.com/project/bykey/e9cbc4497ee946083aa19fbd3f756c91)
[![Launch on OpenShift](http://launch-shifter.rhcloud.com/button.svg)](https://openshift.redhat.com/app/console/application_type/custom?cartridges%5B%5D=python-2.7&cartridges%5B%5D=mongodb-2.4&initial_git_url=https://github.com/quokkaproject/quokka.git&name=quokka&initial_git_branch=master)
[![Launch on OpenShift](http://launch-shifter.rhcloud.com/button.svg)](https://openshift.redhat.com/app/console/application_type/custom?cartridges%5B%5D=python-2.7&cartridges%5B%5D=mongodb-2.4&initial_git_url=https://github.com/rochacbruno/quokka.git&name=quokka&initial_git_branch=master)

Quokka project
===============================================
Expand Down Expand Up @@ -49,20 +49,22 @@ User '[email protected]' and passwd 'admin' to login in to /admin

# Get Quokka

## Get Quokka Master and enter in to its root directory

# Using Docker

The easiest way to run Quokka for development or production is using quokkaCMS + Gunicorn + Supervisor under a Docker Container. You can see the instructions in the following repository: https://github.com/quokkaproject/docker-gunicorn-supervisor


## Get Quokka to run locally for development or deployment

```bash
git clone https://github.com/quokkaproject/quokka --branch master --single-branch
git clone https://github.com/rochacbruno/quokka --branch master --single-branch
cd quokka
```

> if you are cloning to contribute to the project just clone it without the "--branch=master --single-branch" part
## Run Quokka

You have 2 options **RUN LOCAL** or **RUN IN DOCKER**

### RUN LOCAL
### Run Quokka

Install needed packages in your local computer

Expand Down Expand Up @@ -94,6 +96,8 @@ You can install everything you need in your local computer or if preferred use a
MONGODB_USERNAME = None
MONGODB_PASSWORD = None
=============================================================
# You can also use envvars `export QUOKKA_MONGO_DB="yourdbname"`
```

3. If you have Docker installed you can simply run the official Mongo image
Expand All @@ -117,7 +121,8 @@ You can install everything you need in your local computer or if preferred use a

#### Python requirements
Install all needed python packages
> activate your virtualenv if you want

> If you have a virtualenv, activate it! `source env/bin/activate` or `workon env`

```bash
pip install -r requirements/requirements.txt
Expand All @@ -135,7 +140,7 @@ pip install -r requirements/requirements.txt
P4$$W0Rd
```

4. Populate with sample data (optional if you want sample data)
4. Populate with sample data (optional if you want sample data for testing)
```bash
$ python manage.py populate
Expand All @@ -148,68 +153,7 @@ pip install -r requirements/requirements.txt
```
- Site on [http://localhost:5000](http://localhost:5000)
- Admin on [http://localhost:5000/admin](http://localhost:5000/admin)


### RUN IN DOCKER

- Run pre built docker images with everything pre-installed
- You will need docker and docker compose installed in your machine
- Once in Docker all data is stored behind quokka/etc folder


#### Install Docker and docker-compose

- **Docker** - https://docs.docker.com/installation/
- **Docker-Compose** - https://docs.docker.com/compose/install/


> Ensure that local port 27017(mongo) is not being used on your computer

* ### Run with docker-compose

1. Easiest way is just running the following command in quokka root folder
```bash
docker-compose up
```

> use -d on above to leave it as a daemon

2. You can create a new admin user to login and start posting
```bash
docker-compose run web python manage.py accounts_createsuperuser
```

3. Or populate with sample data (optional)
```bash
docker-compose run web python manage.py populate
```
> credentials for /admin will be email: [email protected] passwd: admin

4. You enter Quokka Shell (in a separate console) or run any other command in place of **shell*
```bash
docker-compose run web python manage.py shell
```

* ### Run standalone containers
> (each in separate shells or use -d option)

1. run mongo container
```bash
docker run -v $PWD/etc/mongodata:/data/db -p 27017:27017 --name mongo mongo
```

2. run quokka web app container
```bash
docker run -e "QUOKKA_MONGODB_HOST=mongo" -p 5000:5000 --link mongo:mongo -v $PWD:/quokka --workdir /quokka -t -i quokka/quokkadev python manage.py runserver --host 0.0.0.0
```

3. run quokka shell if needed
```bash
docker run -e "QUOKKA_MONGODB_HOST=mongo" -p 5000:5000 --link mongo:mongo -v $PWD:/quokka --workdir /quokka -t -i quokka/quokkadev python manage.py shell
```



## Deployment

Expand All @@ -223,18 +167,18 @@ http://quokkaproject.org/documentation
> If you want to help writing the docs please go to https://github.com/quokkaproject/quokkaproject.github.io


Also there is a [Wiki](https://github.com/quokkaproject/quokka/wiki)
Also there is a [Wiki](https://github.com/rochacbruno/quokka/wiki)
===============================================

> NOTE: the content from wiki will be moved to /documentation

* [About & Features](https://github.com/quokkaproject/quokka/wiki/about)
* [Installing and running](https://github.com/quokkaproject/quokka/wiki/installation)
* [Requirements](https://github.com/quokkaproject/quokka/wiki/requirements)
* [Extending & Installing modules](https://github.com/quokkaproject/quokka/wiki/plugins)
* [Admin interface](https://github.com/quokkaproject/quokka/wiki/screencast)
* [Project tree](https://github.com/quokkaproject/quokka/wiki/project-tree)
* [Team & Committers](https://github.com/quokkaproject/quokka/graphs/contributors)
* [About & Features](https://github.com/rochacbruno/quokka/wiki/about)
* [Installing and running](https://github.com/rochacbruno/quokka/wiki/installation)
* [Requirements](https://github.com/rochacbruno/quokka/wiki/requirements)
* [Extending & Installing modules](https://github.com/rochacbruno/quokka/wiki/plugins)
* [Admin interface](https://github.com/rochacbruno/quokka/wiki/screencast)
* [Project tree](https://github.com/rochacbruno/quokka/wiki/project-tree)
* [Team & Committers](https://github.com/rochacbruno/quokka/graphs/contributors)


Hosting
Expand All @@ -245,7 +189,7 @@ You can host a Quokka website in any VPS or cloud which supports Python and Flas
- PythonAnywhere can run Quokka with Mongo hosted at MongoLab
- DigitalOcean is a good option for a VPS
- Jelastic Cloud has the easiest Quokka deployment - http://docs.jelastic.com/ru/quokka-cms
- OpenShift [one click deploy](https://openshift.redhat.com/app/console/application_type/custom?cartridges%5B%5D=python-2.7&cartridges%5B%5D=mongodb-2.4&initial_git_url=https://github.com/quokkaproject/quokka.git&name=quokka&initial_git_branch=master)
- OpenShift [one click deploy](https://openshift.redhat.com/app/console/application_type/custom?cartridges%5B%5D=python-2.7&cartridges%5B%5D=mongodb-2.4&initial_git_url=https://github.com/rochacbruno/quokka.git&name=quokka&initial_git_branch=master)


![python](docs/python_powered.png)
Expand Down
10 changes: 0 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ mongo:
volumes:
- ./etc/mongodata:/data/db

# elastic:
# image: catholabs/elastic-with-marvel
# command: elasticsearch
# volumes:
# - etc/elasticdata:/usr/share/elasticsearch/data
# ports:
# - "9200:9200"
# mem_limit: 1000000000

web:
restart: always
image: quokka/quokkadev
Expand All @@ -24,7 +15,6 @@ web:
- .:/quokka
links:
- mongo:mongo
# - elastic:elastic
command: sh etc/docker_wait_to_start.sh
environment:
- QUOKKA_MONGODB_HOST=mongo
Expand Down
32 changes: 32 additions & 0 deletions etc/fixtures/demo_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,38 @@
"order" : 0
}
]
},
{
"name" : "author",
"email" : "[email protected]",
"gravatar_email": "[email protected]",
"password" : "author",
"roles" : [ "author" ],
"bio": "Quokka Example Author",
"tagline": "It is nice to write in Quokka CMS!",
"links": [
{
"title" : "facebook",
"link" : "http://facebook.com/quokkaproject",
"icon" : "facebook",
"css_class" : "facebook",
"order" : 0
},
{
"title" : "github",
"link" : "http://github.com/quokkaproject",
"icon" : "github",
"css_class" : "github",
"order" : 0
},
{
"title" : "twitter",
"link" : "http://twitter.com/quokkaproject",
"icon" : "twitter",
"css_class" : "twitter",
"order" : 0
}
]
}
],
"configs": [
Expand Down
32 changes: 32 additions & 0 deletions etc/fixtures/initial_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,38 @@
"order" : 0
}
]
},
{
"name" : "author",
"email" : "[email protected]",
"gravatar_email": "[email protected]",
"password" : "author",
"roles" : [ "author" ],
"bio": "Quokka Example Author",
"tagline": "It is nice to write in Quokka CMS!",
"links": [
{
"title" : "facebook",
"link" : "http://facebook.com/quokkaproject",
"icon" : "facebook",
"css_class" : "facebook",
"order" : 0
},
{
"title" : "github",
"link" : "http://github.com/quokkaproject",
"icon" : "github",
"css_class" : "github",
"order" : 0
},
{
"title" : "twitter",
"link" : "http://twitter.com/quokkaproject",
"icon" : "twitter",
"css_class" : "twitter",
"order" : 0
}
]
}
],
"configs": [
Expand Down
4 changes: 3 additions & 1 deletion etc/openshift_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
OR AT YOUR OWN RISK!!!!
"""
from quokka import create_app
from quokka.core.models import Content, Channel, Config
from quokka.core.models.content import Content
from quokka.core.models.config import Config
from quokka.core.models.channel import Channel
from quokka.modules.accounts.models import User

app = create_app()
Expand Down
Loading

0 comments on commit cd9099e

Please sign in to comment.