Commit Graph

94 Commits

Author SHA1 Message Date
Dan McGee
4c3100ab90 Move differences into it's own function
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28 10:43:39 -05:00
Dan McGee
971e9faf90 Add package groups to front page and cache results
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-27 17:32:52 -05:00
Dan McGee
d21de73592 Add last updated column to package groups view
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-27 17:24:08 -05:00
Dan McGee
ddc4b974fe Add a package group overview page
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-27 17:06:07 -05:00
Dan McGee
e0674de776 Add a group details view
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-27 17:05:07 -05:00
Dan McGee
ae5483c230 Package Differences by Architecture view
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-25 13:45:04 -05:00
Dan McGee
9300b43b79 Show maintainer full names in search dropdown
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>
2010-08-13 11:05:48 -05:00
Dan McGee
c93ed3f6fe Clarify what the date field means on package search
It sounded like the date had to match exactly which wasn't true, so clarify
the label on the form field.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-13 11:05:11 -05:00
Dan McGee
d993e1f1a8 Add a title to the userpkgs link
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-04 07:00:41 -05:00
Dan McGee
2461b12cef Add new 'userpkgs' template tag
For easy linking to a given person's packages when we have a user object.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-28 15:02:17 -05:00
Dan McGee
63696563a3 Add package groups model and display to packages
They show up but aren't hotlinked to anything...just yet.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-25 15:49:06 -05:00
Dan McGee
fba1d29c1b Update code to use new flag_date column
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06 18:36:50 -05:00
Dan McGee
e361a1e873 Get unit tests up and running again
We had some dependency issues between migrations that needed to be
explicitly defined in order to get things fully moving, and do to some
braindeadness in Django tests not including the project url config, we need
to do some clever business when using the url tag in the base template so
tests don't doe with a NoReverseMatch exception.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-24 17:08:00 -05:00
Dan McGee
081ed6c866 Add 'never_cache' decorator in a bunch of places
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-22 12:09:22 -05:00
Dan McGee
d767658deb Get a more accurate count of adopted packages
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20 23:59:18 -05:00
Dan McGee
f123348c7d Update to the new messages framework
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-20 23:56:03 -05:00
Dan McGee
8bf0bfeac7 Use Sites framework instead of hardcoded domain name
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-08 08:35:58 -05:00
Dan McGee
bad2825fab Updates for CSRF protection in Django 1.2.X
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-05 12:58:31 -05:00
Dan McGee
debec14b73 Add ability to download package from web interface
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-26 10:50:03 -05:00
Dan McGee
277117ba34 Move package flagging URLs below the package
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-05-26 09:30:43 -05:00
Dan McGee
c31d474f6d Kill td_input template and tag 2010-05-17 15:55:38 -05:00
Dan McGee
5c7d507eea Improve flag out-of-date logic
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-04-02 17:39:41 -05:00
Dan McGee
1113462edc Simplify code now that pkgbase is always defined
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-27 18:09:42 -05:00
Dan McGee
fe832ea845 Move package maintainer off of package model
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-27 16:15:20 -05:00
Dan McGee
d4155f7d0f Use repo.testing flag instead of test-based checks
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06 15:37:02 -06:00
Dan McGee
7e1e5a5e8a files: template reuse
Get rid of the copy/paste by including the sub-template.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27 13:36:58 -06:00
Dan McGee
1c073bea62 Ensure our cache is correct with AJAX requests
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-27 13:36:58 -06:00
Dan McGee
8314777c58 Make files view AJAX if supported
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-27 13:36:58 -06:00
Dan McGee
1cea5fc32e Order the package files when viewing
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-27 13:36:58 -06:00
Dan McGee
a0cd93c1d5 Bring package files view up to speed
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-27 13:36:58 -06:00
Dan McGee
ae5374a7df Clean up urlencode usage even more
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-17 21:11:56 -06:00
Dan McGee
11e1c2ef82 More save() -> update() cleanup
Use update() instead of for x in y: save().

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-16 20:33:37 -06:00
Dan McGee
029359fdd5 Clean up adopt/disown logic
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-16 20:20:54 -06:00
Dan McGee
95a6e6070c Use unicode-safe urlencode in package search
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-16 19:56:40 -06:00
Dan McGee
e732861961 Make packages view much more efficient
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-16 19:43:08 -06:00
Dan McGee
d709604102 Remove archweb prefix from all imports
Unnecessary, and lets us standardize on not using it everywhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-02-10 00:29:27 -06:00
Dan McGee
8c077a4caa Add OpenSearch support to the site
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-02-08 21:01:15 -06:00
Dan McGee
a16b4d9ecd Make marking out of date actually work
And honor the packager's notify flag, as Pierre pointed out.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-31 17:52:08 -06:00
Dan McGee
f58b354a03 Use select_related() to make a few more places more performant
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-31 15:19:12 -06:00
Evangelos Foutras
09a3a08144 Adjust models and views for nullable maintainer
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-31 13:44:03 -06:00
Dan McGee
f8fae0942c Package search: sort maintainer list by username
Makes it easier to find a user since we have quite a few. FS#18055.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-01-30 15:51:39 -06:00
Ismael Carnales
fa27a3927b added permission required to protected packages views 2009-11-10 18:22:54 -02:00
Ismael Carnales
150dfd7298 added missing packages views code from archweb_pub 2009-11-09 22:24:52 -02:00
Ismael Carnales
1c22bbc3f7 added missing packages views from archweb_pub 2009-11-09 22:24:52 -02:00
Ismael Carnales
48904e4857 modified import paths from archweb_dev to archweb 2009-11-09 22:24:34 -02:00
Thomas Bächler
71d79f133b Port archweb_pub commit 1f96c7a1182ef75279c18986b708e683f89dd690 to 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-10-17 23:47:09 +02:00
Dusty Phillips
e3ea523273 Fix community links. 2009-09-11 18:48:52 -06:00
Dusty Phillips
e1cc43a8ce Repo-based permissions when adopting packages. 2009-07-24 15:33:17 -04:00
Dusty Phillips
a025708ef9 Fix a bug when someone accesses the update page without POSTINg adopt or disown. Probably occurred by a press of the back button. 2009-05-04 20:24:41 -04:00
Dusty Phillips
bb93f05f56 FS#11325. Add a 'Target Repo' column to the signoffs page. 2009-04-13 22:14:53 -04:00