# ESP Website Howto #
Welcome to your new website based on the ESP Website codebase! This document is meant to introduce you to just a few of the many features that this code gives you access to.
Even this restricted description is quite large; you probably won't need all of it. But, it's here for reference anyway.
## ESP Wiki ##
This site is meant to be used like a heirarchical Wiki: Any URL pointing to the site and ending in ".html" can become a Web page with editable content. To create a page, just go to it while logged in as an Administrator user for that page (we'll go into permissions later). You'll be given a does-not-exist message, with a link allowing you to create the page
If you decide to create the page, you'll be given an edit form where you can type in content for the page. The page's content uses the [Markdown](http://daringfireball.net/projects/markdown/syntax "Markdown Syntax") language, but with one addition: If, in the Markdown content, you link to an image or file with a URL of exactly the form "qsdmedia/[filename].[ext]", that file becomes a magic Wiki file. When you next save and return to the Edit form, the Edit page will contain a file-upload box that lets you upload this file to the server.
## Nav Bars ##
You'll (hopefully!) notice that, on the left side of most Web pages, there is a navigation bar that's basically a list of links. By default, it's empty; feel free to fill it in.
Programs do automatically enter links to their own registration pages and course catalogs, into the navigation bar of any Wiki pages that are sub-pages of them, URL-wise (ie., ".../programName/ThingsToDo.html") would contain automatic Nav Bar links from "programName").
## Programs ##
At ESP, we run a lot of programs for students (Splash, HSSP, Delve, SAT Prep, Junction, etc). We have a whole huge code infrastructure associated with making this happen.
Right now, the only way to create a program is to do slightly annoying things with the Admin interface (see below). However, it's been a long-term goal to make a "Make Program Happen!" button, where you just fill out a short Web form, and the website generates a program for you, complete with customizable and self-opening and closing teacher and student registrations, a self-generating course catalog, mailing lists (if your server does e-mail) and Wiki pages for each class, a management interface where you can tweak your program and watch it grow, a set of automagic LaTeX/PDF printables for your program (a printable catalog, printable student schedules, etc), and more.
There's an almost-finished version of the Make Program Happen button running on Mike Price's computer; he's currently fixing a few last bugs, and will hopefully release it very soon. If you need a program immediately, ask us and we'll tell you the Admin-interface magic to get the equivalent effects.
## Admin Interface ##
This website uses the [Django](http://www.djangoproject.com/ "The Django Project website") Web framework. One of Django's unique features is its [Admin interface](http://www.djangoproject.com/documentation/tutorial02/ "Django Admin interface"). You can get at this interface at site/admin/](/admin/).
We won't go into detail here about how to do stuff with the Admin Interface; there's just far too much to do. Feel free to explore and ask questions, though. If you do explore, note that you will care mostly about the "User Bits" and "Data Trees" tables.
## Blogs and Announcements ##
Our website also supports basic blogs. Blog entries anchored to "Q/Web" (see "Permissions") show up as Announcements on your home page.
Currently, the only way to create a new blog entry is to go the the "Entries" table in the Admin interface, and add a new entry there.
We don't use this feature a whole lot, so it's not exceptionally well-developed; feel free to comment on it.
## Permissions ##
This site has a slightly exotic, and extremely flexible, permissions system. You'll probably eventually care about this, though hopefully the default permissions are reasonable to start.
Permission entries are of the form:
GRANT {user} {verb} ON {thing} FOR ({start time} TO {end time})
A permission can also be flagged as recursive.
* {user} is any registered user on the website. {user} can also be "Everyone" (or, equivalently, blank); this makes the permission apply to Everyone * {verb} is of the form "V/[something]/[something else]/...". On a Recursive permission, if you have "V/Thing", you also have "V/Thing/Stuff", "V/Thing/MoreStuff", "V/Thing/Red/Fish/Blue/Fish", etc. * {thing} is of the form "Q/[something]/[something else]". You'll notice that most things in our database have "Anchors" that are also of this form; by association, this is how you have a permission apply to an arbitrary thing. Recursive thing's work the same way as recursive verb's.
Thing's that you probably care about: * Q/Web : Contains all Wiki pages that don't belong to a particular Program. http://[your site]/about/about.html would, for example, be Anchored at Q/Web/about. * Q/Programs : Contains all Programs-related stuff; permissions that control access to registration, program-specific Wiki pages, etc.
Verb's that you probably care about: * V/Administer/* : Permissions to do various types of administration * V/Flags/UserRole/* : The role of this particular user (ie., Teacher, Student, Parent, etc). Typically granted recursively on 'Q', though in theory, a user could be made a Teacher on one program and a Student in another (we occasionally get people who want to do this).
Note: Permissions are stored in the "User Bits" table, in the Admin interface; currently, that's the only place where you can add them manually.
