summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-09-14Improve request handling for feeds that haven't changedDan McGee1-0/+37
By using the condition decorator (in a slightly odd way because these are class-based views), we can cut down a lot on the response time for returning 304 status code for feeds that haven't changed. The decorator means we no longer have to completely render the view to see if we can return a 304 status code. 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-14Add last modified date to newsDan McGee2-1/+76
This will come in handy when determining whether resources are out of date, such as our news RSS feed. Also bump the Date fields to DateTime fields for sake of sorting and if we have more than one news item on the same date. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-12Bump requirements for Django security releaseDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-12reporead: revamp database parsing codeDan McGee1-93/+64
This needed a little sprucing up as it has grown quite organically over the life of this script. Make things a bit more pythonic through the use of iterators rather than collection indexing, and try to generalize the special cases of things a bit. Also catch encoding problems early and fail gracefully rather than blow up the entire package parser. A failed decode of a file should cause us to just skip it rather than stop the entire parser. Worst case, this leaves that package out of the web interface. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-12Check for correct permission when creating usersrelease_2010-09-12Dan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-10Restore flagged package count by maintainer in dashboardDan McGee3-12/+44
We need to do a little dropping into SQL to accomplish this, but it isn't all that bad to actually do and we can do the whole thing in one query. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-10reporead: allow traceback on USR1 signal as wellDan McGee1-2/+3
When I have caught reporead behaving badly on the production box, I haven't been able to successfully get a traceback without killing the process. Hopefully using a different signal will allow me to actually capture some data. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-10Remove SomethingFishyExceptionDan McGee1-7/+2
Just use a plain Exception instead since we don't get any added value by subclassing. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-09Improve todo list view pageDan McGee2-6/+22
Add total package count and incomplete package count columns. Also reduce the number of total queries by killing the query per row that was happening before. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-09Remove redundant text from groups package count columnDan McGee1-12/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-09After moving models, update content type tablerelease_2010-09-09Dan McGee1-0/+169
The one thing that people forget to mention when moving models from one Django app to another. I was fooled here. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-09Hide multilib by defaultDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Update arch fixture with new columnDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Use arch.agnostic flag everywhereDan McGee3-10/+17
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Add metadata to Arch tableDan McGee4-1/+313
Add a column flagging whether this architecture is agnostic (e.g. 'any') or not. This will remove the hardcoded name checks we have all over the place and replace it with a boolean. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Fix download links to work with package poolsDan McGee1-1/+5
With package pooling we don't put things in the '/any/' folder anymore under each repository; they only show up in the actual architectures. Use a 'real' architecture as part of the download link to rectify this. Fixes FS#20779. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Add links to arch differences pageDan McGee2-1/+4
Hopefully finishes FS#20416. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Developer dashboard fixesDan McGee1-32/+41
As reported by Thomas, the dashboard JS dies when we try to apply table sorting to a table with no entries (those in the top section). Use some selector magic to only apply tablesorting if the table actually has rows worth sorting. Also move the package todo lists table down in the dashboard as the other two tables are more relevant for the individual developer. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Remove leftover console.logDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Remove explicit ordering from admin specsDan McGee1-2/+0
The default ordering from the model itself will apply so no need to specify it here as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Re-ID sponsors div so it skirts adblockDan McGee2-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Show news in adminDan McGee1-0/+10
And be able to do filtering/sorting/etc. with it. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Paginate the news list viewrelease_2010-09-08Dan McGee4-0/+31
This view was getting huge with ~500 items on it, and most people are not really interested in seeing every single news item. Use the drop in pagination and add some controls that still allow browsing to any page of the list. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Move news model to an appropriate placeDan McGee8-22/+247
Never would have guessed it should actually be in news/models.py. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Put news under south controlDan McGee3-0/+21
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Add 'for' attributes to search form labelsDan McGee1-8/+8
And also add the new style class we will need so the search form retains the prior look, now that we are using this style elsewhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Implement package difference filteringDan McGee4-23/+117
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-07Split and update the pip requirements fileDan McGee2-5/+6
Add a second file for use in production environments where we know we use memcached and MySQL, and for those that want to replicate the production environment as close as possible. Slim down the primary file to those requirements the app directly needs rather than how it is installed. Also bump the version of South to the newer point release. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-07Use flagged style on versions in package differencesDan McGee1-2/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-07Make flagged style class apply to all tablesDan McGee1-3/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-06Move mirror models out of main appDan McGee10-117/+342
South actually makes this relatively painless if you get everything right, so might as well start getting these out of the legacy main application to eventually eliminate models being separate from their views. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-06Put mirrors app under South controlDan McGee3-0/+17
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-06Remove unnecessary commentsDan McGee1-9/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Use direct_to_template in all remaining possible placesDan McGee5-65/+47
Rather than the need to include RequestContext() calls directly, we can just use direct_to_template to do all the work for us. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Use direct_to_template in public viewsDan McGee1-10/+5
Saves the hassle of needing to wrap everything in RequestContext() manually. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Enable template fragment caching on package details pageDan McGee1-0/+5
We can't cache most of the package actions links stuff because we look at the user there, but we can cache everything on the left and the content of the bottom boxes. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Add links to 'Versions Elsewhere' on package details pageDan McGee2-35/+55
This will allow clicking through to a few more associated packages from a given package, including those for the other architecture and potentially in other repositories. The box floats to the right with the package actions, which have also been restyled slightly so the whole area is a bit more styled and set off from the rest of the page. This should allow us to close the current oldest bug open in the Arch bug tracker, FS#7787. I remember the days when every bug was a four-digit number... Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Add ability to get versions of a package elsewhereDan McGee1-0/+7
E.g. if we are looking at one version for a particular architecture, I want to see all versions for all architectures in all repositories. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-02Add pkgcount sort helper to count column on groups pageDan McGee1-1/+11
Forgot it here when adding it to all of the tables on the devel dashboard. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-01Ensure long package descriptions wraprelease_2010-09-02Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-01Dev dashboard: enable sorting by package countDan McGee1-3/+12
Add another custom parser to the mix here so we can sort by package count, which just involves extracting the digits from the table cell contents and ignoring the text. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-01Make sort work on developer todo list statusDan McGee1-1/+13
Because it was a link, the sort didn't properly sort on the complete/incomplete status when viewing a todo list. Add a custom parser to fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28PyLint suggested cleanupsDan McGee9-67/+75
We had a bunch of extra imports, non-conventional variable names, spacing issues, etc. that were relatively low-hanging fruit to clean up. Fix them and make the code a bit cleaner in the process. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28Mark todo desc as safe on dev dashboardDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28Move package utility functionsDan McGee3-102/+111
We now have a few of them, so move them to their own file like we do in the other applications. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28Move differences into it's own functionDan McGee1-5/+8
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27Add package groups to front page and cache resultsrelease_2010-08-27-2Dan McGee2-1/+4
Make it more visible to the public, and cache the results of the group information function since it was designed and made separate for that purpose and the results can safely be reused without needing to worry too much about it being stale. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27Add a package groups sitemapDan McGee2-6/+22
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27Add last updated column to package groups viewDan McGee2-4/+10
Just another annotation to the queryset to get this data, and a little more manipulation in the group data function. This will help when adding a sitemap in a subsequent commit. Signed-off-by: Dan McGee <dan@archlinux.org>