nitely / Spirit

Spirit is a modern Python based forum built on top of Django framework
http://spirit.readthedocs.io
MIT License
1.16k stars 334 forks source link

Add a more detailed docs. #296

Closed ycl310 closed 3 years ago

ycl310 commented 3 years ago

This is more of like a suggestion commentary rather than an issue. So I have looked through a lot of extended applications that are compatible with Django, then I found this the most suiting for my upcoming project. I have look through the docs and was able to install and start a new project with the spirit command, start a task manager. I eventually found myself struggling to figure how to make the forum work and display, the docs jumped all the way from setting up a task manager to working with the template engines. This got me really confused and I think the docs is a bit too unclear about some essential instructions (or maybe I'm just stupid :P but I think I might not be the only one with this issue). I also tried to look into some other forums applications for Django but most of them are either not maintained anymore or not as good as this one, meaning that this might be my only hope. My suggestion is to extend the documentation and include more details. I know this should be in PRs, but I don't know how to do it. I appreciate your work on this and it's suprising how frequently this project gets maintained and the owner responds to questions really fast as what I've seen. Thanks for reading.

nitely commented 3 years ago

I eventually found myself struggling to figure how to make the forum work and display

The command to start the server is python manage.py runserver, it's in the docs.

My suggestion is to extend the documentation and include more details.

I'm happy to extend them if it makes sense, but it's not clear to me what should be included.

I know this should be in PRs, but I don't know how to do it.

The docs are in the docs folder and can be built with make docs to view them locally. If you mean how to make a PR, I'm sure there are guides, but basically fork -> create a new branch -> edit docs, commit, and push -> create PR.

ycl310 commented 3 years ago

Um so for the first one, I ran python manage.py runserver and what showed up is the default rocket taking off page and I believe I messed something up. By the way, in the tutorial it didn't say that I need to migrate after creating the project which I guess was required and I did. So from the above one, nothing else showed up except for that, do I need any additional settings? Also, at the template part of the tutorial, it didn't explain quite well at how to create that html file or where it is located, do I need to create one myself, because I didn't find any folder named templated, thanks. And also you respond so fast which is great, do you have a discord server?

nitely commented 3 years ago

If you follow the install instruction to the letter, it should just work; I just checked.

By the way, in the tutorial it didn't say that I need to migrate after creating the project which I guess was required and I did.

You can, but spiritinstall does that, among other things.

So from the above one, nothing else showed up except for that, do I need any additional settings?

Something went wrong, maybe you missed some step. Nothing else is required. Spirit has a bunch of settings that you may add/change, see this. The startproject generates all the Django specific settings Spirit needs to run.

Also, at the template part of the tutorial, it didn't explain quite well at how to create that html file or where it is located, do I need to create one myself, because I didn't find any folder named templated, thanks.

Yes, you do. The location is in a comment before/within the template code.

And also you respond so fast which is great, do you have a discord server?

There's no discord server for Spirit, but I've an account, ~my username is probably nitely~ my user is nitely#3345.

ycl310 commented 3 years ago

Thx for the info so I do have to create the template myself? also I sent you a friend request on discord

nitely commented 3 years ago

Yes, you need to create it.

ycl310 commented 3 years ago

Oh so without creating the template, the root path where the app's hosted on won't display the content of the forums, instead just display a rocket taking off?

nitely commented 3 years ago

No. It should just work with/without the template. I've only seen the rocket when starting a new Django project with the startproject command. Are you still seeing the rocket?

nitely commented 3 years ago

ah, the rocket is displayed with the default Django urls.py file, if you are integrating Spirit into a project or moving things around, don't forget to copy that file.

ycl310 commented 3 years ago

So I got 2 re_path inside the main app's urls.py, and these are the two re_path(r'^', include(spirit.urls)), re_path(r'^admin/', admin.site.urls),

ycl310 commented 3 years ago

And it's still displaying the rocket taking off

nitely commented 3 years ago

Well, I followed the install instructions yesterday, and everything worked as expected. I cannot reproduce the issue.

ycl310 commented 3 years ago

Are you operating on windows?

nitely commented 3 years ago

No, I'm on linux. You can try running python manage.py runserver 8888 and http://127.0.0.1:8888/. Maybe you are running some other Django instance on port 8000, I dunno.

nitely commented 3 years ago

Another thing to try is http://127.0.0.1:8888/404, it should display an error showing the registered URLs.

ycl310 commented 3 years ago

I think I found the problem, the urls.py is not affecting anything, I even deleted the whole file and the port(8888) is still displaying the rocket taking off, or maybe let me try restarting the whole project.

ycl310 commented 3 years ago

Hello, the issue is solved, I performed the same exact steps this time, but maybe I messed something up last time and this time it works. I haven't added the task manager yet, maybe that might be the issue. For more, I will contact you or maybe open a new issue. Take care

ycl310 commented 3 years ago

Oh btw is the default task manager celery?

nitely commented 3 years ago

there's no default task manager. I'd recommend huey, it's easier to set up, you can use sqlite in dev, and even in prod if you've everything in a single server instance.