coltrane
coltrane copied to clipboard
Generate RSS/Atom feeds
https://docs.djangoproject.com/en/4.0/ref/contrib/syndication/
When I try to access the /rss.xml path in my project (coltrane integrated in an existing django project), I get a message telling me to add COLTRANE_SITE to my .env file but adding it doesn't seem to do anything.
I'm going to invest this a little more to make sure I'm not the one doing something stupid.
But in general I feel that more settings should be customizable through the COLTRANE setting when integrated into an existing project.
When I have concrete proposals to make, I will open up some issues. Thank you for your time
I have to admit that the integrated mode is the least tested although I do personally use coltrane that way, e.g. https://devmarks.io/about. I see the same error you mentioned when hitting https://devmarks.io/rss.xml so I'm going to update this issue to be specifically about that. 👍
Adding something like this to your regular settings file should clear up that error.
But, I can definitely make that error clearer.
I'm also wondering if falling back to the Site framework would make sense at least for integrated mode?
I'm also wondering if falling back to the Site framework would make sense at least for integrated mode?
I just read the Django sites framework documentation and I don't think using it make sense (I could be wrong). Sites are meant to serve multiple domains using the same Django project, as far as I know Coltrane doesn't handle this case at the moment, the only thing it needs is the domain of the website, maybe DOMAIN or SITE_URL as a variable name would be more appropriate.
What is this setting really for?
https://github.com/adamghill/coltrane/blob/e573dbdba9c7835babbb2e313f5ff4775354dd4e/coltrane/config/settings.py#L48 is only used for the rss feed. I needed some way to build an absolute URL so I need the domain for the site.
One way to do that would be looking for SITE_ID, but I agree that it's... maybe not intuitive that coltrane would use that.
I wonder if changing COLTRANE.SITE to COLTRANE.SITE_URL or COLTRANE.DOMAIN would be more clear? I'm onboard with either of those changes.
I wonder if changing
COLTRANE.SITEtoCOLTRANE.SITE_URLorCOLTRANE.DOMAINwould be more clear? I'm onboard with either of those changes.
Yes, I think it would be clearer, COLTRANE.SITE_URL seems more appropriate since the full url will be better than just having the domain name.
Perfect, I'll make that change. 👍
#41 adds more documentation, better error message, and changes SITE to SITE_URL to hopefully be more clear so I'm going to close this issue now.