summaryrefslogtreecommitdiffstats
path: root/settings.py
AgeCommit message (Collapse)AuthorFilesLines
2013-02-08Minify static files when running collectstaticDan McGee1-1/+1
This doesn't do any super optimizations, but does run the very basic cssmin and jsmin Python tools over the static resources we serve up. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-28Extract torrent trackers into a settings variableDan McGee1-0/+6
This allows them to be overridden and changed in a central location, like we do with the SVN URL, PXE boot URL, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-21Switch to using the cached STATICFILES_STORAGE backendDan McGee1-0/+3
This should finally let us crank up the Expires: header to far-future values in production since updates to JS and CSS files will take effect immediately. Some minor removals were made from retro stylesheets as they were referencing files that don't actually exist because they were missing from the web archive. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-20Remove AlwaysCommitMiddlewareDan McGee1-1/+0
Let's just go with the Django database option for PostreSQL autocommit mode instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Add new AlwaysCommitMiddleware to the stackDan McGee1-0/+1
The reason for this is documented in the middleware itself. Without this, pgbouncer is of little use to us since it has to throw away every connection we try to route through it because of unclean disconnects. In theory, with the switch to using pgbouncer for all WSGI originating connections and adding this middleware, we should see a notable decrease in connection time to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Disable XView MiddlewareDan McGee1-1/+0
This is the default now in Django anyway: https://code.djangoproject.com/ticket/7317 Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-30Remove several context processors we don't useDan McGee1-3/+0
We're not using any of the injected values these context processors provide in our templates, so remove them from our default config. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-30Enable clickjacking protection via middlewareDan McGee1-0/+4
See https://docs.djangoproject.com/en/1.4/ref/clickjacking/ for details. This middleware was added to the default configuration in Django 1.4. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-10-26Remove usages of 'django.contrib.markup'Dan McGee1-1/+0
Switch to the news model being able to spit out the HTML version of the content, and don't use the markup contrib module. This is deprecated as of Django 1.5 so we can move off it now to save trouble down the road when it is fully removed. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-13Enable rate-limiting log filterDan McGee1-0/+26
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-28Convert releng URLs to https by defaultDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27Remove misleading comment from settings.pyDan McGee1-2/+0
We're not using cache middleware anymore, and this bug is fixed anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25Add django_countries country code fields and population migrationsDan McGee1-0/+1
This adds these columns and attempts to populate them with data from our existing country column data. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20UserProfile model and fields shuffleDan McGee1-1/+1
Move this model into the devel/ application, and move the PGPKeyField which is used only by these models into the application as well. This involves updating some old migrations along the way to ensure we don't reference a field class that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23Change default SVN URLDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23Make all datetime objects fully timezone awareDan McGee1-3/+7
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to ensure we don't mix aware and non-aware datetime objects when dealing with datetimes in the code. Add a utc_now() helper method that we can use most places, and ensure there is always a timezone attached when necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-18Add a retro site view and link it to a URLDan McGee1-0/+1
This is from our friends at web.archive.org, who's earliest capture of the Arch Linux website was on March 28, 2002. Seems like something nice to do around the 10th anniversary of the website being up and the distro being around, and not hotlinking their servers also seems like a good idea. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03Remove all cache middlewareDan McGee1-2/+0
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>
2011-12-05Convert to and enable staticfiles contrib applicationDan McGee1-7/+16
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-05download: add a link to the new netboot environmentThomas Bächler1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-15Move certain settings above local settings importrelease_2011-11-15Dan McGee1-7/+8
This ensures one can override them in local_settings.py if necesary. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-14Allow population of signoff specs with SVN commit messagesDan McGee1-0/+4
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-10-05Add package visualizations pageDan McGee1-0/+1
Why the hell not? Have fun clicking all the pretty buttons. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16Settings refreshrelease_2011-08-16Dan McGee1-1/+4
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-07-05Add a default datetime formatDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02Add a PGP key field on the dev profileDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-28Rename isotests to relengDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-28isotests: update some syntax and ways of doing thingsDan McGee1-2/+2
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-28isotests: modelines, imports, url and passTom Willemsen1-0/+3
* 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-28isotests: entry and listing of release engineering testsTom Willemsen1-0/+1
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-03-14Remove duplicate TEMPLATE_LOADERS configDan McGee1-19/+12
Whoops. This has been there a while. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-10Make it very easy to use the Django debug toolbarDan McGee1-0/+9
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-01-06Settings file tweaksDan McGee1-14/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-06Remove default adminsDan McGee1-3/+1
Set them in local_settings instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-19Unify hyphenation of out-of-date textDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-18Move hardcoded email address to settings fileDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make it possible to override settingsDan McGee1-9/+15
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-09-22Get secure/unsecure checking actually workingDan McGee1-0/+10
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-14Ensure consistent date formatting everywhererelease_2010-09-14Dan McGee1-0/+3
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-14Re-enable etagsDan McGee1-2/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-14Reorder middleware to be more inline with Django defaultsDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Implement package difference filteringDan McGee1-0/+2
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-08-09Enable the cached_db session engine by defaultDan McGee1-1/+2
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-09Clean up settings fileDan McGee1-5/+5
Unify to using single quotes everywhere. No functional changes. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-10Turn off L10N and I18NDan McGee1-0/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Format all news items using markdownDan McGee1-0/+1
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-02Only use cached template loader in productionDan McGee1-5/+9
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-06-21Use the cached template loaderDan McGee1-0/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Cache everything, not just anonymous onlyDan McGee1-2/+0
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-20Update to the new messages frameworkDan McGee1-0/+4
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>