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

New model paths and sitemaps released #333

Merged
merged 72 commits into from
Mar 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
5b74f08
Added aliases_map functionality. related to #17
rochacbruno Dec 1, 2015
9a522d4
Added "plaintext" as CONTENT_FORMAT option.
rochacbruno Dec 3, 2015
d1463e2
User Profile Plugin
rochacbruno Dec 3, 2015
3a3b150
Fix missing import
rochacbruno Dec 3, 2015
affd08b
added maxfails to test
rochacbruno Dec 4, 2015
3703a18
reorganized some model paths
rochacbruno Dec 4, 2015
4f44c3c
avoid registering admin view twice
rochacbruno Dec 4, 2015
5fa2eca
base_models replaced by models as module (BREAK COMPATIBILITY!!!)
rochacbruno Dec 4, 2015
0e5a416
importing new style for some extensions
rochacbruno Dec 4, 2015
496b8aa
quokka endpoints should now have a namespace quokka.core or .module
rochacbruno Dec 4, 2015
9060386
flashes messages and user avatar page
rochacbruno Dec 4, 2015
008e30e
added a reminder
rochacbruno Dec 4, 2015
40c22de
endpoints in url_for updated using quokka. namespace
rochacbruno Dec 5, 2015
4f6089d
Blueprints now loads from main.py not __init__.py
rochacbruno Dec 5, 2015
d7b0779
Finally Fixed #284
rochacbruno Dec 5, 2015
e5cd13a
media management shows full_path
rochacbruno Dec 5, 2015
cf7bdaf
applied @quantifiedcode suggestions
rochacbruno Dec 6, 2015
2267eb2
user profile page now has avatar upload
rochacbruno Dec 6, 2015
02f4b42
Merge pull request #322 from quokkaproject/remodels
rochacbruno Dec 6, 2015
9c36820
channel can redirect to endpoint
rochacbruno Dec 6, 2015
284fe05
added unicode to userlink
rochacbruno Dec 6, 2015
5027e5f
fix generate_username to avoid duplications
rochacbruno Dec 6, 2015
d4b478b
user edit profile page is complete
rochacbruno Dec 6, 2015
a2a4f01
authors ordered by name or AUTHORS_ORDER
rochacbruno Dec 6, 2015
9632089
url to profile edit added to admin menu
rochacbruno Dec 6, 2015
394a010
user edit form html
rochacbruno Dec 6, 2015
a799d0f
avoid None in template
rochacbruno Dec 6, 2015
090005d
added fields to usre admin
rochacbruno Dec 6, 2015
6e90c9c
removed elasticsearch docker, not using
Dec 12, 2015
94eae13
bump requirements versions
rochacbruno Dec 15, 2015
170a274
removed sitemap from static, added comments to settings
rochacbruno Dec 15, 2015
8d57f95
added support to @opbeat awesome error tracking and metrics
rochacbruno Dec 15, 2015
9bd7557
basic sitemap (initial bootstrap)
Dec 16, 2015
6efc54f
Update requests version
rochacbruno Dec 17, 2015
e82340b
Added sitemap by template, fix get_http_url for channel
rochacbruno Dec 17, 2015
73b70ad
Merge pull request #325 from quokkaproject/sitemap
rochacbruno Dec 17, 2015
0edae31
appropriate escaping on sitemap.xml
rochacbruno Dec 17, 2015
f01cb0f
using isoformat for sitemap
rochacbruno Dec 17, 2015
5965146
missing package added to alpine linux image
rochacbruno Dec 17, 2015
c238095
pin Pillow to previous version, because 3.0.0 broken in some O.S
rochacbruno Dec 17, 2015
2c379bf
added comment explaining why pillow is outdated
rochacbruno Dec 17, 2015
bad1de3
fixed format date on sitemap
Dec 17, 2015
d6d9e67
more configs to landscape
rochacbruno Dec 17, 2015
fe5357e
config cast should use @ instead of $
rochacbruno Dec 17, 2015
1499b90
Update .landscape.yaml
rochacbruno Dec 17, 2015
10972e0
Update .landscape.yaml
rochacbruno Dec 18, 2015
aec69f3
ignore all *.log files
Dec 18, 2015
0a74b23
Update README.md
rochacbruno Dec 18, 2015
63462ce
added "populate_reset" command to clean sample data
rochacbruno Dec 19, 2015
186f006
added *.pid on ignore git file
Dec 19, 2015
9c44e2d
Merge branch 'development' of github.com:quokkaproject/quokka into de…
Dec 19, 2015
e57034c
fix populate reset
rochacbruno Dec 19, 2015
91dd43e
Fix #328 added get_main_image_http
rochacbruno Dec 21, 2015
ef4daa0
used get_main_image_http on `og:image`
Dec 21, 2015
3730008
Merge pull request #329 from quokkaproject/fixed_ogimage_path_http
rochacbruno Dec 21, 2015
c7a3688
mistune 0.7.x broke base64 images
rochacbruno Jan 16, 2016
6ae76a3
No need for versioning and other stuff in __init__ it is a CMS
rochacbruno Jan 17, 2016
529f8a4
Mention initial copyright year
prayagverma Jan 26, 2016
190ead6
Merge pull request #330 from pra85/patch-1
rochacbruno Jan 26, 2016
2f34a9d
[requires.io] dependency update
requires Feb 6, 2016
985d9d7
[requires.io] dependency update
requires Feb 6, 2016
67ff4b0
[requires.io] dependency update
requires Feb 6, 2016
3ca76b2
Merge pull request #331 from quokkaproject/requires-io-development
rochacbruno Feb 7, 2016
0f31af3
Update requirements.txt
rochacbruno Feb 7, 2016
afe2ad4
Trying Pillow 3.1.1
rochacbruno Feb 8, 2016
22d83a5
Update test.txt
rochacbruno Feb 12, 2016
ec8922a
Create .gitattributes
rochacbruno Mar 2, 2016
e241790
Update README.md
rochacbruno Mar 3, 2016
e13a9c6
Merge branch 'master' into development
rochacbruno Mar 3, 2016
26d4a30
Update dev.txt
rochacbruno Mar 3, 2016
3d2765b
Update requirements.txt
rochacbruno Mar 3, 2016
05974a5
Update test.txt
rochacbruno Mar 3, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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