Git Product home page Git Product logo

nahan's People

Contributors

selfboot avatar xuelinf 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

nahan's Issues

Problems in install python package.

On Ubuntu:

$ pip install Pillow

may fails with this error:

ValueError: --enable-jpeg requested but jpeg not found, aborting.

When install MySQL-python, may fails too:

rmicro@ubuntu:~$ pip install MySQL-python
Downloading/unpacking MySQL-python
Downloading MySQL-python-1.2.3.tar.gz (70Kb): 70Kb downloaded
Running setup.py egg_info for package MySQL-python
sh: mysql_config: not found
Traceback (most recent call last):
File "", line 14, in
File "/home/rmicro/build/MySQL-python/setup.py", line 15, in
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: mysql_config: not found

Command python setup.py egg_info failed with error code 1

运行报没有数据库的错误

数据库需要怎么初始化啊。。。

sqlalchemy.exc.OperationalError
OperationalError: (_mysql_exceptions.OperationalError) (1049, "Unknown database 'nahan'")

Traceback (most recent call last)
File "C:\NaHan\lib\site-packages\flask\app.py", line 2000, in call
return self.wsgi_app(environ, start_response)
File "C:\NaHan\lib\site-packages\flask\app.py", line 1991, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "C:\NaHan\lib\site-packages\flask\app.py", line 1567, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\NaHan\lib\site-packages\flask\app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "C:\NaHan\lib\site-packages\flask\app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\NaHan\lib\site-packages\flask\app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\NaHan\lib\site-packages\flask\app.py", line 1639, in full_dispatch_request
rv = self.dispatch_request()
File "C:\NaHan\lib\site-packages\flask\app.py", line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File "D:\Git\NaHan\nahan\voice\views.py", line 28, in index
topics = topics_all[offset:offset + per_page]
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\query.py", line 2457, in getitem
return list(res)
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\query.py", line 2761, in iter
return self._execute_and_instances(context)
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\query.py", line 2774, in _execute_and_instances
close_with_result=True)
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\query.py", line 2765, in _connection_from_session
**kw)
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\session.py", line 893, in connection
execution_options=execution_options)
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\session.py", line 898, in _connection_for_bind
engine, execution_options)
File "C:\NaHan\lib\site-packages\sqlalchemy\orm\session.py", line 334, in _connection_for_bind
conn = bind.contextual_connect()
File "C:\NaHan\lib\site-packages\sqlalchemy\engine\base.py", line 2039, in contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "C:\NaHan\lib\site-packages\sqlalchemy\engine\base.py", line 2078, in _wrap_pool_connect
e, dialect, self)
File "C:\NaHan\lib\site-packages\sqlalchemy\engine\base.py", line 1405, in _handle_dbapi_exception_noconnection
exc_info
File "C:\NaHan\lib\site-packages\sqlalchemy\util\compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "C:\NaHan\lib\site-packages\sqlalchemy\engine\base.py", line 2074, in _wrap_pool_connect
return fn()
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 376, in connect
return _ConnectionFairy._checkout(self)
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 713, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 480, in checkout
rec = pool._do_get()
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 1060, in _do_get
self._dec_overflow()
File "C:\NaHan\lib\site-packages\sqlalchemy\util\langhelpers.py", line 60, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 1057, in _do_get
return self._create_connection()
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 323, in _create_connection
return _ConnectionRecord(self)
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 449, in init
self.connection = self.__connect()
File "C:\NaHan\lib\site-packages\sqlalchemy\pool.py", line 607, in __connect
connection = self.__pool.invoke_creator(self)
File "C:\NaHan\lib\site-packages\sqlalchemy\engine\strategies.py", line 97, in connect
return dialect.connect(*cargs, **cparams)
File "C:\NaHan\lib\site-packages\sqlalchemy\engine\default.py", line 385, in connect
return self.dbapi.connect(*cargs, **cparams)
File "C:\NaHan\lib\site-packages\MySQLdb_init
.py", line 81, in Connect
return Connection(*args, **kwargs)
File "C:\NaHan\lib\site-packages\MySQLdb\connections.py", line 193, in init
super(Connection, self).init(*args, **kwargs2)
OperationalError: (_mysql_exceptions.OperationalError) (1049, "Unknown database 'nahan'")
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Append a topic is not convenient

Sometimes the content in the topic may be long, then when one want to add an append, he has to scroll down the page th find the edit box.

timesince may be confused!

Sometimes when we create a topic or have commit a reply, it turns out "-1 years ago" unexpectedly. But when we refresh the page, times seems correct.

Keyword search is not strong enough.

Currently when we search for some key words, it searches in title and content respectively.

keys = keywords.split(' ')
all_topics = set(Topic.query.filter(
    and_(*[Topic.title.like("%" + k + "%") for k in keys])).all())
content_topics = set(Topic.query.filter(
    and_(*[Topic.content.like("%" + k + "%") for k in keys])).all())

Lack of password reset token check!

When one want to reset password, he will get a reset link. The link contains a unique secret key, which is used to access the password reset page. But when I randomly use a key, I can also reach the reset page.

没有这个表?是缺少了建表语句吗?

ProgrammingError: (_mysql_exceptions.ProgrammingError) (1146, "Table 'nahan.topic' doesn't exist") [SQL: u'SELECT topic.id AS topic_id, topic.title AS topic_title, topic.content AS topic_content, topic.content_rendered AS topic_content_rendered, topic.click AS topic_click, topic.reply_count AS topic_reply_count, topic.topic_deleted AS topic_topic_deleted, topic.node_deleted AS topic_node_deleted, topic.user_deleted AS topic_user_deleted, topic.time_created AS topic_time_created, topic.last_replied AS topic_last_replied, topic.user_id AS topic_user_id, topic.node_id AS topic_node_id, topic.appends AS topic_appends, topic.comments AS topic_comments \nFROM topic \nWHERE (topic.topic_deleted = true OR topic.node_deleted = true OR topic.user_deleted = true) = false ORDER BY topic.time_created DESC \n LIMIT %s'] [parameters: (10,)]

It seems the notify is puzzling.

If somebody @me in one topic, and then he edit the topic again(without modify the @me part), I will receive a notify repeatedly.

And what's worse, when some @me firstly, then re-edit the topic and cancel @me. I see one notify which he mention me in the topic, but can't find the @me in the topic after re-edit.

Any way, the notify system need to be improved.

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.