Skip to content

Commit

Permalink
Rename "example" dir to "sample_project"
Browse files Browse the repository at this point in the history
  • Loading branch information
tobami committed Aug 26, 2012
1 parent b9ca769 commit afb518c
Show file tree
Hide file tree
Showing 24 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
*.pyc
*.db
example/repos/*
sample_project/repos/*
override
24 changes: 12 additions & 12 deletions README.md
Expand Up @@ -36,10 +36,10 @@ can take a long time. Please be patient.

* Download the last stable release from
[http://github.com/tobami/codespeed/downloads](http://github.com/tobami/codespeed/downloads), unpack it and install it with `python setup.py install`.
* To get started, you can use the `example` directory as a starting point for your Django project, which can be normally configured by editing `example/settings.py`.
* To get started, you can use the `sample_project` directory as a starting point for your Django project, which can be normally configured by editing `sample_project/settings.py`.
* For simplicity, you can use the default sqlite configuration, which will save
the data to a database named `example/data.db`
* Create the DB by changing to the `example/` directory and running:
the data to a database named `sample_project/data.db`
* Create the DB by changing to the `sample_project/` directory and running:

python manage.py syncdb

Expand All @@ -55,7 +55,7 @@ can take a long time. Please be patient.
The codespeed installation can now be accessed by navigating to `http://localhost:8000/`.

**Note**: for production, you should configure a real server like Apache or nginx (refer to the [Django docs](http://docs.djangoproject.com/en/dev/howto/deployment/)). You should also
modify `example/settings.py` and set `DEBUG = False`.
modify `sample_project/settings.py` and set `DEBUG = False`.

# Codespeed configuration

Expand All @@ -73,7 +73,7 @@ integration, configure the relevant fields.
**Note**: Only executables associated to projects with a checked "track changes"
field will be shown in the Changes and Timeline views.

**Note**: Git and Mercurial need to locally clone the repository. That means that your `example/repos` directory will need to be owned by the server. In the case of a typical Apache installation, you'll need to type `sudo chown www-data:www-data example/repos`
**Note**: Git and Mercurial need to locally clone the repository. That means that your `sample_project/repos` directory will need to be owned by the server. In the case of a typical Apache installation, you'll need to type `sudo chown www-data:www-data sample_project/repos`

# Saving data

Expand All @@ -97,7 +97,7 @@ section).
## Custom Settings

You may override any of the default settings by creating the file
`example/override/settings.py`. It is strongly recommended that you only override the
`sample_project/override/settings.py`. It is strongly recommended that you only override the
settings you need by importing the default settings and replacing only the
values needed for your customizations:

Expand All @@ -108,7 +108,7 @@ values needed for your customizations:
### Site-wide Changes

All pages inherit from the `site_base.html` template, which
extends `base.html`. To change every page on the site simply edit (`example/templates/site_base.html`) which extends `base.html` and override
extends `base.html`. To change every page on the site simply edit (`sample_project/templates/site_base.html`) which extends `base.html` and override
the appropriate block:

* Custom title: you may replace the default "My Speed Center" for the title
Expand All @@ -118,7 +118,7 @@ the appropriate block:
My Project's Speed Center
{% endblock %}

* Custom logo: Place your logo in `example/override/media/img` and add a block like
* Custom logo: Place your logo in `sample_project/override/media/img` and add a block like
this:

{% block logo %}
Expand All @@ -128,7 +128,7 @@ the appropriate block:
n.b. the layout will stay exactly the same for any image with a height of
48px (any width will do)

* Custom JavaScript or CSS: add your files to the `example/override/media` directory
* Custom JavaScript or CSS: add your files to the `sample_project/override/media` directory
and extend the `extra_head` template block:

{% block extra_head %}
Expand All @@ -138,11 +138,11 @@ the appropriate block:

### Specific Pages

Since `example/override/templates` is the first entry in `settings.TEMPLATE_DIRS` you
Since `sample_project/override/templates` is the first entry in `settings.TEMPLATE_DIRS` you
may override any template on the site simply by creating a new one with the
same name.

* About page: create `example/override/templates/about.html`:
* About page: create `sample_project/override/templates/about.html`:

{% extends "site_base.html" %}
{% block title %}{{ block.super }}: About this project{% endblock %}
Expand All @@ -161,7 +161,7 @@ same name.
of projects being tracked as an executable as well.

## Defaults
The file `example/settings.py` can contain customizations of
The file `sample_project/settings.py` can contain customizations of
several parameters (the file includes comments with full examples).

### General settings:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions example/settings.py → sample_project/settings.py
Expand Up @@ -6,6 +6,7 @@
TEMPLATE_DEBUG = DEBUG

BASEDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(BASEDIR)[1]

#: The directory which should contain checked out source repositories:
REPOSITORY_BASE_PATH = os.path.join(BASEDIR, "repos")
Expand Down Expand Up @@ -92,8 +93,7 @@ def process_exception(self, request, exception):
# set shown level of logging output to debug
logging.basicConfig(level=logging.DEBUG)


ROOT_URLCONF = 'example.urls'
ROOT_URLCONF = '{0}.urls'.format(TOPDIR)

TEMPLATE_DIRS = (
os.path.join(BASEDIR, 'templates'),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit afb518c

Please sign in to comment.