Giter VIP home page Giter VIP logo

flask-cms's Introduction

Flask CMS

A full cms, implemented in python, built on top of Flask-XXL

for documentation on layout, concepts etc.. see the Flask-XXL wiki

Templates
Blocks
Pages
Blogs
tags
Comments

to try it out just use docker-compose:

  • first checkout the repo
    • git clone https://github.com/jstacoder/flask-cms.git && cd flask-cms
  • then build the app using docker compose
    • docker-compose build
  • then if this is the first time you've ran this you need to initalize your database
    • docker-compose run app /initalize.sh
  • and now you can go ahead and run the app
    • docker-compose up

after a few seconds you should see:

 * Running on http://0.0.0.0:5000/
 * Restarting with reloader

then just connect to your docker ip address,
proably just localhost

flask-cms's People

Contributors

bitdeli-chef avatar jstacoder avatar yasoob 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

flask-cms's Issues

No module named test_jinja

The file views.py in core has the line from test_jinja import main,row,col, but there is no file test_jinja.py in the package.

ImportError: No module named core

One more ;-) Core.views doesn't find core.init to load the blueprint

File "manage.py", line 11, in
from app import app
File "/var/www/flask-cms/flask_cms/app.py", line 12, in
app = AppFactory(DevelopmentConfig).get_app(name)
File "/var/www/flask-cms/flask_cms/main/factory.py", line 40, in get_app
self._register_blueprints()
File "/var/www/flask-cms/flask_cms/main/factory.py", line 91, in _register_blueprints
module, b_name = self._get_imported_stuff_by_path(blueprint_path)
File "/var/www/flask-cms/flask_cms/main/factory.py", line 49, in _get_imported_stuff_by_path
module = import_string(module_name)
File "/home/ondoheer/.virtualenvs/flask-cms/lib/python2.7/site-packages/werkzeug/utils.py", line 426, in import_string
sys.exc_info()[2])
File "/home/ondoheer/.virtualenvs/flask-cms/lib/python2.7/site-packages/werkzeug/utils.py", line 408, in import_string
return import(import_name)
File "/var/www/flask-cms/flask_cms/core/init.py", line 12, in
from views import *
File "/var/www/flask-cms/flask_cms/core/views.py", line 8, in
from .core import core
werkzeug.utils.ImportStringError: import_string() failed for 'core'. Possible reasons are:

  • missing init.py in a package;
  • package or module path not included in sys.path;
  • duplicated package or module name taking precedence in sys.path;
  • missing module, class, function or variable;

Debugged import:

  • 'core' not found.

Original exception:

ImportError: No module named core

MySQL setup

Really cool project, but I'm having trouble getting it off the ground where the database is concerned. I'm just wondering if you could document what's required to setup the db. Thanks, and great work!

sqlalchemy.exc.InvalidRequestError: Table 'directories' is already defined for this MetaData instance.

