Code Monkey home page Code Monkey logo

quokka's People

Contributors

bendoh avatar bernardoow avatar dhoeric avatar ecliptik avatar lex-quarkie avatar marcosptf avatar redhat-developers-launcher avatar rochacbruno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quokka's Issues

Set theme by channel

In order to have multi themes in the same website, the idea is to have per channel template/theme configuration.

channel.behaviour = "portal|blog|wiki|app|site"
channel.theme = "foundation_blog"
channel.template_folder = "blablabla"

this way, there is no need to create different apps for those things.

A blog would be just a generic channel configured as a blog.

Version control for content

Thinking on using this with different configurable backends.

  • Database (versions will be stored as collections in db)
  • Git (will use gittle to serialize and store versions to disk/repo)

upload a image error

i uploaded a image (test.jpg).it produced tow images.
test.jpg( it's a fail image)
test_thumb.jpg( it's ok )

windows7 64bit ,python 2.7.3

Implement prepopulated_fields in channel admin

prepopulated_fields for title/slug is working well when creating a Post, but not when creating a Channel.

Would be good to have it implemented for every content which has a "slug" depending on a "title" field.

I looked the JavaScript used to generate this and I think this can be transformed in a _macro in Jinja2.

Flask-BabelEx==0.8.1

No distributions matching the version for pytz (from Flask-BabelEx==0.8.1->-r requirements.txt (line
20))

python manage.py createsuperuser

hi,i run command:
python manage.py createsuperuser

error information:
Traceback (most recent call last):
File "manage.py", line 52, in
load_blueprint_commands(manager)
File "D:\python_pro\flask_pro\quokka-env\quokka\quokka\ext\blueprints.py", lin
e 94, in load_blueprint_commands
mod = imp.load_module(fname, f, filename, descr)
File "D:\python_pro\flask_pro\quokka-env\quokka\quokka\modules\posts\commands.
py", line 4, in
from .models import Post
ValueError: Attempted relative import in non-package

i found that models.py(quokka/quokka/modules/posts) doesn't compile.

flask-admin didn't register Channel

information:
15.08 17:10:56 root WARNING admin.register(<\class 'quokka.core.models.C
hannel'>, <class 'quokka.core.models.ChannelAdmin'>, (), {'category': 'Content'}
) error: 'NoneType' object has no attribute 'get'


i updated code in 'quokka/core/models.py'.
now,it works !

old version:
class ChannelAdmin(ModelAdmin):
roles_accepted = ('admin', 'editor')
column_list = ('title', 'long_slug', 'is_homepage', 'published')
column_filters = ['published', 'is_homepage', 'include_in_rss',
'show_in_menu', 'indexable']
column_searchable_list = ('title', 'description')
form_columns = ['title', 'slug', 'description', 'parent', 'is_homepage',
'include_in_rss', 'indexable', 'show_in_menu', 'order',
'published', 'canonical_url', 'values']

new version:
class ChannelAdmin(ModelAdmin):
roles_accepted = ('admin', 'editor')
column_list = ('title', 'long_slug', 'is_homepage', 'published')
column_filters = ['published', 'is_homepage', 'include_in_rss',
'show_in_menu', 'indexable']
column_searchable_list = ('title', 'description')
form_columns = ['title', 'slug', 'description', 'parent', 'is_homepage',
'include_in_rss', 'indexable', 'show_in_menu', 'order',
'published', 'canonical_url']

related content

besides of recommendation, would have a way to specify related content.

Python 2.6 compatibility

  • Check zero-length in format() replacing "{} {}".format(x, y) with "{0} {1}".format(x, y)
  • Check the instalation of importlib, include in requirements2.6.txt
  • Check the from future import absolute_import

File upload path error

13.08 23:09:44 quokka       ERROR    Exception on /admin/fileview/new/ [GET]
Traceback (most recent call last):
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/base.py", line 60, in inner
    return f(self, **kwargs)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/base.py", line 60, in inner
    return f(self, **kwargs)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/base.py", line 60, in inner
    return f(self, **kwargs)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/base.py", line 60, in inner
    return f(self, **kwargs)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/model/base.py", line 1079, in create_view
    form = self.create_form()
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/model/base.py", line 660, in create_form
    return self._create_form_class(get_form_data(), obj=obj)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/wtforms/form.py", line 178, in __call__
    return type.__call__(cls, *args, **kwargs)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/form/__init__.py", line 13, in __init__
    super(BaseForm, self).__init__(formdata=formdata, obj=obj, prefix=prefix, **kwargs)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/wtforms/form.py", line 226, in __init__
    super(Form, self).__init__(self._unbound_fields, prefix=prefix)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/wtforms/form.py", line 39, in __init__
    field = unbound_field.bind(form=self, name=name, prefix=prefix, translations=translations)
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/wtforms/fields/core.py", line 314, in bind
    return self.field_class(_form=form, _prefix=prefix, _name=name, _translations=translations, *self.args, **dict(self.kwargs, **kwargs))
  File "/home/rochacbruno/.virtualenvs/quokka-test-1/local/lib/python2.7/site-packages/flask_admin/form/upload.py", line 163, in __init__
    super(FileUploadField, self).__init__(label, validators, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'path'

layout.html

Where is the layout.html file that is mentioned in (/ templates / admin / base.html)?

Docs - quokka not in quokka-env

Should the docs say:

~/$ virtualenv quokka-env
~/$ ... creating virtualenv in quokka-env........
~/$ cd quokka-env
~/$ source bin/activate
~/$ git clone https://github.com/rochacbruno/quokka
~/$ ...cloning in to quokka

Or is this just my personal preference? (I like the app to be in the virtualenv which you source).

User Login - Invalid Password

After install, I'm unable to login using the superuser or user accounts. Passwords in the db seem to be stored as plain text [!].

Module template_folder not working as expected

I know that the blueprint template folder is added to the searchpath of templates but with a lower priority than the actual application’s template folder.

In that way, current post module , has a post folder under templates module to avoid this.

But is not working, also, i just tried to give a unique name(Jinja by default caches a template based on its name) to each module template, without success.

Also remove the template_folder module property and placed the templates under app main templates, without any success.

The only templates that are applied are those under themes.

is this the expected behavoir ?

How is it supposed to work ?

Themes are not supposed to know about modules stuff or they must ?

Error 500 while registering but account is created (because of missing SMTP config)

Thats the problem.

Here some log:

30.09 22:49:14 quokka ERROR Exception on /accounts/register [POST]
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Python/2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Python/2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Python/2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask_security/views.py", line 117, in register
user = register_user(**form.to_dict())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask_security/registerable.py", line 41, in register_user
user=user, confirmation_link=confirmation_link)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask_security/utils.py", line 260, in send_mail
mail.send(msg)
File "/Library/Python/2.7/site-packages/flask_mail.py", line 415, in send
with self.connect() as connection:
File "/Library/Python/2.7/site-packages/flask_mail.py", line 123, in enter
self.host = self.configure_host()
File "/Library/Python/2.7/site-packages/flask_mail.py", line 137, in configure_host
host = smtplib.SMTP(self.mail.server, self.mail.port)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 250, in init
(code, msg) = self.connect(host, port)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 310, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py", line 285, in _get_socket
return socket.create_connection((host, port), timeout)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 61] Connection refused
30.09 22:49:14 werkzeug INFO 127.0.0.1 - - [30/Sep/2013 22:49:14] "POST /accounts/register HTTP/1.1" 500 -

Markdown in body

I would like to propose to allow Markdown as input for the body text in the admin interface. For instance lepture: http://lab.lepture.com/editor/ is a nice editor for this.

Markdown would separate content and design more, while still allowing the use of HTML. What would be the most convenient way to detect which editor to use? I gave it a class markdown-editor or html-editor.

Implementation is really simple with https://flask-misaka.readthedocs.org/en/latest/ and we can always cache the html output, so no performance loss.

Another advantage is that Markdown is easy to read even without parser. This stored in the database can have strong advantages for the eventual API.

Control installed modules via database / remove the auto loader for blueprints

I like the auto-load feature, you just drop a module folder and it is done! but it is error prone and I am already having trouble with naming problems.

Now the idea is to keep the folder /modules and the same blueprint structure, but it will not be autoloaded, to load a blueprint it will need to be activated in admin.

When you upload/extract a module in to /modules it will be automatically added to "available modules" but the default state will be inactive, so in admin you need to click in activate button and then it will perform validations, run the tests and check for naming issues.

It is urgent!

Settings not generic.

Settings are not generic on first install. (mongodb not localhost, secret key not auto-generated, Flask-Mail settings, etc).

How do we want to handle this? I don't mind the settings file like it is, makes for easier provisioning. However, I like the idea of writing the settings file in a wizard-like way, after bootstrap and with a one-time-use admin account.

Render a content in place of channel

In channel, if render_content is selected with a reference to any Content, then this channel url should render the Content detail template/context without redirect.

Role based access control to posts in admin

in admin the access to content needs to be controlled by role.

by default we have admin, moderator, editor, viewer

  • admin (can access all)
  • moderator (can access all content except administration options)
  • editor (can access only the self-created content or content contributed to
  • viewer (can access all read only)

per channel/content access control

Implement a general model AccessControl with roles_accepted definition for read/edit/list/delete

This will be applied for Channel and Content

This should have a default api method to check the permission

The generic views and api should call this method to define if access is allowed.

The admin should query the fields to define the access control.

Multiple authors for content

Each content can have multiple authors.

  • "user" will be the main/origial author.
  • "contributors" will be a reference list of contributors who can edit the content (but not delete)
  • Original author can choose if contributions will be authomatic accept or if it will need to be approved.

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.