Custom management commands and settings #14
Replies: 2 comments 5 replies
-
Hi @jordaneremieff — welcome, thanks! Glad you're keen: it seems like a good idea to me too. 😀
Not sure. Generally the
Exposing more Sphinx stuff to the Django Template Language is definitely worth pursuing. There may be some prior art in |
Beta Was this translation helpful? Give feedback.
-
@carltongibson I created an example project here demonstrating a potential setup. One thing that I think would be helpful for new users is documenting the path behavior in This is what I ended up with, but please let me know if there is a better pattern: import os
import sys
sys.path.insert(0, os.path.abspath("../.."))
os.environ["DJANGO_SETTINGS_MODULE"] = "settings"
import django
django.setup() Do you think something like this is worth including directly in this project under an |
Beta Was this translation helpful? Give feedback.
-
Hello. To start, I wanted to say thank you for creating this project! I've been interested in using Sphinx with Django like this for awhile, and I'm glad to see someone prominent in the Django community leading the way.
I've finally gotten around to playing around with it, and wanted to ask, would it make sense to include some custom management commands to replace the make files/build the docs and/or generate boilerplate templates in this project?
I was thinking these commands could be configured using Django settings (with sensible defaults) to inform things like paths, base templates, etc. to make it easier to get started. Beyond this, we could also look at other possibilities like wrapping sphinx-apidoc to make it easy to auto-generate API documentation for configured Django apps and the available models and direct the output based on the Django settings and/or a common pattern for including docs files.
Anyways, these are just a few things that came to mind that I thought might make it easier for people to use, especially those that are unfamiliar with configuring Sphinx. If you think these kinds of features might be a good fit here, then I'd be happy to contribute and discuss further.
Cheers.
Beta Was this translation helpful? Give feedback.
All reactions