Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

near "AS": syntax error #4

Open
TobinFrost opened this issue Sep 24, 2017 · 5 comments
Open

near "AS": syntax error #4

TobinFrost opened this issue Sep 24, 2017 · 5 comments

Comments

@TobinFrost
Copy link

Environment:

Request Method: GET
Request URL: http://localhost:8000/admin/

Django Version: 1.11.5
Python Version: 2.7.13
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'feincms3',
'content_editor',
'ckeditor',
'versatileimagefield',
'app',
'app.pages',
'app.articles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'feincms3.apps.AppsMiddleware']

Traceback:

File "C:\Python27\lib\site-packages\django\core\handlers\exception.py" in inner
41. response = get_response(request)

File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in _legacy_get_response
244. response = middleware_method(request)

File "C:\Python27\lib\site-packages\feincms3\apps.py" in process_request
302. request.urlconf = apps_urlconf()

File "C:\Python27\lib\site-packages\feincms3\apps.py" in apps_urlconf
210. if not apps:

File "C:\Python27\lib\site-packages\django\db\models\query.py" in nonzero
258. return type(self).bool(self)

File "C:\Python27\lib\site-packages\django\db\models\query.py" in bool
254. self._fetch_all()

File "C:\Python27\lib\site-packages\django\db\models\query.py" in _fetch_all
1118. self._result_cache = list(self._iterable_class(self))

File "C:\Python27\lib\site-packages\django\db\models\query.py" in iter
122. for row in compiler.results_iter():

File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py" in results_iter
836. results = self.execute_sql(MULTI)

File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py" in execute_sql
894. raise original_exception

Exception Type: OperationalError at /admin/
Exception Value: near "AS": syntax error

@matthiask
Copy link
Member

Thanks for the report! Which database engine are you using?

@TobinFrost
Copy link
Author

I'm using Sqlite3

@matthiask
Copy link
Member

OK. feincms3's AbstractPage depends on django-cte-forest, and this module only supports Postgresql at the moment.

I'm looking into adding sqlite support right now -- shouldn't be too hard since sqlite also supports recursive Common Table Expressions.

@TobinFrost
Copy link
Author

Great ! I'ts works with PosgreSQL.
Thx a lot.
I'm doing an application allowing a user to create and edit pages for events like eventbrite.
In short, a form to create pages and save it in database.
If you have some example using feincms this will be super cool.
I started by creating classes "Page" and "PageContent" and I saw feincms.
I hope that will help me.

@TobinFrost
Copy link
Author

I think gonna close the issue. thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants