summaryrefslogtreecommitdiffstats
path: root/public/views.py
AgeCommit message (Collapse)AuthorFilesLines
2012-12-28Fix master key signing total countsDan McGee1-1/+1
Commit 4c69911982 had an inadvertent side effect here; we need to explicitly disable ordering for the annotate() to work correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-21Add Release model to relengDan McGee1-0/+6
This should prevent the need for monthly template updates from Pierre and Thomas; best to just let them enter the data themselves and have it show up on the website. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee1-1/+1
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-13Move JSON keys view to public/ appDan McGee1-2/+51
This seems like a more appropriate place, and now the visualization is done here anyway so we should move the data backing it. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Only show staging feeds to logged-in usersDan McGee1-1/+4
This doesn't prevent unauthenticated users from accessing the feeds, but it should reduce clutter and confusion on the feeds index page for users unlikely to need these feeds. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Add structured data to developer listing pagesDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-01PGP key handling updatesDan McGee1-5/+13
* Import signatures for all known keys, not just active developers * Ensure we are only showing and accounting for active developers on the master keys page * Add a new table showing signatures between developers Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31Update several bits and pieces for staging packagesDan McGee1-1/+4
This will prevent [staging] packages from cluttering normal user's view on the website, but allow us to still import everything from this repository for developer use. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-25Replace deprecated direct_to_template() with render() shortcutDan McGee1-7/+7
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-04-25Finish django countries implementationDan McGee1-10/+8
* Add a migration to drop the old countries field. * Update all templates/views/utility methods to point at the new country field and dereference it as necessary. * Add the flags images to a few views where it makes sense. * Cleanup the download page layout quite a bit. * Bump the mirror status JSON version to 3; add country_code attribute. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-25Rename mirror country fields to country_old in prep for normalizationDan McGee1-1/+1
We're going to move to using ISO 2 character codes via django countries, so start by moving the old data out of the way first. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-29Add developer status table to master keys pageDan McGee1-3/+18
This shows the cross-product of each master key with each developer key so you can see who has been signed, where signatures are missing, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-21Add number of keys signed to master keys pageDan McGee1-3/+12
This really just makes me look bad, but an interesting fact none the less for people to look at. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-09Ensure users only show up once on the Fellows pageDan McGee1-0/+1
If a user was in both Developer and TU groups, they would show up twice. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03Add a few cache headers and minor feed caching back inDan McGee1-0/+7
Now that we aren't using the middleware, add cache headers on our primary pages so we can prevent some repeat traffic, and cache all feeds for five minutes. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12PyLint suggested cleanupsDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-06download: add a link to the new netboot environmentThomas Bächler1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30Master keys: reduce query count, add default orderingDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30Add master key overview pageDan McGee1-6/+12
And a bunch of text that may suck, but is better than nothing. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-21Better support for non-latin full namesDan McGee1-2/+4
Add a 'latin_name' field to the user profile so we can better support those developers with names in non-Latin scripts, and yet still show a Latin name as necessary on the developer profile page. This field only shows up if populated. Also, use consistent sorting everywhere- rather than using username, always use first_name and last_name fields. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-12Pylint suggested and other cleanupsDan McGee1-6/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19download: add link to the ISO snapshotsThomas Bächler1-1/+6
Dan: use relative links if possible, use releng link from settings, fix HTML closing tags. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16News frontpage layout changesOlivier Keun1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-27Slight refactor of user list viewsDan McGee1-12/+24
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-27Screen Fellows based on group membership as wellDan McGee1-1/+1
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-10-05Switch another query to use is_downloadDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-05Add some select_related() magicDan McGee1-1/+1
Made obvious when poking around with the Django debug toolbar. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-01Allow donors to be invisibleDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-08Move news model to an appropriate placeDan McGee1-1/+2
Never would have guessed it should actually be in news/models.py. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-06Move mirror models out of main appDan McGee1-2/+2
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 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-08-28PyLint suggested cleanupsDan McGee1-1/+1
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-27Add missing RequestContext in feeds viewDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-26Highlight 'Packages' in navbar when browsing packagesDan McGee1-2/+1
Get this working by doing some class business with CSS in order to highlight the correct tab. I had to add some stuff to a variety of pages but it should be working correctly now. Addresses FS#19591. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17Make group membership use Django groupsDan McGee1-2/+2
Rather than our home-baked roles field, which is free text so we really shouldn't be checking against anyway. It also prevents people from being both a developer and a TU. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17Donor page rework for list formattingDan McGee1-7/+1
Instead of doing slicing and ugly table-based layout, move to a CSS-based organization of the donor list. Shoot for 4 columns but should degrade gracefully to fewer, and will look just fine with no CSS at all (one big tall list). Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-16Ensure protocol order is stable on download pageDan McGee1-1/+1
Sometimes http was first, other times ftp was first. Add an order by clause to ensure it is the same for all mirrors. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-19Remove Arch-Based ProjectsDan McGee1-7/+1
Add a link to the wiki instead. Also remove ExternalProject model and associated dealings. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-19Remove International CommunitiesDan McGee1-7/+1
Add link to wiki instead. Also remove AltForum model and associated dealings. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-10Remove archweb prefix from all importsDan McGee1-2/+2
Unnecessary, and lets us standardize on not using it everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-06Make recent updates group multiple architecturesDan McGee1-3/+5
It isn't the most elegant operation in the world, but attempt to only show one line per package, grouping by architecture if multiple were updated in the same go. This makes the recent packages view a bit more useful as a heads up view. Implements FS#17304. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-05feeds: add per arch, per repo feed abilityDan McGee1-0/+7
Make the feed framework a lot more flexible and give the possibility to have a feed for each architecture. You can drill down even more than also get a feed for a particular repo; some might find this helpful for something like tracking [testing]. Implements FS#12939. I also bumped up the number of items available in each of these feeds; since it is full of a bunch of small items it might be more helpful to have more available and it should also prevent fewer ones from being missed. The UI isn't exactly spectacular, but I figured some sort of page is better than none listing all the various feeds you can pull from. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-01Spruce up the developer view pagesDan McGee1-15/+18
Quite a few changes here. Unify the developer view pages into one actual django view and template, and use different dispatches from urls.py to set up the three different queries for who to display and what message and group name to show. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31Use select_related() to make a few more places more performantDan McGee1-1/+1
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-31Don't exclude testing packages from recently updatedDan McGee1-2/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-10Fix highlighting on main site tabsDan McGee1-2/+1
We should always highlight 'Home' when on the Django site. The sole exception is the download page which has its own special place. Signed-off-by: Dan McGee <dan@archlinux.org>
2009-11-10corrected context variable names in index viewIsmael Carnales1-3/+3
2009-11-10made every public view return a RequestContextIsmael Carnales1-12/+18
RequestContexts are needed to check if the user is logged in NOTE: Generic views as direct_to_template and object_list always return a request context, so is good to use them :) Later will add a render_template shortcut that adds the RequestContext automatically
2009-11-10use direct_to_template to replace static viewsIsmael Carnales1-13/+0