summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-07-10Add some more template fragment cachingDan McGee3-0/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-10Make the cache_function key a bit more descriptiveDan McGee1-0/+1
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-07Enable template fragment caching on main pageDan McGee1-0/+5
The left and right sidebars are the same for everyone, so cache both pieces as template fragments so we aren't constantly re-rendering them. Due to cookies being present in the 'Vary:' header, this at least allows some benefit of caching at a lower level than the middleware can handle. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Add a requirements.txt file for pipDan McGee1-0/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Get news markdown formatting working everywhereDan McGee5-8/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Format all news items using markdownDan McGee6-9/+50
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-07Make package search box look better with wider fontsDan McGee2-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Add note to package when version is in testingDan McGee1-9/+9
And the package has been flagged out of date. Should make people relax a bit. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Add helper method to package to find self in testing repoDan McGee1-0/+10
This will be useful in templates getting touched in an upcoming commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Remove old needupdate columnDan McGee2-1/+192
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Update code to use new flag_date columnDan McGee6-12/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-07Make flag column on packages a dateDan McGee3-0/+384
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Set font color for package search boxDan McGee1-1/+1
Since we explicitly set a background color for this text input, we should set a foreground font color as well so those with dark themes don't see white text on a white background. Addresses FS#19290. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Show incomplete todo list packages in dev dashboardDan McGee2-4/+38
Implements FS#20081. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Add absolute URL method for todo listsDan McGee4-5/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Defer loading news content when listing news itemsDan McGee1-1/+2
No need to pull back some 500 news articles when we just want the basics of title, date, and author. Speaking of author, we might as well load that at the same time too. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Add styling to errorlist classDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Default country selection to AnyDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Add mirrorlist link to main pageDan McGee2-0/+2
Not terribly thrilled with the location, but it will have to do for now. If we get a better idea later it can definitely be moved. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03mirrorlist: allow filtering by protocolDan McGee3-14/+31
And add some more "static" URLs to access the non-country filtered lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Link to the mirrorlist page from downloadsDan McGee1-0/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Get mirrorlist view ready for general useDan McGee4-23/+39
Make the page much more flexible- allow multiple countries to be selected rather than just one in the form. Also add a lot more text to the page, and move the 'all' option out into its own subheading rather than being in the same form. Both GET and POST requests are now allowed for ease of use from non-browser scenarios or those that wish to update their mirrorlist automatically and submit parameters to the URL. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Add mirror protocols fixtureDan McGee1-0/+23
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Remove arch from mirrorlist generationDan McGee3-16/+5
With pacman 3.4.0, we can now use the $arch variable so we don't need architecture-specific mirrorlists. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Add some text when no packages could be foundDan McGee1-0/+7
This text also includes a link to search the AUR for the same keywords. This implements FS#19904. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-03Only 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-28Mark the todolists' flag view as never_cacheEvangelos Foutras1-2/+1
Also remove the @vary_on_headers('X-Requested-With') since it's irrelevant now. Dan: remove now unnecessary import. Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-25Mark a few more pages as never cacheDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-25Get unit tests up and running againDan McGee3-6/+6
We had some dependency issues between migrations that needed to be explicitly defined in order to get things fully moving, and do to some braindeadness in Django tests not including the project url config, we need to do some clever business when using the url tag in the base template so tests don't doe with a NoReverseMatch exception. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-22Add 'never_cache' decorator in a bunch of placesDan McGee4-0/+16
Now that we cache everything, we need to ensure anyone doing edits and such gets the live data and not some cached version that was already updated and is now stale. Add the never_cache decorator to any of the CUD screens as well as a few others that might benefit from always being regenerated. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Cache results of get_depends() and get_requiredby()Dan McGee1-5/+3
Do it in our actual cache rather than an object-level, single request cache. 300 seconds is good enough resolution to have this data right; if it is updated everyone will see the results 5 minutes late at the most. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Cache the recent updates listDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Add utility cache_functionDan McGee1-0/+35
This allows caching the results of an arbitrary function and its arguments in the Django-managed cache, e.g. memcached in production. 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-21Get a more accurate count of adopted packagesDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Update to the new messages frameworkDan McGee2-11/+18
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-21Remove AutoUserMiddlewareDan McGee4-23/+14
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-21Fix template syntax errorDan McGee2-2/+2
Whoops, forgot the closing tag when I was playing with autoescape. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Move scripts to bottom of package searchDan McGee1-5/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Fix missing calendar iconDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-17Update fixturesDan McGee2-12/+24
We have added some repos and some fields to these guys, so update them with what we have in production at the moment. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-17Super quick updates to READMEDan McGee1-2/+2
2010-06-17Fix autoescape in plain text emailsDan McGee2-7/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-12Remove action when submitting to same URLDan McGee8-8/+8
It looks like the `action="."` business was screwing up some browsers, notably lynx and links. We don't need it as the default is to submit to the same page anyway, so kill this gunk and see if it fixes a login CSRF issue. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-09Enhance base package listing in package detailsDan McGee2-3/+52
Add two methods to the package class, base_package() and split_packages(), that allow us to grab other related packages to one we are interested in. This allows us to list the Base Package on the package details page as a link. With the split_packages() method, we can also now list and link all sub-packages on the package details page; e.g. for 'kernel26' we can now link through to 'kernel26-firmware' and 'kernel26-headers'. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-08Add silhouette imageDan McGee1-0/+0
We don't serve this directly from here but we can at least put it in version control. It is the default image for devs if one isn't available elsewhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-08Update feeds to new 1.2 frameworkDan McGee2-19/+17
Feeds are now views-based and don't need the dictionary anymore. get_object() now takes named arguments as well making it a bit more understandable when reading the code. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-08Use Sites framework instead of hardcoded domain nameDan McGee4-4/+13
Instead of putting 'www.archlinux.org' all over the place, use the Django sites framework to pull the site name out of the database. Now these amazing things will work if you are running locally and decide to change the site! Signed-off-by: Dan McGee <dan@archlinux.org>