Closed luochun-95 closed 9 years ago
Can you provide more information? which environment, server, etc... is that on development or production?
centos 6.5 (x86_64) , virtualenv , (cms)[root@iZ234c6nhd8Z templates]# rpm -qa | grep relea epel-release-6-8.noarch centos-release-6-5.el6.centos.11.2.x86_64 (cms)[root@iZ234c6nhd8Z templates]# python -V Python 2.7.8
i follow the guide: https://github.com/pythonhub/quokka/wiki/installation
(cms)[root@iZ234c6nhd8Z quokka]# python manage.py show_config 23.08 19:59:09 root INFO registering command list_medias47 23.08 19:59:09 root INFO ['media', 'accounts', 'posts', 'comments'] management commands loaded /usr/local/cms/lib/python2.7/site-packages/flask_script/init.py:153: UserWarning: Options will be ignored. warnings.warn("Options will be ignored.") Config. {'ADMIN': {'name': 'Quokka admin', 'url': '/admin'}, 'ADMIN_THEME': u'cosmo', 'APPLICATION_ROOT': None, 'BABEL_DEFAULT_LOCALE': 'en', 'BABEL_DEFAULT_TIMEZONE': 'UTC', 'BABEL_LANGUAGES': ['en', 'pt-br'], 'BLUEPRINTS_OBJECT_NAME': 'module', 'BLUEPRINTS_PATH': 'modules', 'CACHE_TYPE': 'simple', 'COLLECT_STATIC_ROOT': '/usr/local/cms/cms/quokka/quokka/static', 'CONTENT_EXTENSION': 'html', 'CSRF_ENABLED': True, 'CSRF_SESSION_KEY': 'somethingimpossibletoguess', 'DEALER_PARAMS': {'backends': ('git', 'mercurial', 'simple', 'null')}, 'DEBUG': False, 'DEBUG_TB_INTERCEPT_REDIRECTS': False, 'DEBUG_TB_PANELS': ('flask_debugtoolbar.panels.versions.VersionDebugPanel', 'flask_debugtoolbar.panels.timer.TimerDebugPanel', 'flask_debugtoolbar.panels.headers.HeaderDebugPanel', 'flask_debugtoolbar.panels.request_vars.RequestVarsDebugPanel', 'flask_debugtoolbar.panels.logger.LoggingPanel', 'flask_debugtoolbar.panels.profiler.ProfilerDebugPanel'), 'DEBUG_TB_PROFILER_ENABLED': True, 'DEBUG_TB_TEMPLATE_EDITOR_ENABLED': True, 'DEBUG_TOOLBAR_ENABLED': False, u'DEFAULT_THEME': u'default', 'FILE_ADMIN': [{'category': 'Files', 'endpoint': 'template_files', 'name': 'Template files', 'path': '/usr/local/cms/cms/quokka/quokka/templates', 'roles_accepted': ('admin', 'editor'), 'url': '/template_files/'}, {'category': 'Files', 'endpoint': 'static_files', 'name': 'Static files', 'path': '/usr/local/cms/cms/quokka/quokka/static', 'roles_accepted': ('admin', 'editor'), 'url': '/static/'}, {'category': 'Files', 'endpoint': 'media_files', 'name': 'Media files', 'path': '/usr/local/cms/cms/quokka/quokka/mediafiles', 'roles_accepted': ('admin', 'editor'), 'url': '/mediafiles/'}], 'GRAVATAR': {'default': 'retro', 'force_default': False, 'force_lower': False, 'rating': 'g', 'size': 100}, 'JSONIFY_PRETTYPRINT_REGULAR': True, 'JSON_AS_ASCII': True, 'JSON_SORT_KEYS': True, 'LOGGER_DATE_FORMAT': '%d.%m %H:%M:%S', 'LOGGER_ENABLED': True, 'LOGGER_FORMAT': '%(asctime)s %(name)-12s %(levelname)-8s %(message)s', 'LOGGER_LEVEL': 'DEBUG', 'LOGGER_NAME': 'quokka', 'MAP_STATIC_ROOT': ('/robots.txt', '/sitemap.xml', '/favicon.ico'), 'MAX_CONTENT_LENGTH': None, 'MEDIA_AUDIO_ALLOWED_EXTENSIONS': ('mp3', 'wmv', 'ogg'), 'MEDIA_FILE_ALLOWED_EXTENSIONS': ('pdf', 'txt', 'doc', 'docx', 'xls', 'xmlsx'), 'MEDIA_IMAGE_ALLOWED_EXTENSIONS': ('jpg', 'jpeg', 'png', 'tiff', 'gif', 'bmp'), 'MEDIA_ROOT': '/usr/local/cms/cms/quokka/quokka/mediafiles', 'MEDIA_VIDEO_ALLOWED_EXTENSIONS': ('avi', 'mp4', 'mpeg'), 'MODE': 'production', 'MONGODB_SETTINGS': {'DB': 'my_database', 'PASSWORD': 'demo', 'USERNAME': 'justdemo'}, 'PERMANENT_SESSION_LIFETIME': datetime.timedelta(31), 'PREFERRED_URL_SCHEME': 'http', 'PRESERVE_CONTEXT_ON_EXCEPTION': None, 'PROJECT_ROOT': '/usr/local/cms/cms/quokka/quokka', 'PROPAGATE_EXCEPTIONS': None, 'SECRET_KEY': 'KeepThisS3cr3t', 'SECURITY_BLUEPRINT_NAME': 'security', 'SECURITY_CHANGEABLE': True, 'SECURITY_CHANGE_SALT': 'change-salt', 'SECURITY_CHANGE_URL': '/change', 'SECURITY_CONFIRMABLE': False, 'SECURITY_CONFIRM_EMAIL_WITHIN': '5 days', 'SECURITY_CONFIRM_ERROR_VIEW': None, 'SECURITY_CONFIRM_SALT': 'confirm-salt', 'SECURITY_CONFIRM_URL': '/confirm', 'SECURITY_DEFAULT_HTTP_AUTH_REALM': 'Login Required', 'SECURITY_DEFAULT_REMEMBER_ME': False, 'SECURITY_EMAIL_SENDER': 'reply@localhost', 'SECURITY_EMAIL_SUBJECT_CONFIRM': 'Please confirm your email', 'SECURITY_EMAIL_SUBJECT_PASSWORDLESS': 'Login instructions', 'SECURITY_EMAIL_SUBJECT_PASSWORD_CHANGE_NOTICE': 'Your password has been changed', 'SECURITY_EMAIL_SUBJECT_PASSWORD_NOTICE': 'Your password has been reset', 'SECURITY_EMAIL_SUBJECT_PASSWORD_RESET': 'Password reset instructions', 'SECURITY_EMAIL_SUBJECT_REGISTER': 'Welcome', 'SECURITY_FLASH_MESSAGES': True, 'SECURITY_FORGOT_PASSWORD_TEMPLATE': 'security/forgot_password.html', 'SECURITY_LOGIN_SALT': 'login-salt', 'SECURITY_LOGIN_URL': '/login', 'SECURITY_LOGIN_USER_TEMPLATE': 'security/login_user.html', 'SECURITY_LOGIN_WITHIN': '1 days', 'SECURITY_LOGIN_WITHOUT_CONFIRMATION': True, 'SECURITY_LOGOUT_URL': '/logout', 'SECURITY_MSG_ALREADY_CONFIRMED': ('Your email has already been confirmed.', 'info'), 'SECURITY_MSG_CONFIRMATION_EXPIRED': ('You did not confirm your email within %(within)s. New instructions to confirm your email have been sent to %(email)s.', 'error'), 'SECURITY_MSG_CONFIRMATION_REQUEST': ('Confirmation instructions have been sent to %(email)s.', 'info'), 'SECURITY_MSG_CONFIRMATION_REQUIRED': ('Email requires confirmation.', 'error'), 'SECURITY_MSG_CONFIRM_REGISTRATION': ('Thank you. Confirmation instructions have been sent to %(email)s.', 'success'), 'SECURITY_MSG_DISABLED_ACCOUNT': ('Account is disabled.', 'error'), 'SECURITY_MSG_EMAIL_ALREADY_ASSOCIATED': ('%(email)s is already associated with an account.', 'error'), 'SECURITY_MSG_EMAIL_CONFIRMED': ('Thank you. Your email has been confirmed.', 'success'), 'SECURITY_MSG_EMAIL_NOT_PROVIDED': ('Email not provided', 'error'), 'SECURITY_MSG_INVALID_CONFIRMATION_TOKEN': ('Invalid confirmation token.', 'error'), 'SECURITY_MSG_INVALID_EMAIL_ADDRESS': ('Invalid email address', 'error'), 'SECURITY_MSG_INVALID_LOGIN_TOKEN': ('Invalid login token.', 'error'), 'SECURITY_MSG_INVALID_PASSWORD': ('Invalid password', 'error'), 'SECURITY_MSG_INVALID_REDIRECT': ('Redirections outside the domain are forbidden', 'error'), 'SECURITY_MSG_INVALID_RESET_PASSWORD_TOKEN': ('Invalid reset password token.', 'error'), 'SECURITY_MSG_LOGIN': ('Please log in to access this page.', 'info'), 'SECURITY_MSG_LOGIN_EMAIL_SENT': ('Instructions to login have been sent to %(email)s.', 'success'), 'SECURITY_MSG_LOGIN_EXPIRED': ('You did not login within %(within)s. New instructions to login have been sent to %(email)s.', 'error'), 'SECURITY_MSG_PASSWORDLESS_LOGIN_SUCCESSFUL': ('You have successfuly logged in.', 'success'), 'SECURITY_MSG_PASSWORD_CHANGE': ('You successfully changed your password.', 'success'), 'SECURITY_MSG_PASSWORD_INVALID_LENGTH': ('Password must be at least 6 characters', 'error'), 'SECURITY_MSG_PASSWORD_MISMATCH': ('Password does not match', 'error'), 'SECURITY_MSG_PASSWORD_NOT_PROVIDED': ('Password not provided', 'error'), 'SECURITY_MSG_PASSWORD_RESET': ('You successfully reset your password and you have been logged in automatically.', 'success'), 'SECURITY_MSG_PASSWORD_RESET_EXPIRED': ('You did not reset your password within %(within)s. New instructions have been sent to %(email)s.', 'error'), 'SECURITY_MSG_PASSWORD_RESET_REQUEST': ('Instructions to reset your password have been sent to %(email)s.', 'info'), 'SECURITY_MSG_REFRESH': ('Please reauthenticate to access this page.', 'info'), 'SECURITY_MSG_RETYPE_PASSWORD_MISMATCH': ('Passwords do not match', 'error'), 'SECURITY_MSG_UNAUTHORIZED': ('You do not have permission to view this resource.', 'error'), 'SECURITY_MSG_USER_DOES_NOT_EXIST': ('Specified user does not exist', 'error'), 'SECURITY_PASSWORDLESS': False, 'SECURITY_PASSWORD_HASH': 'pbkdf2_sha512', 'SECURITY_PASSWORD_SALT': '6e95b1ed-a8c3-4da0-8bac-6fcb11c39ab4', 'SECURITY_POST_CHANGE_VIEW': None, 'SECURITY_POST_CONFIRM_VIEW': None, 'SECURITY_POST_LOGIN_VIEW': '/', 'SECURITY_POST_LOGOUT_VIEW': '/', 'SECURITY_POST_REGISTER_VIEW': None, 'SECURITY_POST_RESET_VIEW': None, 'SECURITY_RECOVERABLE': True, 'SECURITY_REGISTERABLE': True, 'SECURITY_REGISTER_URL': '/register', 'SECURITY_REGISTER_USER_TEMPLATE': 'security/register_user.html', 'SECURITY_REMEMBER_SALT': 'remember-salt', 'SECURITY_RESET_PASSWORD_TEMPLATE': 'security/reset_password.html', 'SECURITY_RESET_PASSWORD_WITHIN': '5 days', 'SECURITY_RESET_SALT': 'reset-salt', 'SECURITY_RESET_URL': '/reset', 'SECURITY_SEND_CONFIRMATION_TEMPLATE': 'security/send_confirmation.html', 'SECURITY_SEND_LOGIN_TEMPLATE': 'security/send_login.html', 'SECURITY_SEND_PASSWORD_CHANGE_EMAIL': True, 'SECURITY_SEND_REGISTER_EMAIL': False, 'SECURITY_SUBDOMAIN': None, 'SECURITY_TOKEN_AUTHENTICATION_HEADER': 'Authentication-Token', 'SECURITY_TOKEN_AUTHENTICATION_KEY': 'auth_token', 'SECURITY_TRACKABLE': True, 'SECURITY_UNAUTHORIZED_VIEW': None, 'SECURITY_URL_PREFIX': '/accounts', 'SEND_FILE_MAX_AGE_DEFAULT': 43200, 'SENTRY_DSN': '', 'SENTRY_ENABLED': False, 'SERVER_NAME': None, 'SESSION_COOKIE_DOMAIN': None, 'SESSION_COOKIE_HTTPONLY': True, 'SESSION_COOKIE_NAME': 'session', 'SESSION_COOKIE_PATH': None, 'SESSION_COOKIE_SECURE': False, 'SMART_SLUG_ENABLED': False, 'STATIC_ROOT': '/usr/local/cms/cms/quokka/quokka/static', 'TESTING': False, 'TRAP_BAD_REQUEST_ERRORS': False, 'TRAP_HTTP_EXCEPTIONS': False, 'USE_X_SENDFILE': False, 'WTF_CSRF_ENABLED': True, 'WTF_CSRF_METHODS': ['POST', 'PUT', 'PATCH'], 'WTF_CSRF_SSL_STRICT': True}
this project is very good . but The project is currently undergoing beta-tests. i hope : As soon as possible a stable version
I can verify the tests run fine in python-2.7, with the exception that "nose" was not in the requirements.txt, so I had to pip install that separately.
$ python runtests.py
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
.......................................
----------------------------------------------------------------------
Ran 39 tests in 7.448s
OK
(Apparently I'm missing 'coverage' as well.)
Here's the result after installing coverage:
$ python runtests.py
.......................................
Name Stmts Miss Cover Missing
---------------------------------------------------------------
quokka 47 18 62% 21-24, 35-36, 41, 55, 59-73
quokka.contrib 0 0 100%
quokka.core 1 0 100%
quokka.core.admin 68 12 82% 51-54, 73-82, 136-137, 146
quokka.core.admin.ajax 21 13 38% 16-36
quokka.core.admin.fields 44 25 43% 21-29, 38-45, 50, 61-91
quokka.core.admin.models 142 76 46% 34-43, 49-55, 58-61, 65, 71-72, 80-86, 90-94, 101-113, 136, 139-142, 150-155, 166-181, 185-187, 198-205, 322-325
quokka.core.admin.utils 7 1 86% 15
quokka.core.admin.views 42 3 93% 16, 24-27
quokka.core.app 3 0 100%
quokka.core.cache 2 0 100%
quokka.core.db 4 0 100%
quokka.core.fields 87 36 59% 16, 21, 27-29, 35-36, 44, 51-61, 67-72, 77-80, 85-95, 117-118
quokka.core.models 344 87 75% 97, 101-105, 153, 157-163, 166, 173, 179-180, 201, 212, 245-248, 251-256, 296, 306-308, 311, 323, 329, 335, 394-395, 398-402, 406-407, 410, 422-425, 445-446, 449, 465-470, 478, 481, 508-514, 520-533, 539-543, 547, 557, 571-573, 578-581, 589
quokka.core.templates 10 7 30% 8-16
quokka.core.views 183 141 23% 23-46, 49-107, 120-184, 187-223, 226-229, 238-253, 262-271, 274-275, 280-282, 288, 291-314, 323-356, 362-372, 377-387
quokka.core.widgets 31 14 55% 20-32, 41-50
quokka.ext 42 8 81% 20, 45-49, 57-58
quokka.ext.babel 4 0 100%
quokka.ext.before_request 3 1 67% 9
quokka.ext.blueprints 54 28 48% 49-51, 60-61, 69-103
quokka.ext.context_processors 6 2 67% 11-12
quokka.ext.error_handlers 10 4 60% 18, 35, 46, 50
quokka.ext.fixtures 15 9 40% 11-12, 15-21
quokka.ext.generic 8 0 100%
quokka.ext.oauthlib 26 18 31% 55-88
quokka.ext.template_filters 23 10 57% 17-20, 24-27, 31-34
quokka.ext.themes 11 2 82% 15-16
quokka.ext.views 29 6 79% 13-15, 20-26, 30, 34
quokka.modules 0 0 100%
quokka.modules.accounts 2 0 100%
quokka.modules.accounts.admin 23 4 83% 25-28
quokka.modules.accounts.models 65 7 89% 52-53, 63-65, 90, 107
quokka.modules.accounts.oauth 52 45 13% 10-12, 16-17, 21-29, 40-106
quokka.modules.comments 4 0 100%
quokka.modules.comments.admin 11 0 100%
quokka.modules.comments.models 26 6 77% 20-22, 30-31, 39
quokka.modules.comments.views 25 14 44% 20-21, 27, 30-43
quokka.modules.media 2 0 100%
quokka.modules.media.admin 51 3 94% 99-102
quokka.modules.media.controller 18 8 56% 9, 12, 15, 18, 21, 24, 27, 30
quokka.modules.media.models 31 7 77% 26-31, 39
quokka.modules.posts 2 0 100%
quokka.modules.posts.admin 10 0 100%
quokka.modules.posts.models 4 0 100%
quokka.settings 49 0 100%
quokka.utils 19 7 63% 21-29
quokka.utils.atom 174 148 15% 37-42, 48, 102-134, 141-145, 148, 157-208, 212, 216, 220, 223, 271-299, 302, 309-341, 345, 348
quokka.utils.populate 143 16 89% 74-75, 79, 108-109, 112, 130-131, 136, 163, 186-188, 199-201
quokka.utils.routing 7 0 100%
quokka.utils.text 20 0 100%
quokka.utils.upload 25 15 40% 11-26, 30-33
---------------------------------------------------------------
TOTAL 2030 801 61%
----------------------------------------------------------------------
Ran 39 tests in 9.116s
OK
The syntax issue does seem to be related to 2.6 vs 2.7.
for testing, you need to install the requirements_test.txt file
:+1:
but @vwbusguy , i think your comment was in the wrong issue . I am closing #165 since the problem is resolved.
221.238.196.47 - - [21/Aug/2014 13:46:52] "GET /admin/post/?sort=3&page=6 HTTP/1.1" 200 - Traceback (most recent call last): File "/usr/local/python/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock self.process_request(request, client_address) File "/usr/local/python/lib/python2.7/SocketServer.py", line 321, in process_request self.finish_request(request, client_address) File "/usr/local/python/lib/python2.7/SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/local/python/lib/python2.7/SocketServer.py", line 653, in init self.finish() File "/usr/local/python/lib/python2.7/SocketServer.py", line 712, in finish self.wfile.close() File "/usr/local/python/lib/python2.7/socket.py", line 279, in close self.flush() File "/usr/local/python/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe 221.238.196.47 - - [21/Aug/2014 13:46:53] "GET /admin/post/?sort=3&page=6 HTTP/1.1" 200 - Traceback (most recent call last): File "/usr/local/python/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock self.process_request(request, client_address) File "/usr/local/python/lib/python2.7/SocketServer.py", line 321, in process_request self.finish_request(request, client_address) File "/usr/local/python/lib/python2.7/SocketServer.py", line 334, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/local/python/lib/python2.7/SocketServer.py", line 653, in init self.finish() File "/usr/local/python/lib/python2.7/SocketServer.py", line 712, in finish self.wfile.close() File "/usr/local/python/lib/python2.7/socket.py", line 279, in close self.flush() File "/usr/local/python/lib/python2.7/socket.py", line 303, in flush self._sock.sendall(view[write_offset:write_offset+buffer_size]) error: [Errno 32] Broken pipe
quokka crashed.