Commit Graph

70 Commits

Author SHA1 Message Date
Dan McGee
5a91a246a8 Remove all cache middleware
It's time to stop serving up stale pages. Remove this middleware caching
and start pushing it down to spots where we can actually control it more
appropriately (and only cache things that are expensive anyway).

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03 14:22:01 -06:00
Dan McGee
943ef2e8e4 Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.

Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 23:06:10 -06:00
Thomas Bächler
c9d51d08c9 download: add a link to the new netboot environment
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 17:46:18 -06:00
Dan McGee
84679f90a7 Move certain settings above local settings import
This ensures one can override them in local_settings.py if necesary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-15 14:37:46 -06:00
Dan McGee
12408702ea Allow population of signoff specs with SVN commit messages
This pulls them from the latest SVN commit on trunk. We don't have a
failproof method of getting the exact right commit, but this should be
close if it is run on a regular basis via cron (aka hourly).

Note that running locally, I needed the development version of South to
get the migration included here to apply because of information_schema
changes in the current version of MySQL.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-14 12:27:38 -06:00
Dan McGee
d5063bd1d2 Add package visualizations page
Why the hell not? Have fun clicking all the pretty buttons.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-05 15:45:44 -05:00
Dan McGee
e3ac143894 Settings refresh
Update a few things in settings.py, but more importantly, update
local_settings.py.template to be more in line with modern Django
settings.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 16:30:14 -05:00
Dan McGee
1bcb2b7ed0 Add a default datetime format
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:45:08 -05:00
Dan McGee
1840416b9e Add a PGP key field on the dev profile
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02 16:21:08 -05:00
Dan McGee
bfe6afcd7a Rename isotests to releng
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-28 17:58:13 -05:00
Dan McGee
6516220b17 isotests: update some syntax and ways of doing things
To be more Django-like, Pythonic, or to fit better in the existing
archweb project. Also add some created fields to the models, as storing
dates for anything is almost always a good idea.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-28 14:00:54 -05:00
Tom Willemsen
c5a28f8893 isotests: modelines, imports, url and pass
* Added vim modelines to files.
* Rearranged import statements.
* Moved the arch releng isos url to settings.py.
* Fixed some issues that arose from forgetting to import the isotests urls
  package.
* removed redundant str() calls.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-28 14:00:54 -05:00
Tom Willemsen
1547c7c49a isotests: entry and listing of release engineering tests
Add a new project for entry and listing of testing results for our
release ISOs. This will assist the release engineering team with
determining a good ISO to make into the real deal.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-28 13:15:54 -05:00
Dan McGee
c4a335d5da Remove duplicate TEMPLATE_LOADERS config
Whoops. This has been there a while.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-14 08:32:54 -05:00
Dan McGee
3e73b5d7d2 Make it very easy to use the Django debug toolbar
Add a config option DEBUG_TOOLBAR that defaults to False. If set to True
in local_settings, add the relevant application and middleware to the
settings to enable it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-10 09:35:35 -06:00
Dan McGee
8d7941c1dd Settings file tweaks
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-06 10:30:46 -06:00
Dan McGee
d8b1f99824 Remove default admins
Set them in local_settings instead.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-06 10:28:10 -06:00
Dan McGee
b0131749ac Unify hyphenation of out-of-date text
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-19 09:05:26 -05:00
Dan McGee
778146cf61 Move hardcoded email address to settings file
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-18 15:00:44 -05:00
Dan McGee
2b8f7772ad Make it possible to override settings
By importing local settings at the end, you can override settings specified
in settings.py. Helpful for something like the Django debug toolbar. The
template loader needs to come last, however, in order to respect the
TEMPLATE_DEBUG setting.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05 11:55:30 -05:00
Dan McGee
47c95a2821 Get secure/unsecure checking actually working
We need a bit more, like actually having something relevant in the
RequestContext object, in order for this to all work. Instead of putting the
full request in just populate a 'secure' key with a boolean value indicating
whether the request is secure.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-22 23:16:13 -05:00
Dan McGee
b084936ad9 Ensure consistent date formatting everywhere
Set up a default DATE_FORMAT in settings.py and use it everywhere we do the
'|date' template filter rather than hardcoding the value in the template.
This also fixes a regression with news date/time now that we changed the
field to store both date and time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-14 18:47:12 -05:00
Dan McGee
3394a94a40 Re-enable etags
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-14 18:41:29 -05:00
Dan McGee
6c54cdb9ca Reorder middleware to be more inline with Django defaults
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-14 17:41:46 -05:00
Dan McGee
9df541f95f Implement package difference filtering
This is done as client-side JS which makes the page nice and fast. Minor
versions can be excluded, as can packages in [multilib]. In addition,
architecture filtering is in place so you can limit the subset of shown
packages to those in any, both, one or the other.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08 00:09:13 -05:00
Dan McGee
dbde19828f Enable the cached_db session engine by default
This will work out well when using memcached in production, and should just
fall back to using the DB when developing locally with no cache or any other
sort of caching.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-09 13:33:09 -05:00
Dan McGee
141cff90d2 Clean up settings file
Unify to using single quotes everywhere. No functional changes.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-09 13:32:56 -05:00
Dan McGee
7ca91098fa Turn off L10N and I18N
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-10 10:07:49 -05:00
Dan McGee
ad162d74db Format all news items using markdown
Implements FS#13741. A preview function is also added so working with news
items is easier to make sure you get the formatting right.

