Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRestructure everything to use django-amber #2
Conversation
|
Hi Peter, Just been quickly looking through this and it looks promising. Can we preserve the directory structure for internationalisation? It's all going to get very messy and difficult to organise if not. Also, some of the content pages, because of their complexity, will be written in HTML. I guess this can be made to work? N. |
|
Preserving the directory structure will require a little bit of work on Django Amber -- as it is, the location of files is hardcoded, so we'll need to provide a hook to customise this. Writing pages in HTML will be easy. What's the timeframe for this? |
|
Sooner rather than later. It needs to be in place before I ask for collaborators for internationalisation since we need the scaffolding in place for people to use. What I like about django-amber is that I can add funky custom things to manage.py. Right now, my main focus is to get the amazing designs from Steve online along with initial content, the online editor and tutorials. I can do this while work is done with amber but sometime mid-August (basically, when I get back from holiday) I'll want to get support from people as described above. Does this make sense? Perhaps we can chat about this tomorrow on IRC? (I have parental duties to fulfil right now - dad taxi pick up in 25 mins.) |
|
OK, I've done some exploratory fiddling, and I can get this done tomorrow :) |
|
Hi @ntoll -- I've addressed your two points, although I haven't yet updated the README, and I've also got it to produce a CNAME file. |
|
Please rebase with master. I've just tried but cocked it up. I get a large splurge of stack trace complaining about "Page has no field named 'url'" (when all the content pages do have a YAML url field. :-/ It doesn't tell me which content page it thinks is at fault. I suspect I've rebased incorrectly since a bunch of stuff in master never made it to the branch. :-( |
I have kept the same directory structure for content, templates, and media.
|
I'm closing this in favour of #3, since this PR wanted to be merged into an old branch. |
inglesp commentedJul 16, 2016
This PR restructures everything to make use of my Django Amber, my new static site generator.
The page content is now in pythonineducation/data/page/, and the filenames are things like en-microbit.md (the English version of the micro:bit page).
The templates are in pythonineducation/templates/pythonineducation/.
The static content is in pythonineducation/static/.
Working on this has revealed a handful of shortcomings in Django Amber, including:
./manage.py serveis runI'll fix these tomorrow.
@ntoll Let me know if this approach looks sensible!