diff --git a/.gitignore b/.gitignore index 839cb60..e0bd030 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ output *.pyc .DS_Store + +db.sqlite3 diff --git a/Makefile b/Makefile index b439d6b..13393f1 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,10 @@ help: @echo '' build: - wok + python manage.py buildsite serve: - wok --serve + python manage.py serve 8000 test: ./pre-flight-checks.sh diff --git a/README.rst b/README.rst index b4b8f5d..5b58586 100644 --- a/README.rst +++ b/README.rst @@ -15,27 +15,22 @@ more details). Development ~~~~~~~~~~~ -This site uses wok_. To install wok and other dependencies, run -``pip install -r requirements.txt``. wok currently only works with Python 2.7. +This site uses django-amber_. To install django-amber and other dependencies, +run ``pip install -r requirements.txt``. django-amber is only known to work +with Python 3.5. -wok builds the site by assembling several components: +django-amber builds the site by assembling several components: -* Pages are found in ``content/``. Pages may be HTML, Markdown_ or reStrcturedText_, and contain some YAML metadata. -* Statuc files are found in ``media/``. -* The various jinja2_ templates for pages can be found in ``templates/``. +* Pages are found in ``content/``. Pages may be HTML or Markdown_, and contain + some YAML metadata. +* Static files are found in ``media/``. +* The various Django templates for pages can be found in ``templates/``. -To build the site, run ``make build``. This pulls together all the components -into a set of HTML files in ``output/``. +To build the site, run ``python manage.py buildsite``. This pulls together all +the components into a set of HTML files in ``output/``. -Windows users: you need to run the (extensionless) ``wok`` script in -``c:\pythonxx\scripts``. e.g. ``py -2 c:\python27\scripts\wok``. - -Alternatively, if you run ``make serve``, wok will build the site, serve the -built site on port 8000, and watch for changes. - -Windows users: you ned to run the (extensionless) ``work`` script with the -``--serve`` parameter in ``c:\pythonxx\scripts``. e.g. -``py -2 c:\python27\scripts\wok --serve``. +Alternatively, if you run ``python manage.py serve``, django-amber will build +the site, serve the built site on port 8000, and watch for changes. You can test that the site contains no broken links and that various common mis-spellings are caught correctly (hint, it's a "BBC micro:bit" for example) @@ -71,9 +66,7 @@ works: the ISO 639-1 language code. They contain the content for this website in the langauge referenced by the language code in the name of the directory. For example, the English content is found in the ``content/en/`` directory - whereas the German content is in ``content/de/``. You must make sure that - the ``type`` field in the YAML header for the content is set to the correct - page template for the language. + whereas the German content is in ``content/de/``. * If in doubt, just look at what happens in the English version of the site and adapt to the desired language. @@ -81,9 +74,10 @@ Deployment ~~~~~~~~~~ The site is hosted as a Project Page on GitHub Pages, and so it is the -``gh-pages`` branch of the repository that gets served. wok generates the site -in the ``output/`` directory, and Travis is configured to push any changes to -the ``output/`` directory to this branch. See ``deploy.sh`` for details. +``gh-pages`` branch of the repository that gets served. django-amber generates +the site in the ``output/`` directory, and Travis is configured to push any +changes to the ``output/`` directory to this branch. See ``deploy.sh`` for +details. This should be done automatically by Travis after it has built the ``master`` branch, but in case this does not happen, somebody with commit access to the @@ -99,9 +93,8 @@ for the project. Note: this is tied to a single user on GitHub, however any other GitHub user with valid permissions can replace the key on Travis. -.. _wok: http://wok.mythmon.com/ +.. _django-amber: https://github.com/inglesp/django-amber .. _Markdown: https://pythonhosted.org/Markdown/ .. _reStructuredText: http://docutils.sourceforge.net/rst.html -.. _jinja2: http://jinja.pocoo.org/ .. _issue: https://github.com/python/pythonineducation.org/issues .. _CONTRIBUTING.rst: ./CONTRIBUTING.rst diff --git a/config b/config deleted file mode 100644 index ea06477..0000000 --- a/config +++ /dev/null @@ -1 +0,0 @@ -url_pattern: /{slug}/index.html diff --git a/content/CNAME b/content/CNAME deleted file mode 100644 index dc99818..0000000 --- a/content/CNAME +++ /dev/null @@ -1,4 +0,0 @@ -url: CNAME -type: none ---- -pythonineducation.org diff --git a/content/de/index.md b/content/de/home.md similarity index 50% rename from content/de/index.md rename to content/de/home.md index 35e91b7..d2cd523 100644 --- a/content/de/index.md +++ b/content/de/home.md @@ -1,7 +1,3 @@ -type: page_de -category: home -slug: index -url: /de/index.html title: Python in der Bildung --- diff --git a/content/index.html b/content/en.html similarity index 94% rename from content/index.html rename to content/en.html index 410b65c..fda7b1c 100644 --- a/content/index.html +++ b/content/en.html @@ -1,6 +1,3 @@ -type: page_en -slug: home -url: index.html title: Python in Education ---
+
+
+
- Master the basics, progress to the fun stuff and achieve - coding greatness with lessons for learners of all ages, - levels and abilities.
- get started -
- Inspire the next generation of Python programmers with - fun resources, tested in the field by teachers and members - of the global Python community.
- fun resources -
- Discover all the technical details, designs and source - code needed to build something amazing, create a cool - project or make a contribution to our educational - efforts.
- lets go! -
-
- It's very easy to learn. Python is used all over the - world by all sorts of people from professional coders to - complete beginners. Use Python to code cool stuff on your - micro:bit, Raspberry Pi or other computer.
-
- Start here for an introduction to Python, - intermediate material that'll help you stretch your - wings, and advanced features that'll have you - building your world-changing project from the - comfort of your own home in no time at all!
- try out a tutorial -
- The BBC micro:bit is a small programmable - device. It aims to inspire a new generation of - digital creators, makers and coders. Thanks to - the amazing - MicroPython - project, it runs a full re-implementation of - Python 3.
-The device has two buttons, a 5x5 LED display, - I/O pins, an accelerometer, compass, radio, - micro-USB port, battery connector, ARM - microprocessor and a heart of gold.
- code the future with micro:bit -
- The Raspberry Pi is a unique phenomenon. It is - the most successful computing-in-education project - in history with over 6 million units delivered - around the world.
-But it's not just about the hardware! Thanks to - the amazing work of the Raspberry Pi Foundation's - education team, Python is widely used on the device - to do all sorts of fun stuff such as program games - (like Minecraft), travel into space (to the - International Space Station) and control - peripherals plugged into the Pi via its GPIO - pins.
- enjoy a slice of raspberry pi -
- Teachers and programmers from all over the world - have created fun, engaging and challenging - resources for teachers to use in their classrooms. - These range from simple tasks for beginners to - complicated projects to challenge the most advanced - students. They include lesson plans, code, books, - worksheets and online interactive courses.
-Most importantly, many of these resources are - free for people to use, adopt and adapt.
- discover compelling and creative resources -
- Community is Python's secret weapon.
-The Python community value openness, actively - engage in outreach and give up their time for - educational support (this site was written by - volunteers). As one person put it, "I came for the - programming language, but stayed for the - community".
-The Python Software Foundation (PSF) ~ under - whose auspices this site was created ~ support and - organise conferences all over the world. There's a - good chance there's one near you very soon.
-If you're looking for support, advice or just - some friendly encouragement, get involved and say - "hello".
- meet and make friends with your community -
- Python has comprehensive and excellent - documentation. In fact, many in the Python - community spend lots of effort to make sure Python - projects have comprehensive, detailed and easy to - understand technical documentation.
-Need to know how to do something? Read the - docs! Looking for the best way to use some code? - Read the docs! Want to learn something new so you - can impress your programming buddies with your - knowledge? Read the docs!
- read the docs! -
- Python is free software: it is given away for - free (nobody pays to use Python), you are also free - to use it as you see fit and the Python community - actively encourages people to contribute code, - documentation and resources for the benefit of - others.
-For this to work you need access to the source - code: the instructions for the computer that tell - it how to do the stuff you want it to do.
-Perhaps you already know this stuff and you're - just looking for a cool educational project to - which you can contribute. If so, you've come to the - right place!
- hack on code -
+