-
-
Notifications
You must be signed in to change notification settings - Fork 25
Restructure everything to use django-amber #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
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!