I get the following traceback when running `python manage.py db upgrade:

(venv)chris@chris-NE56R:~/devops/rodandfly/flask-cms/flask_cms$ python manage.py db upgrade
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    from app import app
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/app.py", line 12, in <module>
    app = AppFactory(DevelopmentConfig).get_app(__name__)
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/main/factory.py", line 41, in get_app
    self._register_routes()
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/main/factory.py", line 106, in _register_routes
    module,r_name = self._get_imported_stuff_by_path(url_module)
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/main/factory.py", line 49, in _get_imported_stuff_by_path
    module = import_string(module_name)
  File "/home/chris/devops/rodandfly/flask-cms/venv/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/utils.py", line 414, in import_string
    return getattr(__import__(module, None, None, [obj]), obj)
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/fileviewer/__init__.py", line 8, in <module>
    from models import *
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/fileviewer/models.py", line 14, in <module>
    class Directory(BaseMixin):
  File "/home/chris/devops/rodandfly/flask-cms/venv/local/lib/python2.7/site-    packages/Flask_SQLAlchemy-2.0-py2.7.egg/flask_sqlalchemy/__init__.py", line 536, in __init__
    DeclarativeMeta.__init__(self, name, bases, d)
  File "/home/chris/devops/rodandfly/flask-cms/venv/local/lib/python2.7/site-packages/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/ext/declarative/api.py", line 55, in __init__
    _as_declarative(cls, classname, cls.__dict__)
  File "/home/chris/devops/rodandfly/flask-cms/venv/local/lib/python2.7/site-packages/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/ext/declarative/base.py", line 254, in _as_declarative
    **table_kw)
  File "/home/chris/devops/rodandfly/flask-cms/venv/local/lib/python2.7/site-packages/SQLAlchemy-0.9.8-py2.7-linux-x86_64.egg/sqlalchemy/sql/schema.py", line 393, in __new__
    "existing Table object." % key)
sqlalchemy.exc.InvalidRequestError: Table 'directories' is already defined for this MetaData instance.  Specify 'extend_existing=True' to redefine options and columns on an existing Table object.

Note: this is after my requirements.txt modifications from my previous issues.

Thanks in advance for your help
Chris

Odd exception when trying to test.

I built a fresh virtual enviroment (python 2.7) and ran python setup.py in it. Everything seems to install without a hitch. I add local_settings.py. When I run python manage.py db update I get the following error:

Traceback (most recent call last):
    File "manage.py", line 11, in <module>
     from app import app
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/app.py", line 12, in <module>
     app = AppFactory(DevelopmentConfig).get_app(__name__)
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/main/factory.py", line 40, in get_app
     self._register_blueprints()
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/main/factory.py", line 91, in _register_blueprints
     module, b_name = self._get_imported_stuff_by_path(blueprint_path)
   File "/home/chris/devops/rodandfly/flask-cms/flask_cms/main/factory.py", line 49, in _get_imported_stuff_by_path
         module = import_string(module_name)
  File "/home/chris/.virtualenvs/venv/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/utils.py", line 426, in import_string
    sys.exc_info()[2])
  File "/home/chris/.virtualenvs/venv/local/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/utils.py", line 408, in import_string
     return __import__(import_name)
  File "/home/chris/devops/rodandfly/flask-cms/flask_cms/core/__init__.py", line 12, in <module>
     from views import *
   File "/home/chris/devops/rodandfly/flask-cms/flask_cms/core/views.py", line 10, in <module>
     from flask_cms.blog.models import Category,Tag
    File "/home/chris/devops/rodandfly/flask-cms/flask_cms/blog/models.py", line 9, in <module>
     from flask_xxl.basemodels import BaseMixin
   File "/home/chris/.virtualenvs/venv/local/lib/python2.7/site-packages/flask_xxl-0.6.6-py2.7.egg/flask_xxl/basemodels.py", line 11, in <module>
     from flask.ext.sqlalchemy import SQLAlchemy, _BoundDeclarativeMeta, _QueryProperty, sessionmaker
   File "/home/chris/.virtualenvs/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/exthook.py", line 87, in load_module
    raise ImportError('No module named %s' % fullname)
 werkzeug.utils.ImportStringError: import_string() failed for 'core'. Possible reasons are:

  - missing __init__.py in a package;
  - package or module path not included in sys.path;
  - duplicated package or module name taking precedence in sys.path;
  - missing module, class, function or variable;

 Debugged import:

 - 'core' not found.

 Original exception:

 ImportError: No module named flask.ext.sqlalchemy.sessionmaker

Am I missing something?

exception on running manage.py

Hi, I was trying out the project, and I ran into a problem running manage.py for the first time:

python manage.py db upgrade yielded:

werkzeug.utils.ImportStringError: import_string() failed for 'flask_cms.core.urls'. Possible reasons are:

- missing __init__.py in a package;
- package or module path not included in sys.path;
- duplicated package or module name taking precedence in sys.path;
- missing module, class, function or variable;

Debugged import:

- 'flask_cms' found in '/Users/jamie/Code/flask-cms/venv/lib/python2.7/site-packages/flask_cms-0.0.1-py2.7.egg/flask_cms/__init__.pyc'.
- 'flask_cms.core' not found.

Original exception:

ImportError: No module named core.urls

update

I did some debugging as the error is just an import problem. seems like the numerous import statements starting with flask_cms.* aren't being found. Since this seemed like it could be a problem with the package name being there, I removed the flask_cms. from them all, which cured the import errors, and allowed the app to start, unfortunately, the result is that going to localhost:8088 (where the output of ./start.sh indicated the page should be found in my case) resulted in no useful output from the dev server to the browser. The interpreter did yield 127.0.0.1 - - [22/Jan/2016 21:15:42] "GET / HTTP/1.1" 200 - but nothing was visible in the browser.

update2

determined that the empty output is due to a blank file at flask_cms/core/templates/test_grid.html

/admin/add/block

File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask_debugtoolbar/init.py", line 125, in dispatch_request
return view_func(**req.view_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/cProfile.py", line 149, in runcall
return func(_args, *_kw)
File "/Users/tanyewei/dev/flask-cms/flask_cms/admin/utils.py", line 107, in wrapper
return view(_args, *_kwargs)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/views.py", line 84, in view
return self.dispatch_request(_args, *_kwargs)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/views.py", line 149, in dispatch_request
return meth(_args, *_kwargs)
File "/Users/tanyewei/dev/flask-cms/flask_cms/admin/views.py", line 258, in get
return self.render()
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask_xxl/baseviews.py", line 36, in render
return render_template(self._template,**self._context)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template
context, ctx.app)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/flask/templating.py", line 110, in _render
rv = template.render(context)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/tanyewei/dev/flask-cms/flask_cms/admin/templates/add.html", line 3, in top-level template code
{% from 'buttons2.html' import get_button as Button %}
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/jinja2/environment.py", line 1029, in module
self._module = rv = self.make_module()
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/jinja2/environment.py", line 1013, in make_module
return TemplateModule(self, self.new_context(vars, shared, locals))
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/jinja2/environment.py", line 1070, in init
self._body_stream = list(template.root_render_func(context))
File "/Users/tanyewei/dev/flask-cms/flask_cms/templates/buttons2.html", line 47, in top-level template code
{%- if args['type'] == 'link' -%}
File "/Users/tanyewei/dev/flask-cms/env/lib/python2.7/site-packages/jinja2/environment.py", line 378, in getitem
return obj[argument]

AttributeError: 'bool' object has no attribute 'upper'

D:\flask\flask-cms\flask_cms>venv\Scripts\activate
(venv) D:\flask\flask-cms\flask_cms>python manage.py db upgrade
Traceback (most recent call last):
File "manage.py", line 11, in
from app import app
File "D:\flask\flask-cms\flask_cms\app.py", line 12, in
app = AppFactory(DevelopmentConfig).get_app(name)
File "D:\flask\flask-cms\flask_cms\main\factory.py", line 37, in get_app
self.app.config.from_envvar(self.app_envvar, silent=True)
File "d:\flask\flask-cms\flask_cms\venv\lib\site-packages\flask\config.py", li
ne 99, in from_envvar
rv = os.environ.get(variable_name)
File "d:\flask\flask-cms\flask_cms\venv\lib\os.py", line 447, in get
return self.data.get(key.upper(), failobj)
AttributeError: 'bool' object has no attribute 'upper'

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.