Coder Social home page Coder Social logo

Comments (18)

ariankordi avatar ariankordi commented on August 18, 2024

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:

  • clone the repo
  • set SECRET_KEY or edit settings.py to set it to something random (tbh this shouldn't be needed & in an ideal world it should generate one for you if it's unset)
  • 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 Thing
  • python3 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 :/

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

Oh, sorry, closing issue now

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

i used python manage.py makemigrations so sorry, see ya in the next issue soon

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

how to fix this when testing it?
helpme

from closedverse.

ariankordi avatar ariankordi commented on August 18, 2024

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

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

ok, I'm on windows 10 enterprise, unrelated question, how do i setup una, i wanna make a front page and changelog

from closedverse.

ariankordi avatar ariankordi commented on August 18, 2024

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

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

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.

from closedverse.

ariankordi avatar ariankordi commented on August 18, 2024

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

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

update: alright, closedverse setup looking good
also i did move this issue to your una repo

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

also how do u make a community?

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

never mind, it gives internal Server error when trying to post in community

from closedverse.

ariankordi avatar ariankordi commented on August 18, 2024

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.

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

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():

Capture
^^^^^^^^^^^^^^^
AttributeError: 'WSGIRequest' object has no attribute 'is_ajax'
[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

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

also yes, i do have discord

from closedverse.

ariankordi avatar ariankordi commented on August 18, 2024

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

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

ok
im kamil202X123

from closedverse.

kamilthecitratester avatar kamilthecitratester commented on August 18, 2024

closing issue

from closedverse.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.