Closed kamilthecitratester closed 1 year ago
howdy, just tried to reproduce this and the problem is that it's not clear in which order the migration commands are run, and this specific error you're seeing is if you forget python3 manage.py makemigrations closedverse_main
. however, you cannot undo your mistake and just have to delete the sqlite3 database again
the order of running closedverse that worked for me was as follows:
python3 manage.py makemigrations
python3 manage.py makemigrations closedverse_main
python3 manage.py migrate
python3 manage.py createsuperuser
to make your admin user, if you want to actually Use The Thingpython3 manage.py runserver
or whatever else you want (really only good for testing purposeses, in production you ought to use a database server and something like gunicorn or uwsgi)at the minimum this should be specified in the readme, ideally this should be done automatically for you like the secret key generation, i am also wondering if i can make closedverse_main migrate itself (OR JUST DO AWAY WITH CLOSEDVERSE_MAIN AND INTEGRATE IT INTO THE MAIN PROJECT..............)
i do look to update closedverse with MORE changes including the readme, like how I tried to make some changes in 2020 that I committed just recently, but I haven't gotten around to it plus don't have that much of a sense of direction :/
Oh, sorry, closing issue now
i used python manage.py makemigrations so sorry, see ya in the next issue soon
how to fix this when testing it?
this happens when DEBUG is turned off because django doesn't want you to unironically use the built-in server and they make it so that assets such as static files and media are not served, so you either have to not use DEBUG, set up a complicated nginx system where you manually map /static through it, or do what oasis/probably other clones did and use some django plugin that will serve those resources anyway with debug disabled (forgot the name of whatever that was, sorry)
also here are some scripts to help you activate windows: https://github.com/massgravel/Microsoft-Activation-Scripts
ok, I'm on windows 10 enterprise, unrelated question, how do i setup una, i wanna make a front page and changelog
una doesn't work it's basically just signup, login, and guest pages. pretty much stopped working on it just because i didn't actually know how to implement an uno game state machine with websocket in go lol i don't see una coming back either bc it's probably not up to my modern coding standards :( pretty much just put it on github so that my friends could potentially add functionality to it not only would una be unsuitable to work on in 2023 due to me probably not making the same decisions while coding it, but also golang just loves to break stuff with old code and hates being backward compatible. not to mention that i'm pretty sure most libraries i would have used to make it in 2018 either don't exist anymore or have stopped being maintained. i think i used a certain orm to manage the database which is probably all you have to configure but there's nothing to see there
so how do you setup the signup, login, and guest pages in una, i can make a go.mod if i know what una needs to run.
just try it and see what errors you get along the way, i got an appointment to go to right now but in general i feel like you should be using github issues if you have exhausted all of your options + by the way you can move this discussion to your una issue
update: alright, closedverse setup looking good also i did move this issue to your una repo
also how do u make a community?
never mind, it gives internal Server error when trying to post in community
i just tried using the directions i used to set up closedverse, made a community through /admin and i could post in it. so, i'm not sure what you're having an issue with. besides, it's never helpful to say that an issue happened, without any diagnostic logs or screenshots. do you have discord? could you drop your tag and continue there? github issues are meant for issues and if there's something like instructions missing or something not being clear enough or flat-out flaws in the code... that's what it's for and those can be tracked and fixed. but saying "it doesn't work" doesn't help me or you, it's just confusing.
i will show a pic, this is what it gives me and cmd log is below this text under here [25/May/2023 15:28:05] "GET /sfd HTTP/1.1" 404 16767 [25/May/2023 15:28:05] "GET /lights HTTP/1.1" 200 0 [25/May/2023 15:28:05] "GET /alive?_=1685042720643 HTTP/1.1" 200 0 Not Found: /esf [25/May/2023 15:28:05] "GET /esf HTTP/1.1" 404 16767 [25/May/2023 15:28:05] "GET /lights HTTP/1.1" 200 0 [25/May/2023 15:28:05] "GET /communities/1?pjax=%23container HTTP/1.1" 200 6191 [25/May/2023 15:28:05] "GET /alive?=1685042720644 HTTP/1.1" 200 0 Not Found: /users/esf [25/May/2023 15:28:05] "GET /users/esf HTTP/1.1" 404 4056 [25/May/2023 15:28:05] "GET /alive?_=1685042720645 HTTP/1.1" 200 0 Not Found: /communities/sfd [25/May/2023 15:28:05] "GET /communities/sfd HTTP/1.1" 404 7851 Not Found: /communities/esf [25/May/2023 15:28:05] "GET /communities/esf HTTP/1.1" 404 7851 Internal Server Error: /communities/1/posts Traceback (most recent call last): File "C:\Users\Kamil\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Kamil\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\django\core\handlers\base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Kamil\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\django\views\decorators\http.py", line 43, in inner return func(request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Kamil\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\django\contrib\auth\decorators.py", line 23, in _wrapper_view return view_func(request, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Kamil\Documents\closedverse-master\closedverse_main\views.py", line 793, in post_create if request.method == 'POST' and request.is_ajax():
^^^^^^^^^^^^^^^ AttributeError: 'WSGIRequest' object has no attribute 'isajax' [25/May/2023 15:28:15] "POST /communities/1/posts HTTP/1.1" 500 78807 [25/May/2023 15:28:25] "GET /alive?=1685042720646 HTTP/1.1" 200 0 [25/May/2023 15:28:55] "GET /alive?_=1685042720647 HTTP/1.1" 200 0 the end
also yes, i do have discord
thank you for your log, and oops, just realized my flaw:
request.is_ajax()
has been deprecated in Django for a while and i didn't think this would get removed as soon as it did, whoops. you are using a far newer version of Django than Closedverse was ever designed for, for the record the project as it was in 2020 used version 2.2.
however, try this: can you replace request.is_ajax()
in views.py with request.headers.get('x-requested-with') == 'XMLHttpRequest'
and let me know if that makes it work? thanks!
also, i am on my own discord server here: https://discord.gg/5NRCYezq so if you join, you can message me without having me friended. just try to mention @aria n
. i would like to talk to you there rather than in github issues, just to make it more convenient. if you don't want to do that, email me your tag
ok im kamil202X123
closing issue
it will not import and give me: table not found: closedverse_main_community, migrate migrates the default, i wanna use closedverse for some reason