This will result in some older news items looking a bit weird if they didn't
put linebreaks in all the right places, we can fix a few of these as we
notice them.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06 20:16:10 -05:00
Dan McGee
345b38898a Only use cached template loader in production
Otherwise it is really confusing when you make template changes during
development and they don't show up immediately.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-02 17:47:27 -05:00
Dan McGee
03ccd8ad8c Use the cached template loader
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21 00:20:42 -05:00
Dan McGee
7025316808 Cache everything, not just anonymous only
We should be well-protected by the "Vary: Cookie" header, and if we aren't
then we need to fix those pages that matter. This is the final step in
getting at least the heaviest hit part of our site to be served without any
Vary headers at all- the feeds.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21 00:19:31 -05:00
Dan McGee
f123348c7d Update to the new messages framework
This is also another step in making sure we don't unnecessarily access the
Django session object and thus add a Vary cache control header we don't
want.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20 23:56:03 -05:00
Dan McGee
67f6bc546e Remove AutoUserMiddleware
This was having some serious effects on caching as we would always have to
access the user in the session, marking every page with a "Vary: Cookie"
header. This is the start of stamping that out. The way we get the user for
news item creation is now more similar to that from the todo lists, but not
quite. That should be adjusted to be more like the news item creation.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20 23:31:34 -05:00
Dan McGee
bad2825fab Updates for CSRF protection in Django 1.2.X
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05 12:58:31 -05:00
Dan McGee
6f9308abd9 Redirect to root url after login
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17 14:49:43 -05:00
Dan McGee
4b7335f713 Add a hacked version of Django UpdateCacheMiddleware
This is to address a rather large issue with caching of feed objects in
Django. Because they are built up using an XML library that does multiple
writes on a file-like object, a single feed object, even when pulled from
memcached, generates 1582 writes to the open socket rather than the optimal
one it could do.

Some version of this fix will be making it upstream, but I need to figure
out how to approach that before I do so and for now this will address one of
our larger performance issues on the live site since the packages feed is
hit as often as it is.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04 10:53:40 -05:00
Dan McGee
30073392a4 Add initial South migration for 'main' app
Thanks to Evangelos Foutras for the inspiration. Recreated from scratch only
to make sure everything is in sync.

From this point on, you will need to have the 'south' Django/Python package
installed to use archweb.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31 13:20:49 -06:00
Dan McGee
b48f5ae17a Make all app name inclusions relative
No need to slap 'archweb' in all of these in the settings file.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31 13:17:03 -06:00
Ismael Carnales
c6564e2c5b Remove default debug setting in main settings
Signed-off-by: Ismael Carnales <icarnales@gmail.com>
2009-11-15 03:04:03 -02:00
Ismael Carnales
0f4e480eec added USE_ETAGS setting from archweb_pub 2009-11-09 22:32:13 -02:00
Ismael Carnales
f25a80c06b added chache middlewares and anonymous only cache setting 2009-11-09 22:30:40 -02:00
Ismael Carnales
6243f7ba66 added mirrors app from archweb_pub 2009-11-09 22:24:46 -02:00
Ismael Carnales
c1a197d29a added sitemaps from archweb_pub 2009-11-09 22:24:45 -02:00
Ismael Carnales
7cd5c1f5a6 added public app 2009-11-09 22:24:40 -02:00
Ismael Carnales
69404ac120 removed RequireLoginMiddleware 2009-11-09 22:24:38 -02:00
Ismael Carnales
48904e4857 modified import paths from archweb_dev to archweb 2009-11-09 22:24:34 -02:00
Dusty Phillips
0d2560fa55 Add a page to aid Aaron in user creation. 2009-08-10 15:47:02 -04:00
Dan McGee
98155937e0 Remove caching crud from archweb_dev
We aren't going to enable this because it is a restricted-access site, so no
need in keeping the crud around.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-11-27 20:35:49 -05:00
Dusty Phillips
0e0265a624 drop useless view 2008-10-10 18:51:06 -04:00