ariankordi / closedverse Goto Github PK
View Code? Open in Web Editor NEWMiiverse clone (offdevice) in Django released in late 2017. Gross and ancient please don't look at this
Miiverse clone (offdevice) in Django released in late 2017. Gross and ancient please don't look at this
Here is my output when trying to build on Heroku (it's not Heroku, I checked on my local machine too):
-----> Python app detected
-----> Installing python-3.7.3
-----> Installing pip
-----> Installing SQLite3
-----> Installing requirements with pip
Collecting Django (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/d6/57/66997ca6ef17d2d0f0ebcd860bc6778095ffee04077ca8985928175da358/Django-2.2.4-py3-none-any.whl (7.5MB)
Collecting django-heroku (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/django_heroku-0.3.1-py2.py3-none-any.whl
Collecting gunicorn (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl (112kB)
Collecting urllib3 (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB)
Collecting lxml (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/e7/a8/40115c84414c017e1a293f331709eb7534303d3ccd11ef805ac09b1481e7/lxml-4.4.1-cp37-cp37m-manylinux1_x86_64.whl (5.7MB)
Collecting passlib (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/ee/a7/d6d238d927df355d4e4e000670342ca4705a72f0bf694027cf67d9bcf5af/passlib-1.7.1-py2.py3-none-any.whl (498kB)
Collecting bcrypt (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/8b/1d/82826443777dd4a624e38a08957b975e75df859b381ae302cfd7a30783ed/bcrypt-3.1.7-cp34-abi3-manylinux1_x86_64.whl (56kB)
Collecting mysqlclient (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz (86kB)
Collecting pillow (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/a4/da/2bd281c875686230eabc13d20ab590ea617563b0e746abfb0698c4d5b645/Pillow-6.1.0-cp37-cp37m-manylinux1_x86_64.whl (2.1MB)
Collecting django-markdown-deux (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/80/a5/d61ee6fc26cbb0d737986ed23e13309c88f2ae7f1fcdf2460a525323a3ed/django-markdown-deux-1.0.5.zip
Collecting django-markdown2 (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/f9/62/eadc690275c3a66e08e2d9b3bf5576285f0df896fc787faa45691900b2f6/django-markdown2-0.3.1.tar.gz
Collecting whitenoise (from -r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 12))
Downloading https://files.pythonhosted.org/packages/96/75/92afb2d8912ac19646f67a2c69bb8683e5aab78db3b0791bfd3e7ed022bb/whitenoise-4.1.3-py2.py3-none-any.whl
Collecting pytz (from Django->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/87/76/46d697698a143e05f77bec5a526bf4e56a0be61d63425b68f4ba553b51f2/pytz-2019.2-py2.py3-none-any.whl (508kB)
Collecting sqlparse (from Django->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Collecting psycopg2 (from django-heroku->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz (377kB)
Collecting dj-database-url>=0.5.0 (from django-heroku->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/d4/a6/4b8578c1848690d0c307c7c0596af2077536c9ef2a04d42b00fabaa7e49d/dj_database_url-0.5.0-py2.py3-none-any.whl
Collecting six>=1.4.1 (from bcrypt->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting cffi>=1.1 (from bcrypt->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/a0/ea/37fe21475c884f88a2ae496cab10e8f84f0cc11137be860af9eb37a3edb9/cffi-1.12.3-cp37-cp37m-manylinux1_x86_64.whl (430kB)
Collecting markdown2 (from django-markdown-deux->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/89/d2/6aef45472f7956646fdc4cc5284e6f9d00476497a8d167c30b0f78bb75a5/markdown2-2.3.8-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.1->bcrypt->-r /tmp/build_0e927a39a75e7f355a605f2cb188a2cb/requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
Installing collected packages: pytz, sqlparse, Django, whitenoise, psycopg2, dj-database-url, django-heroku, gunicorn, urllib3, lxml, passlib, six, pycparser, cffi, bcrypt, mysqlclient, pillow, markdown2, django-markdown-deux, django-markdown2
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'done'
Running setup.py install for pycparser: started
Running setup.py install for pycparser: finished with status 'done'
Running setup.py install for mysqlclient: started
Running setup.py install for mysqlclient: finished with status 'done'
Running setup.py install for django-markdown-deux: started
Running setup.py install for django-markdown-deux: finished with status 'done'
Running setup.py install for django-markdown2: started
Running setup.py install for django-markdown2: finished with status 'done'
Successfully installed Django-2.2.4 bcrypt-3.1.7 cffi-1.12.3 dj-database-url-0.5.0 django-heroku-0.3.1 django-markdown-deux-1.0.5 django-markdown2-0.3.1 gunicorn-19.9.0 lxml-4.4.1 markdown2-2.3.8 mysqlclient-1.4.4 passlib-1.7.1 pillow-6.1.0 psycopg2-2.8.3 pycparser-2.19 pytz-2019.2 six-1.12.0 sqlparse-0.3.0 urllib3-1.25.3 whitenoise-4.1.3
-----> $ python manage.py collectstatic --noinput
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python3.7/site-packages/django/core/management/__init__.py", line 357, in execute
django.setup()
File "/app/.heroku/python/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/app/.heroku/python/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/build_0e927a39a75e7f355a605f2cb188a2cb/closedverse_main/models.py", line 147
addr = models.CharField(max_length=64, null=True, blank=True)
^
SyntaxError: invalid syntax
! Error while running '$ python manage.py collectstatic --noinput'.
See traceback above for details.
You may need to update application code to resolve this error.
Or, you can disable collectstatic for this application:
$ heroku config:set DISABLE_COLLECTSTATIC=1
https://devcenter.heroku.com/articles/django-assets
! Push rejected, failed to compile Python app.
! Push failed
My version of Closedverse is a modified version of Oasis' fork (it located here), and I get the same error message when using this repository. What should I do?
do this version have ip bans or something? I mean, everyone want to avoid annoying people........................ so yeah, if this version has them then great
it will not import and give me: table not found: closedverse_main_community, migrate migrates the default, i wanna use closedverse for some reason
I know you say look up how to set up a django app, I am a very very beginner at python and all this. I looked up and researched on how to do it but I dont understand still, I have installed all requirements but its still getting all kinds of errors like "NoModuleFoundError: No module named 'closedverse.settings'". I know you might not be able to help :( but I really could use some help rn
You requested help finding a good Markdown library in the Closedverse FAQ:
Haha, now where's my Markdown?
[…]
There is really Markdown, but it's in Messages, which is why one line break now looks like a space in messages.
Again, sorry. If anyone could find a good enough text formatting implementation that works in Django, let me know.
I don’t know the Python/Django ecosystem very well, but after searching, it looks like the paka.cmark
Python library does what you need. It implements the CommonMark standard, so it supports all the features of Markdown. And its README shows that it supports converting soft line breaks to <br>
s with breaks="hard"
:
>>> print(cmark.to_html(u"Hello,\n*World*!", breaks="hard"))
<p>Hello,<br />
<em>World</em>!</p>
I didn’t look for a library that specifically integrates paka.cmark
with Django, as your current library django-markdown-deux does, but I don’t think you need such a library to use paka.cmark
in your app. When I wrote a Ruby on Rails app that rendered Markdown, it was easy enough to write my own function to render Markdown. It just did these two things:
<script>
or <style>
tags.Then you include that raw HTML in your view, marking it as safe.
OK, so I decided to move the server over to DigitalOcean. Problem is whenever I get everything setup, I keep getting Bad Request (400)
whenever I try to go to any URL.
Here's the log:
(closedverseenv) sammy@closedverse:~/closedverse$ python manage.py runserver 0.0.0.0:8000
Performing system checks...
System check identified no issues (0 silenced).
February 13, 2019 - 18:12:56
Django version 2.1.7, using settings 'closedverse.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
[13/Feb/2019 18:13:26] "GET / HTTP/1.1" 400 26
[13/Feb/2019 18:13:26] "GET /favicon.ico HTTP/1.1" 400 26
[13/Feb/2019 18:13:52] "GET /admin HTTP/1.1" 400 26
[13/Feb/2019 18:13:52] "GET /favicon.ico HTTP/1.1" 400 26
I've disabled debug mode, enabled production mode, got the website set up, but it still won't work. Here's the traceback (which for some odd reason still shows up in the browser):
Traceback (most recent call last):
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 412, in _query
rowcount = self._do_query(q)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 375, in _do_query
db.query(q)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 276, in query
_mysql.connection.query(self, query)
_mysql_exceptions.ProgrammingError: (1146, "Table 'closedverse.closedverse_main_community' doesn't exist")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/core/handlers/base.py", line 126, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/core/handlers/base.py", line 124, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/cabox/workspace/closedverse_main/views.py", line 76, in community_list
'image': request.build_absolute_uri(settings.STATIC_URL + 'img/favicon.png'),
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/shortcuts.py", line 36, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 171, in render
return self._render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
return compiled_parent._render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
return self.nodelist.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
result = block.nodelist.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 937, in render
bit = node.render_annotated(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
return self.render(context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/template/defaulttags.py", line 308, in render
if match:
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/query.py", line 272, in __bool__
self._fetch_all()
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/query.py", line 1186, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/query.py", line 54, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1065, in execute_sql
cursor.execute(sql, params)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 412, in _query
rowcount = self._do_query(q)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/cursors.py", line 375, in _do_query
db.query(q)
File "/home/cabox/.pyenv/versions/3.7.0/lib/python3.7/site-packages/MySQLdb/connections.py", line 276, in query
_mysql.connection.query(self, query)
django.db.utils.ProgrammingError: (1146, "Table 'closedverse.closedverse_main_community' doesn't exist")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.