Git Product home page Git Product logo

maple-blog's Introduction

maple-blog

https://img.shields.io/badge/license-GPL3.0-blue.svg https://img.shields.io/badge/python-3.5-green.svg

This is my own blog website by flask

You can have a look here

How to use

Install necessary package

pip install -r requirements.txt

Configure

remember to modify config.py

emacs config.py

Initialization sql

$ python runserver.py db init
$ python runserver.py db migrate
$ python runserver.py db upgrade

or

$ python runserver.py db initdb

Create superuser

python runserver.py create-user

Run

python runserver.py

maple-blog's People

Contributors

honmaple 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

maple-blog's Issues

初始化数据库时导入错误

ImportError: cannot import name 'url_encode'

在执行初始化数据库时发生导入错误,请问如何解决?

tom@Evertears:~/maple-blog$ python3 runserver.py db init
Traceback (most recent call last):
File "runserver.py", line 25, in
from maple import create_app
File "/home/tom/maple-blog/maple/init.py", line 11, in
from maple import extension, router, jinja, admin, alias, api
File "/home/tom/maple-blog/maple/extension/init.py", line 15, in
from flask_wtf.csrf import CSRFProtect
File "/home/tom/.local/lib/python3.5/site-packages/flask_wtf/init.py", line 17, in
from .recaptcha import *
File "/home/tom/.local/lib/python3.5/site-packages/flask_wtf/recaptcha/init.py", line 2, in
from .fields import *
File "/home/tom/.local/lib/python3.5/site-packages/flask_wtf/recaptcha/fields.py", line 3, in
from . import widgets
File "/home/tom/.local/lib/python3.5/site-packages/flask_wtf/recaptcha/widgets.py", line 5, in
from werkzeug import url_encode
ImportError: cannot import name 'url_encode'

new version of maple-blog has some Defect

Today i re pull the code from github,
but when i init maple db ,system return message is:

(py36) bogon:maple-blog dog$ python manager.py db init
Traceback (most recent call last):
  File "manager.py", line 12, in <module>
    from maple import create_app
  File "/Users/dog/maple-blog/maple/__init__.py", line 15, in <module>
    from .urls import register_routes
  File "/Users/dog/maple-blog/maple/urls.py", line 15, in <module>
    from maple.blog.urls import site as blog_site
  File "/Users/dog/maple-blog/maple/blog/urls.py", line 14, in <module>
    from .views import (BlogListView, BlogView, BlogRssView, BlogArchiveView,
  File "/Users/dog/maple-blog/maple/blog/views.py", line 21, in <module>
    from .filters import safe_markdown
  File "/Users/olddog/maple-blog/maple/blog/filters.py", line 18, in <module>
    from fortune import fortune
  File "/Users/olddog/.virtualenvs/py36/lib/python3.6/site-packages/fortune/__init__.py", line 183
    raise ValueError, 'Can\'t find file "%s"' % fortune_index_file
                    ^
SyntaxError: invalid syntax

使用ubuntu安装时发生错误

Rolling back uninstall of cffi
Moving to /home/tom/anaconda3/lib/python3.7/site-packages/cffi_backend.cpython-37m-x86_64-linux-gnu.so
from /tmp/pip-uninstall-3auvpro
/_cffi_backend.cpython-37m-x86_64-linux-gnu.so
Moving to /home/tom/anaconda3/lib/python3.7/site-packages/cffi-1.12.2.dist-info/
from /home/tom/anaconda3/lib/python3.7/site-packages/~ffi-1.12.2.dist-info
Moving to /home/tom/anaconda3/lib/python3.7/site-packages/cffi/
from /home/tom/anaconda3/lib/python3.7/site-packages/~ffi
Command "/home/tom/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-zbhm6q3u/cffi/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-rnz0l8ky/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-zbhm6q3u/cffi/

Error: No such command "db".

run: python3 runserver.py db init

re:

Usage: runserver.py [OPTIONS] COMMAND [ARGS]...
Try "runserver.py --help" for help.

Error: No such command "db".

runserver.py line 27:from maple.extension import cache, db
no such files?
是因为extension没有包文件?

there is a error message when i run python manager.py db init

Hello(您好)

I had download flask-maple from github ,and i had run 'python setup.py install ' in flask-maple directory and ....but, when i run 'python manager.py db init' ,there is a error message

Traceback (most recent call last):
File "manager.py", line 12, in
from maple import create_app
File "/Users/tjrb/maple-blog/maple/init.py", line 12, in
from .extensions import register_maple
File "/Users/tjrb/maple-blog/maple/extensions.py", line 17, in
from flask_maple.mail import MapleMail
ImportError: cannot import name 'MapleMail'

@honmaple

运行之后报404 not found

请求url:http://127.0.0.1:8001/

WARNING in error [/usr/local/lib/python3.7/site-packages/flask_maple/error.py:35]:
404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

127.0.0.1 - - [16/Oct/2019 15:36:12] "GET / HTTP/1.1" 404 -

How to use 问题

pip install -r requestments.txt

re:
Could not open requirements file: [Errno 2] No such file or directory: 'requestments.txt'

实际文件名应该是requirements.txt

When i run pip for install package ,there is a error message

Python version:3/6
pip: 9.0.1
When i Install necessary package by using 'pip install -r requestments.txt ' , there is a error message:
‘’‘
Could not find a version that satisfies the requirement Flask-SQLAlchemy==3.0.dev20161113 (from -r ./requirements.txt (line 16)) (from versions: 0.5, 0.6, 0.9, 0.9.1, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 1.0, 2.0, 2.1, 2.2)
No matching distribution found for Flask-SQLAlchemy==3.0.dev20161113 (from -r ./requirements.txt (line 16))
’‘’

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.