summaryrefslogtreecommitdiff
path: root/packages/views
AgeCommit message (Collapse)Author
2013-08-26Remove flag as outdate links to packages from archOmar Vega Ramos
2013-04-22Merge branch 'archweb-generic2'Luke Shumaker
Conflicts: README.BRANDING local_settings.py.example packages/templatetags/package_extras.py public/views.py releng/views.py settings.py sitestatic/archnavbar/archnavbar.css sitestatic/silhouette.png templates/base.html templates/packages/differences.html templates/packages/opensearch.xml templates/packages/search.html templates/public/donate.html templates/public/download.html templates/public/feeds.html templates/public/index.html urls.py
2013-04-21Merge commit '91c451'Luke Shumaker
Conflicts: devel/views.py feeds.py local_settings.py.example packages/management/commands/signoff_report.py packages/views/flag.py public/views.py templates/404.html templates/base.html templates/devel/clock.html templates/devel/index.html templates/devel/packages.html templates/devel/profile.html templates/general_form.html templates/mirrors/mirror_details.html templates/mirrors/mirrorlist.txt templates/mirrors/mirrorlist_generate.html templates/mirrors/mirrorlist_status.txt templates/mirrors/mirrors.html templates/mirrors/status.html templates/news/add.html templates/news/delete.html templates/news/list.html templates/news/view.html templates/packages/details.html templates/packages/differences.html templates/packages/files.html templates/packages/flag.html templates/packages/flag_confirmed.html templates/packages/flagged.html templates/packages/flaghelp.html templates/packages/groups.html templates/packages/opensearch.xml templates/packages/packages_list.html templates/packages/search.html templates/packages/signoff_options.html templates/packages/signoffs.html templates/packages/stale_relations.html templates/public/about.html templates/public/art.html templates/public/blank.html templates/public/donate.html templates/public/download.html templates/public/feeds.html templates/public/index.html templates/public/keys.html templates/public/svn.html templates/public/userlist.html templates/registration/login.html templates/registration/logout.html templates/releng/add.html templates/releng/results.html templates/releng/thanks.html templates/todolists/list.html templates/todolists/public_list.html templates/todolists/todolist_confirm_delete.html templates/todolists/view.html templates/visualize/index.html todolists/views.py
2013-04-21Merge branch 'archweb' into archweb-generic2Luke Shumaker
2013-04-21Merge branch 'archweb' into archweb-generic2Luke Shumaker
Conflicts: devel/views.py feeds.py public/views.py settings.py sitestatic/archweb.js templates/base.html templates/devel/profile.html templates/mirrors/status.html templates/news/view.html templates/packages/flaghelp.html templates/packages/opensearch.xml templates/public/download.html templates/public/feeds.html templates/public/index.html templates/registration/login.html templates/releng/results.html templates/todolists/public_list.html
2013-04-16Various minor code cleanups and fixesrelease_2013-04-16Dan McGee
Most of these were suggested by PyCharm, and include everything from little syntax issues and other bad smells to dead or bad code. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Add shortcut for HEAD requests on slower viewsDan McGee
We sometimes see some web bots and crawlers make HEAD requests to verify existence of certain pages in the application. However, they are less than kind as 20-50 requests might arrive at the same time, and package search and details pages are some of the slowest rendering pages we have due to the Django template engine. Rather than waste time generating the content only to throw it away, response as soon as we can with either a 404 or 200 response as appropriate, omitting the 'Content-Length' header completely, which seems to be acceptable by the HTTP spec. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Use require_safe decorator rather than require_GETDan McGee
This was added in Django 1.4, and ensures both GET and HEAD requests, but not POST requests, are allowed through. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-13Show replacments for package if it has been removedDan McGee
This covers the case where we can't find the package in any other repositories, but it was removed recently enough that we have a found package update object. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-27Pull references to Arch Linux in code into BRANDING_ variables in settingsLuke Shumaker
This does not include templates
2013-02-26Use user.userprofile rather than user.get_profile()Dan McGee
The get_profile() function is deprecated as of Django 1.5. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-26Merge branch 'django-1.5'Dan McGee
Conflicts: requirements.txt requirements_prod.txt
2013-02-20Fix some fallout with moving page to query paramsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16Make page a query string parameter on package searchDan McGee
This is a bit silly to encode in the URL, or at least makes it much harder to screen out via robots.txt and other such things. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-16Remove configurable pagination for package searchDan McGee
Switch it to a hardcoded value of 100 for all searches instead. It didn't make much sense having a page number be part of the URL and a limit value being part of the query string. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-09Use 'update_fields' model.save() kwargDan McGee
This was added in Django 1.5 and allows saving only a subset of a model's fields. It makes sense in a few cases to utilize it. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-08Remove package seach by 'Last Updated After'Dan McGee
It is a lot easier to just sort the list rather than mess with this particular field, which didn't even allow you to specify a range or direction to search in. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-23Use more modern verison of string template formattingDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-23Use querysets for calls to get_object_or_404(Package)Dan McGee
This works better in most cases since we need the architecture and repository objects at some point during the view process. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Use content_type and not mimetype on HttpResponse()Dan McGee
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Make packages JSON search more performantrelease_2013-01-12Dan McGee
We were peppering the database with a bunch of queries here; using prefetch_related and attach_maintainers can cut down the count significantly. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-12Merge tag 'release_2012-04-07'Luke Shumaker
I hate writing tag messages. Conflicts: packages/templatetags/package_extras.py templates/packages/flag.html templates/packages/flaghelp.html templates/public/download.html templates/public/index.html templates/public/svn.html
2012-12-12Merge tag 'release_2012-04-02'Luke Shumaker
Signing page changes, other tweaks Conflicts: README local_settings.py.example requirements_prod.txt urls.py
2012-12-12Merge tag 'release_2012-03-25'Luke Shumaker
Django 1.4 upgrade and a bunch of other stuff
2012-12-12Merge commit '822898e' (Merge branch 'django14')Luke Shumaker
Conflicts: requirements.txt requirements_prod.txt templates/base.html templates/devel/clock.html templates/public/download.html templates/public/index.html templates/releng/results.html
2012-11-16Use python set comprehension syntax supported in 2.7Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-15Merge tag 'release_2012-02-18'Luke Shumaker
Defend against bogus URLs, mirrorlist no FTP by default Conflicts: templates/public/index.html
2012-11-15Merge tag 'release_2012-02-11'Luke Shumaker
Quick release Conflicts: requirements.txt requirements_prod.txt
2012-11-15Merge commit '1f18484' (update)Luke Shumaker
2012-11-14Merge tag 'release_2012-01-11'Luke Shumaker
Pkgbase view in todos, other changes related to caching Conflicts: public/views.py
2012-11-14Merge commit 'd198137' (update)Luke Shumaker
2012-11-14Merge commit '96fecb1' (Multilib differences report)Luke Shumaker
Conflicts: packages/views/__init__.py templates/packages/differences.html
2012-10-26Extract some common architecture grabbing logicDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30Fix usage of naïve datetime objectDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30Hide staging packages in search resultsDan McGee
This is for users that aren't logged in; developers will still see them. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Don't show staging in package search repo listingDan McGee
This is temporary or at least a quick way to ensure regular users aren't confused by staging packages; later updates should re-enable display of this for logged in developers and trusted users. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-15Remove now unnecessary importrelease_2012-09-15Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-08p/v/flag: Add reply-to to out-of-date notificationsFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-20Use case-insensitive search in opensearch suggestionsDan McGee
There is no real good reason not to do this, since our packages are lowercased by convention. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-13Attempt to screen for useless out-of-date messagesDan McGee
Things like ' ', '-', '.', etc. will no longer be accepted in this field. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Migrate flag request version info to new formatDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Revert "Fall back to 410 Gone for package files view as well"release_2012-07-31Dan McGee
This reverts commit 9ab460c53a1ac4c79da6f05f2850ee21beedbab2. This seemed like the right thing to do, but it doesn't really play well with our more general dispatch framework we now do on the package details pages. Just let it 404 like it always did, as these pages are less essential. We can perhaps add a full dispatcher later if we really feel the need.
2012-07-31Reuse removed template for packages with multiple replacementsDan McGee
For example, bitcoin-git in the Arch repos is currently marked replaced by both bitcoin-qt and bitcoin-daemon. This allows us to show a page with both options listed instead of a blank 404 page. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Add package details redirect for package replacementsDan McGee
This makes sense if there is only one available replacement. We could get more sophisticated and show the removed page if there are multiple replacements available. Additionally, automatically redirect if there was only one matching package for a given package update deletion object. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Rework package details dispatch codeDan McGee
We had a variety of fallback paths that we took if a details page didn't exist for the combination of URL parts passed in. Before I go adding a few more possibilities, rework this so it is more flexible. It is now as simple as adding a method to the dispatch options list in order to have further fallback options. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Fix broken hidden input sort field on search formDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Replace deprecated list_detail usage in search with class-based viewDan McGee
We can convert the entire search view to a generic class-based ListView. This is still one of the more disgusting views in the application and has a ton of logic scattered buckshot across several methods, but this commit is not meant to address all of that in one go. This is the last of the deprecated pieces I know of we are still using in the codebase, so we should be relatively safe in the long run now for an upgrade to the eventual next major Django release. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Replace deprecated direct_to_template() with render() shortcutDan McGee
Now that Django actually provides a concise way to use a RequestContext object without instantiating it, we can use that rather than the old function-based generic view that worked well to do the same. Additionally, these function-based generic views will be gone in Django 1.5, so might as well make the move now. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Remove custom utc_now() function, use django.utils.timezone.now()Dan McGee
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>