Closed pmarkun closed 5 years ago
Opa, Pedro. Provavelmente deve estar faltando rodar o comando
python3 src/manage.py collectstatic_js_reverse
DoesNotExist at /dashboard/editor/document/2/save/ ExcerptType matching query does not exist.
Request Method: POST Request URL: http://legislaaqui.marinahelou.com.br/dashboard/editor/document/2/save/ Django Version: 2.2.1 Python Executable: /usr/bin/python3 Python Version: 3.6.7 Python Path: ['/home/marinahelou/wikilegis/src', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/home/marinahelou/emandato/src/oauth2client', '/usr/lib/python3/dist-packages'] Server time: Seg, 23 Set 2019 15:40:03 -0300 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django_registration', 'compressor', 'compressor_toolkit', 'django_extensions', 'rest_framework', 'django_filters', 'django_js_reverse', 'constance', 'constance.backends.database', 'apps.accounts', 'apps.participations', 'apps.projects', 'apps.notifications', 'apps.api', 'apps.dashboard'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/exception.py" in inner
File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.6/dist-packages/django/core/handlers/base.py" in _get_response
File "/usr/local/lib/python3.6/dist-packages/django/views/generic/base.py" in view
File "/usr/local/lib/python3.6/dist-packages/django/utils/decorators.py" in _wrapper
File "/usr/local/lib/python3.6/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view
File "/usr/local/lib/python3.6/dist-packages/django/utils/decorators.py" in _wrapper
File "/home/marinahelou/wikilegis/src/utils/decorators.py" in wrap
File "/usr/local/lib/python3.6/dist-packages/django/views/generic/base.py" in dispatch
File "/home/marinahelou/wikilegis/src/apps/dashboard/views.py" in post
File "/home/marinahelou/wikilegis/src/apps/projects/parser.py" in parse_html
File "/usr/local/lib/python3.6/dist-packages/django/db/models/manager.py" in manager_method
File "/usr/local/lib/python3.6/dist-packages/django/db/models/query.py" in get
Exception Type: DoesNotExist at /dashboard/editor/document/2/save/ Exception Value: ExcerptType matching query does not exist. Request information: USER: admin
GET: No GET data
POST: pk = '2' html = '
Aaa.
' autoSave = 'false' name = 'Oi'FILES: No FILES data
COOKIES: _ga = 'GA1.3.37493681.1568049601' csrftoken = 'mIw6HsKB9aHoeW6kfVHQ2NAP4vJDXJraxgLdCGfALzdb49tvhH0DrKTXtaL8gqhI' sessionid = 'h23ykvxcv43pini4l11j7dfrboa1s4rd' modifyExcerptTip = 'true'
META: CONTENT_LENGTH = '254' CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8' CONTEXT_DOCUMENT_ROOT = '/var/www/html' CONTEXT_PREFIX = '' CSRF_COOKIE = 'mIw6HsKB9aHoeW6kfVHQ2NAP4vJDXJraxgLdCGfALzdb49tvhH0DrKTXtaL8gqhI' DOCUMENT_ROOT = '/var/www/html' GATEWAY_INTERFACE = 'CGI/1.1' HTTP_ACCEPT = '/' HTTP_ACCEPT_ENCODING = 'gzip, deflate' HTTP_ACCEPT_LANGUAGE = 'pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7' HTTP_CACHE_CONTROL = 'no-cache' HTTP_CONNECTION = 'keep-alive' HTTP_COOKIE = '_ga=GA1.3.37493681.1568049601; csrftoken=mIw6HsKB9aHoeW6kfVHQ2NAP4vJDXJraxgLdCGfALzdb49tvhH0DrKTXtaL8gqhI; sessionid=h23ykvxcv43pini4l11j7dfrboa1s4rd; modifyExcerptTip=true' HTTP_DNT = '1' HTTP_HOST = 'legislaaqui.marinahelou.com.br' HTTP_ORIGIN = 'http://legislaaqui.marinahelou.com.br' HTTP_PRAGMA = 'no-cache' HTTP_REFERER = 'http://legislaaqui.marinahelou.com.br/dashboard/editor/document/2' HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36' HTTP_X_CSRFTOKEN = 'mIw6HsKB9aHoeW6kfVHQ2NAP4vJDXJraxgLdCGfALzdb49tvhH0DrKTXtaL8gqhI' HTTP_X_REQUESTED_WITH = 'XMLHttpRequest' PATH_INFO = '/dashboard/editor/document/2/save/' PATH_TRANSLATED = '/home/marinahelou/wikilegis/src/wikilegis/wsgi.py/dashboard/editor/document/2/save/' QUERY_STRING = '' REMOTE_ADDR = '200.144.27.194' REMOTE_PORT = '49880' REQUEST_METHOD = 'POST' REQUEST_SCHEME = 'http' REQUEST_URI = '/dashboard/editor/document/2/save/' SCRIPT_FILENAME = '/home/marinahelou/wikilegis/src/wikilegis/wsgi.py' SCRIPT_NAME = '' SERVER_ADDR = '31.220.49.123' SERVER_ADMIN = '[no address given]' SERVER_NAME = 'legislaaqui.marinahelou.com.br' SERVER_PORT = '80' SERVER_PROTOCOL = 'HTTP/1.1' SERVER_SIGNATURE = '
Apache/2.4.29 (Ubuntu) Server at legislaaqui.marinahelou.com.br Port 80\n' SERVER_SOFTWARE = 'Apache/2.4.29 (Ubuntu)' apache.version = '(2, 4, 27)' mod_wsgi.application_group = 'vps43852404.local|' mod_wsgi.callable_object = 'application' mod_wsgi.daemon_connects = '1' mod_wsgi.daemon_restarts = '0' mod_wsgi.daemon_start = '1569264002755523' mod_wsgi.enable_sendfile = '0' mod_wsgi.handler_script = '' mod_wsgi.ignore_activity = '0' mod_wsgi.listener_host = '' mod_wsgi.listener_port = '80' mod_wsgi.path_info = '/dashboard/editor/document/2/save/' mod_wsgi.process_group = 'wikilegis' mod_wsgi.queue_start = '1569264002755304' mod_wsgi.request_handler = 'wsgi-script' mod_wsgi.request_id = '2Glxv8ymP4w' mod_wsgi.request_start = '1569264002755032' mod_wsgi.script_name = '' mod_wsgi.script_reloading = '1' mod_wsgi.script_start = '1569264002755768' mod_wsgi.thread_id = 1 mod_wsgi.thread_requests = 3 mod_wsgi.total_requests = 6 mod_wsgi.version = '(4, 5, 17)' wsgi.errors = <_io.TextIOWrapper name='Settings: Using settings module wikilegis.settings ABSOLUTE_URL_OVERRIDES = {} ADMINS = [] ALLOWED_HOSTS = ['*'] APPEND_SLASH = True AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend'] AUTH_PASSWORD_VALIDATORS = '****' AUTH_USER_MODEL = 'auth.User' BASE_DIR = '/home/marinahelou/wikilegis/src' CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} CACHE_MIDDLEWARE_ALIAS = 'default' CACHE_MIDDLEWARE_KEY_PREFIX = '****' CACHE_MIDDLEWARE_SECONDS = 600 COMPRESSORS = {'css': 'compressor.css.CssCompressor', 'js': 'compressor.js.JsCompressor'} COMPRESS_CACHEABLE_PRECOMPILERS = '()' COMPRESS_CACHE_BACKEND = 'default' COMPRESS_CACHE_KEY_FUNCTION = '****' COMPRESS_CLEAN_CSS_ARGUMENTS = '' COMPRESS_CLEAN_CSS_BINARY = 'cleancss' COMPRESS_CLOSURE_COMPILER_ARGUMENTS = '' COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar' COMPRESS_CSS_HASHING_METHOD = 'mtime' COMPRESS_DATA_URI_MAX_SIZE = 1024 COMPRESS_DEBUG_TOGGLE = None COMPRESS_ENABLED = False COMPRESS_FILTERS = {'css': ['compressor.filters.css_default.CssAbsoluteFilter'], 'js': ['compressor.filters.jsmin.JSMinFilter']} COMPRESS_JINJA2_GET_ENVIRONMENT = <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7f267c0d9400> COMPRESS_MINT_DELAY = 30 COMPRESS_MTIME_DELAY = 10 COMPRESS_NODE_MODULES = '/home/marinahelou/wikilegis/node_modules' COMPRESS_NODE_SASS_BIN = '/home/marinahelou/wikilegis/node_modules/.bin/node-sass' COMPRESS_OFFILNE = False COMPRESS_OFFLINE = False COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/static/'} COMPRESS_OFFLINE_MANIFEST = 'manifest.json' COMPRESS_OFFLINE_TIMEOUT = 31536000 COMPRESS_OUTPUT_DIR = 'CACHE' COMPRESS_PARSER = 'compressor.parser.AutoSelectParser' COMPRESS_POSTCSS_BIN = '/home/marinahelou/wikilegis/node_modules/.bin/postcss' COMPRESS_PRECOMPILERS = "(('text/x-scss', 'compressor_toolkit.precompilers.SCSSCompiler'),)" COMPRESS_REBUILD_TIMEOUT = 2592000 COMPRESS_ROOT = '/home/marinahelou/wikilegis/src/public/static' COMPRESS_SCSS_COMPILER_CMD = '{node_sass_bin} --source-map true --source-map-embed true --source-map-contents true --output-style expanded {paths} "{infile}" "{outfile}" && {postcss_bin} --use "{node_modules}/postcss-font-magician" --use "{node_modules}/autoprefixer" --autoprefixer.browsers "{autoprefixer_browsers}" -r "{outfile}"' COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage' COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/static/'} COMPRESS_URL = '/static/' COMPRESS_URL_PLACEHOLDER = '/compressor_url_placeholder/' COMPRESS_VERBOSE = False COMPRESS_YUGLIFY_BINARY = 'yuglify' COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal' COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal' COMPRESS_YUI_BINARY = 'java -jar yuicompressor.jar' COMPRESS_YUI_CSS_ARGUMENTS = '' COMPRESS_YUI_JS_ARGUMENTS = '' CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend' CONSTANCE_CONFIG = {'USE_CD_OPEN_DATA': (True, 'Get document information from Câmara dos Deputados open data', <class 'bool'>), 'CD_OPEN_DATA_URL': ('https://dadosabertos.camara.leg.br/api/v2/', 'Câmara dos Deputados open data API'), 'CD_CURRENT_LEGISLATURE': ('56', 'Câmara dos Deputados current legislature')} CSRF_COOKIE_AGE = 31449600 CSRF_COOKIE_DOMAIN = None CSRF_COOKIE_HTTPONLY = False CSRF_COOKIE_NAME = 'csrftoken' CSRF_COOKIE_PATH = '/' CSRF_COOKIE_SAMESITE = 'Lax' CSRF_COOKIE_SECURE = False CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN' CSRF_TRUSTED_ORIGINS = [] CSRF_USE_SESSIONS = False DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': '/home/marinahelou/wikilegis/src/db.sqlite3', 'USER': '', 'PASSWORD': '****', 'HOST': '', 'PORT': '', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}} DATABASE_ROUTERS = [] DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATETIME_FORMAT = 'N j, Y, P' DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] DATE_FORMAT = 'N j, Y' DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] DEBUG = True DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = '.' DEFAULT_CHARSET = 'utf-8' DEFAULT_CONTENT_TYPE = 'text/html' DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL = '' DEFAULT_INDEX_TABLESPACE = '' DEFAULT_TABLESPACE = '' DISALLOWED_USER_AGENTS = [] EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_HOST_PASSWORD = '****' EMAIL_HOST_USER = '' EMAIL_PORT = 587 EMAIL_SSL_CERTFILE = None EMAIL_SSL_KEYFILE = '****' EMAIL_SUBJECT_PREFIX = '[Django] ' EMAIL_TIMEOUT = None EMAIL_USE_LOCALTIME = False EMAIL_USE_SSL = False EMAIL_USE_TLS = True FILE_CHARSET = 'utf-8' FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 FILE_UPLOAD_PERMISSIONS = None FILE_UPLOAD_TEMP_DIR = None FIRST_DAY_OF_WEEK = 0 FIXTURE_DIRS = [] FORCE_SCRIPT_NAME = '' FORMAT_MODULE_PATH = None FORM_RENDERER = 'django.forms.renderers.DjangoTemplates' IGNORABLE_404_URLS = [] INSTALLED_APPS = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'django_registration', 'compressor', 'compressor_toolkit', 'django_extensions', 'rest_framework', 'django_filters', 'django_js_reverse', 'constance', 'constance.backends.database', 'apps.accounts', 'apps.participations', 'apps.projects', 'apps.notifications', 'apps.api', 'apps.dashboard'] INTERNAL_IPS = [] JS_SCRIPT_PREFIX = '' LANGUAGES = "(('en', 'English'), ('pt-br', 'Brazilian Portuguese'))" LANGUAGES_BIDI = ['he', 'ar', 'fa', 'ur'] LANGUAGE_CODE = 'pt-br' LANGUAGE_COOKIE_AGE = None LANGUAGE_COOKIE_DOMAIN = None LANGUAGE_COOKIE_NAME = 'django_language' LANGUAGE_COOKIE_PATH = '/' LOCALE_PATHS = ['/home/marinahelou/wikilegis/src/locale'] LOGGING = {} LOGGING_CONFIG = 'logging.config.dictConfig' LOGIN_REDIRECT_URL = '/accounts/profile/' LOGIN_URL = '/accounts/login/' LOGOUT_REDIRECT_URL = None MANAGERS = [] MEDIA_ROOT = '/home/marinahelou/wikilegis/src/public/media' MEDIA_URL = '/media/' MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' MIDDLEWARE = ['django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] MIGRATION_MODULES = {} MONTH_DAY_FORMAT = 'F j' NODE_MODULES = '/home/marinahelou/wikilegis/node_modules' NPM_ROOT_PATH = '/home/marinahelou/wikilegis' NUMBER_GROUPING = 0 PASSWORD_HASHERS = '****' PASSWORD_RESET_TIMEOUT_DAYS = '****' PREPEND_WWW = False REST_FRAMEWORK = {'DEFAULT_PERMISSION_CLASSES': ['apps.api.permissions.ApiKeyPermission'], 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',), 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 20} ROOT_URLCONF = 'wikilegis.urls' SECRET_KEY = '****' SECURE_BROWSER_XSS_FILTER = False SECURE_CONTENT_TYPE_NOSNIFF = False SECURE_HSTS_INCLUDE_SUBDOMAINS = False SECURE_HSTS_PRELOAD = False SECURE_HSTS_SECONDS = 0 SECURE_PROXY_SSL_HEADER = None SECURE_REDIRECT_EXEMPT = [] SECURE_SSL_HOST = None SECURE_SSL_REDIRECT = False SERVER_EMAIL = 'root@localhost' SESSION_CACHE_ALIAS = 'default' SESSION_COOKIE_AGE = 1209600 SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_HTTPONLY = True SESSION_COOKIE_NAME = 'sessionid' SESSION_COOKIE_PATH = '/' SESSION_COOKIE_SAMESITE = 'Lax' SESSION_COOKIE_SECURE = False SESSION_ENGINE = 'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE = False SESSION_FILE_PATH = None SESSION_SAVE_EVERY_REQUEST = False SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' SETTINGS_MODULE = 'wikilegis.settings' SHORT_DATETIME_FORMAT = 'm/d/Y P' SHORT_DATE_FORMAT = 'm/d/Y' SIGNING_BACKEND = 'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS = [] SITE_ID = '1' STATICFILES_DIRS = ['/home/marinahelou/wikilegis/src/static'] STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'npm.finders.NpmFinder', 'compressor.finders.CompressorFinder')" STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage' STATIC_ROOT = '/home/marinahelou/wikilegis/src/public/static' STATIC_URL = '/static/' TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/home/marinahelou/wikilegis/src/templates'], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'wikilegis.processors.settings_variables', 'wikilegis.processors.current_url']}}] TEST_NON_SERIALIZED_APPS = [] TEST_RUNNER = 'django.test.runner.DiscoverRunner' THOUSAND_SEPARATOR = ',' TIME_FORMAT = 'P' TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE = 'America/Sao_Paulo' USE_I18N = True USE_L10N = True USE_THOUSAND_SEPARATOR = False USE_TZ = False USE_X_FORWARDED_HOST = False USE_X_FORWARDED_PORT = False WSGI_APPLICATION = 'wikilegis.wsgi.application' X_FRAME_OPTIONS = 'SAMEORIGIN' YEAR_MONTH_FORMAT = 'F Y'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.
Ele esta dando erro pq não encontra o ExcerptType. Não entendi direito o que é isso... é onde eu mapeio Paragrafo, Artigo, etc?
Recriei a estrutura de Excerpts e agora rola. :)
Opa!
Estou implementando uma versão local do novo wikilegis :)
Não estou usando (ainda) as integrações com autenticação google/fb - mas já consigo acessar o sistema normalmente.
Edito os metadados dos projetos, etc
Mas por algum motivo não consigo salvar alteração no corpo dos projetos. O Log do apache (wsgi) reporta Method not allowed - o que, em tese, diz que essa rota não esta aceitando o POST... mas antes de começar a debulhar o código queria checar com vocês se estou esquecendo algo.
http://legislaqui.marinahelou.com.br/