summaryrefslogtreecommitdiff
path: root/packages/views.py
AgeCommit message (Collapse)Author
2010-07-06Update code to use new flag_date columnDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-22Add 'never_cache' decorator in a bunch of placesDan McGee
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-20Get a more accurate count of adopted packagesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Update to the new messages frameworkDan McGee
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-08Use Sites framework instead of hardcoded domain nameDan McGee
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>
2010-06-05Updates for CSRF protection in Django 1.2.XDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-26Add ability to download package from web interfaceDan McGee
After adding filename to the database, this is a rather simple request (see FS#19546). Right now the "randomly" chosen mirror happens to always be mirrors.kernel.org as it is the only one filed under the 'Any' country which is what we screen on. Perhaps this logic could be improved in the future but I don't see these links being all that high traffic anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-26Move package flagging URLs below the packageDan McGee
We were still using the user-facing package IDs here which we have eliminated everywhere else Change it to use the same user-friendly URL pattern we are using elsewhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-02Improve flag out-of-date logicDan McGee
Attempt to mark all packages built from the same PKGBUILD out of date at the same time by using pkgbase instead of pkgname. Ensure testing and non-testing repos are segregated as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Simplify code now that pkgbase is always definedrelease_2010-03-28Dan McGee
This allows some of our queries to get a lot simpler as well as removing the pkgbase_safe property added earlier. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Move package maintainer off of package modelDan McGee
This is an attempt to fix our long-standing problems dealing with maintainer information. Move the actual maintainer information off of the package model into a PackageRelation object, which has some flexibility to later represent more than just maintainership. This solves multiple problems: * If a package gets accidentally deleted, so did the maintainer info * Testing packages have always shown up as orphans * With split packages, it was easy to miss some of the sub-packages This commit does not include the deletion of the original maintainer column; that will come at a later time when I feel more confident that the data was migrated correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Use repo.testing flag instead of test-based checksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27files: template reuseDan McGee
Get rid of the copy/paste by including the sub-template. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Ensure our cache is correct with AJAX requestsDan McGee
Since the same URLs serve two different responses based on the request being AJAX or not, we want to ensure we don't cache the wrong one and serve it up incorrectly. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Make files view AJAX if supportedDan McGee
This will put the filelist inline on the package details page if using a capable browser. It should still fallback to a separate page if necessary (e.g. all those users using links on the site). Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Order the package files when viewingDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27Bring package files view up to speedDan McGee
Move it away from the numeric pkgid-based view of old to the new pretty URL format. This does nothing to actually make the view show files (or even provide a link to it), but that will come in future commits. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-17Clean up urlencode usage even moreDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-16More save() -> update() cleanupDan McGee
Use update() instead of for x in y: save(). Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-16Clean up adopt/disown logicDan McGee
We can pull the common queryset out into a local variable, as well as using the mass-update function provided on a queryset instead of resorting to iteration. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-16Use unicode-safe urlencode in package searchDan McGee
Django already provides an implementation of urlencode that is Unicode-safe. Use it instead of our own version. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-16Make packages view much more efficientDan McGee
The len() call was killing performance, especially in the default click-thru case where we show the packages list without any filtering (only sorting). Also use a well-placed select_related() to further drop the query count. As noted by the TODO, there is still more that can be done here to improve performance. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-10Remove archweb prefix from all importsDan McGee
Unnecessary, and lets us standardize on not using it everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-08Add OpenSearch support to the siteDan McGee
Implements FS#14185. It is a bit more complex than listed there as I wanted to not hardcode the URLs in the descriptor file; to do this we need to make it a template and fill some things in. We also need to serve the file using the correct mime type. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Make marking out of date actually workDan McGee
And honor the packager's notify flag, as Pierre pointed out. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Use select_related() to make a few more places more performantDan McGee
Especially when looking at packages, we always want the arch and repo. Another big hunk of changes deals with the very inefficient signoffs code. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Adjust models and views for nullable maintainerEvangelos Foutras
Signed-off-by: Evangelos Foutras <foutrelis@gmail.com> [Dan: made a few other small touchups] Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-30Package search: sort maintainer list by usernameDan McGee
Makes it easier to find a user since we have quite a few. FS#18055. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-10added permission required to protected packages viewsIsmael Carnales
2009-11-09added missing packages views code from archweb_pubIsmael Carnales
2009-11-09added missing packages views from archweb_pubIsmael Carnales
2009-11-09modified import paths from archweb_dev to archwebIsmael Carnales
2009-10-17Port archweb_pub commit 1f96c7a1182ef75279c18986b708e683f89dd690 to ↵Thomas Bächler
archweb_dev. This is the original commit message by Dan: "Make package SVN links always work This should clean up the links for all varieties of things- different arches (including any), different repos (community and community-testing), and split packages. All of the logic is in one place now and any further changes should be made to the method on the package object."
2009-09-11Fix community links.Dusty Phillips
2009-07-24Repo-based permissions when adopting packages.Dusty Phillips
2009-05-04Fix a bug when someone accesses the update page without POSTINg adopt or ↵Dusty Phillips
disown. Probably occurred by a press of the back button.
2009-04-13FS#11325. Add a 'Target Repo' column to the signoffs page.Dusty Phillips
2008-10-11drop a couple completed to-dos and blank linesDusty Phillips
2008-10-11refactor duplicate signoff codeDusty Phillips
2008-10-10use RequestContext because its standardDusty Phillips
2008-10-10simplify package details viewDusty Phillips
2008-10-07drop id based searchingDusty Phillips
2008-10-07use user messages to communicate statusDusty Phillips
2008-10-07sort returns to first pageDusty Phillips
2008-10-07reorder ifsDusty Phillips
2008-10-07fix sorting issueDusty Phillips
2008-10-07trying to flesh out the pageDusty Phillips
2008-10-07fix the last update scriptDusty Phillips
2008-10-07make sort form workDusty Phillips
2008-10-07make form submit some but not all valuesDusty Phillips