summaryrefslogtreecommitdiffstats
path: root/packages/views.py
AgeCommit message (Collapse)AuthorFilesLines
2011-07-29Fix package sort fieldsDan McGee1-1/+1
Don't list pkgname twice, include pkgbase instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06Add a few more valid package sort fieldsDan McGee1-1/+3
Just for fun and for people that know what they are doing. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06Refactor code to use new signoff modelDan McGee1-28/+92
This moves signoff creation and display to the new packages.Signoff model. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06Move package signoff URL to more logical locationDan McGee1-4/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Set up queries for staging reposDan McGee1-5/+8
This treats repo.staging special in much the way we already have to treat repo.testing as special. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-24Add (hidden) ability to search by last packagerDan McGee1-0/+10
This is used from the developer dashboard to add a new column to the stats of # of packages for a given developer where they were the last to do the packaging. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Differentiate between no filelist and empty filelistDan McGee1-2/+5
We had these two cases munged together before; some packages have seen filelist updates but simply don't have any files ('firefox-i18n' for example). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-16Remove automatic search redirection on count = 1Dan McGee1-3/+0
This is really annoying. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Refactor common select_related into manager methodDan McGee1-8/+7
For a Package object query, we almost always did .select_related('arch', 'repo). Refactor this into the manager as a 'normal()' method so we can avoid sprinkling the same logic everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Add JSON package details and files viewsDan McGee1-10/+44
These are retrieved by adding 'json/' to the normal package details or files view. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-03Never cache the stale relations pageDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18packages: pylint suggested cleanupsDan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18Update out of date flag screen and emailDan McGee1-9/+28
Now that multiple packages get marked out of date whenever this form is processed, have the page and email itself reflect this fact. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-16Only include known values in generated search queryDan McGee1-2/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-08Use UTC datetime objects everywhereDan McGee1-1/+1
Rather than the twisted mix of local times and UTC times we currently have. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-08Select related needed objects when pulling package detailsDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Allow virtual base packages to display in web interfaceDan McGee1-3/+23
Repurpose the old group details page to show a listing of all packages built from a particular pkgbase value, even if this value is not an actual package. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Generalize group details pageDan McGee1-2/+3
We will be able to use this same table-based package listing elsewhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-23Use select_related() on group details pageDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-16Fix valid_value() in "LimitTypedChoiceField" class.Lukas Fleischer1-5/+10
We just returned the coerced value in valid_value() which may become None if the valid value "all" was passed, resulting in valid_value() evaluating to False. Explicitly returning True if the value can be coerced without an error fixes this. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-15Only set limit if we have one, else default to 50Dan McGee1-1/+3
This was the cause of some pretty awesome performance headaches this morning. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-15Ensure package search form correctly handles errorsDan McGee1-16/+24
We were silently eating errors and just showing a normal package list if the form didn't validate. Rather than do that, make sure we return no packages at all and display the form errors back to the user in a sane fashion. Adjust the validation methods on the 'limit' parameter so any integer is acceptable. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-08Clean up current_query and preserve multiple argsDan McGee1-5/+5
When implementing search for multiple architectures or repositories, I didn't update this method to accomidate the new query parameters. Clean it up a bit by not appending/stripping the leading '?' anywhere but in the template itself, and ensure we can handle multiple of any parameter passed in. Fixes FS#23180. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-04Move new user email contents to templateDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-03Correct some permission decoratorsDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-03Make Arch and Repo a MultipleChoice on package searchDan McGee1-6/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-23Allow deleting of stale package relations via status pageDan McGee1-0/+13
Add a column of checkboxes to each table, enclose the whole thing in a form, and add a super-simple delete view that takes a list of IDs and removes them from the database. The delete_packagerelation permission is required to be able to delete relations. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-23Add stale package relations status screenDan McGee1-2/+19
For now it is read only. Display a few tables of various ways of detecting stale package relations. These include inactive users, pkgbase values that no longer exist, and users that are listed as maintainers that don't have the proper permissions for that package anymore. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-22Use new split package file fields everywhereDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-15Clean up Package related objects codeDan McGee1-2/+1
Main change is just to move groups from the default packagegroup_set location to a related_name of groups. Also refer to the Package class directly rather than by text string if we have it available. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-21Add an 'unflag all' optionDan McGee1-4/+14
This allows the exact opposite of the 'flag' option as presented to the end user, especially helpful for split packages. The original single unflag package option is also still available. Implements FS#22520. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-18Add arch-specific group overview pagesDan McGee1-3/+11
This is easy enough to refactor and support with our current infrastructure and group-fetching functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-18Make package signoffs AJAX if JS is enabledDan McGee1-14/+16
This makes the signoffs page a heck of a lot more usable as you can go through and click a bunch at once without waiting for the rather slow page to reload. Hopefully the first step to bringing life back into this part of the site. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-07Always allow a developer to disown a packageDan McGee1-17/+22
Don't check the valid repos when disowning; this should address the biggest part of FS#20687 where a package going from [community] to [extra] can't lose it's old maintainer due to permission issues. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-04Display flag date in package search and allow sortingDan McGee1-2/+2
This exposes something we added a while back, and has been shown elsewhere, but will now be available for everyone to see. Also change the default search order to just be by pkgname; we don't need to do a multi-column search by default. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-18Move hardcoded email address to settings fileDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Make user profile a OneToOneFieldDan McGee1-1/+1
We had this set up as a unique ForeignKey before, which adds some indirection due to the RelatedManager object being there. By making it a OneToOneField, we can get the profile object directly, enforce uniqueness, and also use it in select_related() calls to make our profiles page a bit more efficient. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Use arch.agnostic flag everywhereDan McGee1-4/+6
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-06Move mirror models out of main appDan McGee1-1/+1
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-03Use direct_to_template in all remaining possible placesDan McGee1-30/+23
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-08-28PyLint suggested cleanupsDan McGee1-14/+15
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-28Move package utility functionsDan McGee1-100/+6
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-28Add package groups to front page and cache resultsDan McGee1-1/+2
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-28Add last updated column to package groups viewDan McGee1-4/+8
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>
2010-08-28Add a package group overview pageDan McGee1-2/+40
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28Add a group details viewDan McGee1-1/+16
This makes the support asked for in FS#19801 a lot more useful since we actually have an overview page for the entire group. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-25Package Differences by Architecture viewDan McGee1-0/+67
Implements FS#20416. Port over the architecture differences view from archlinux.de and reimplement in Django with our DB schema. Also use a far simpler SQL query to do the dirty work rather than the triple UNION operation. This is accomplished by doing a bit more of the fetching work in code once we know what packages are actually involved. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-13Show maintainer full names in search dropdownDan McGee1-8/+6
Instead of just showing usernames. It is especially helpful since we have many similarly named developers at this point. In addition, only show active developers/TUs and remove the rest from the list. Also remove some cargo-cult code that set widget.choices; this is not necesary as the widget automatically grabs the choices from the field. Signed-off-by: Dan McGee <dan@archlinux.org>