jayfk / fundingoss.com

http://fundingoss.com
BSD 3-Clause "New" or "Revised" License
60 stars 15 forks source link

Serve content from repository #38

Open techtonik opened 8 years ago

techtonik commented 8 years ago

Instead of implemeting login, edits etc., is it possible to teach Django to fetch contents from repository (plain text files) instead of database? This way people can send PRs and get their edits accepted much quicker.

Maybe there is some kind of memory-only database that can bootstrap and serve those for Django?

jayfk commented 8 years ago

I've never came across something like that, but that would indeed be very useful.

Maybe some kind of synching mechanism where we keep all projects in a projects.json file that lives in this repo and is used to populate the database.

techtonik commented 8 years ago

JSON is not the best format - quotes are not quite readable, it doesn't support comments and it can not be splitted into several files. I'd prefer some subset of YAML instead.

Got an interesting reading from @mitsuhiko about flat file CMS http://lucumr.pocoo.org/2015/12/21/introducing-lektor/

mlinksva commented 8 years ago

If database were files you could just have a static site, and have all collaboration be through PRs. Django would not be needed at all. There are many ways to do it, but one example is https://github.com/github/choosealicense.com which uses http://jekyllrb.com/docs/collections/ -- data in markdown front matter for each license, accessible on other pages through a site collection. If there were lots more data, would probably use client side JS to sort, search, etc.

I'm not suggesting such an approach for this project. You already have a working site.

But I think this sort of approach is topical. Complexity is an enemy of sustainability. Static sites are one of the ways people are opting out of their network-accessible services depending on lots of libraries they don't know whether are adequately supported. I'd love it if people thinking about open source sustainability consider supporting projects which aim to reduce overall complexity/increase robustness in addition to tending to the fragile software people depend on now. :smile:

jayfk commented 8 years ago

To be fair, django has no big red warning box like Jekyll's collection thing :smiley:

Collections support is unstable and may change This is an experimental feature and the API may change until the feature stabilizes.

I get your point, but people (including myself) tend to use what they are familiar with. I'm working with Django every day and typically deploy 2-4 projects per month. Thanks to tools like cookiecutter-django, I have a running site in 5 minutes, including spinning up a server.

Sure, Django has a lot of complexity but it's also extremely flexible. If an idea pops up that sounds interesting, we can add that easily. If you use something like Jekyll you are more or less stuck with what this particular project has to offer. Not that this is a bad thing, but you are limited.

The idea when I started this was to support @nayafia's efforts to collect data for open source projects that are in need. Let's see what gets out of this project, we can downgrade to a simpler approach every time.