Commit Graph

303 Commits

Author SHA1 Message Date
Dan McGee
277d71709c Upgrade jQuery to 1.8.1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-05 09:32:24 -05:00
Dan McGee
5df83a3828 Add a 'format_http_headers' method
This takes a HttpRequest object and grabs the HTTP headers out of it and
pretty-prints them in a familiar format. This will come in handy if we
want to log these when creating package FlagRequests, releng Tests, etc.
in addition to already logging the IP address of the user posting the
request.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-04 08:53:39 -05:00
Dan McGee
0926cf30f4 Filter out spam flag requests on package details page
No need to show these as a matching request.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-04 08:22:38 -05:00
Dan McGee
78553abc51 Don't blow up when pgp signature data is '' on a package
We handled None/NULL correctly, but not the empty string. Fix this
corner case.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-20 23:48:44 -05:00
Dan McGee
0ec1af27ae Mark nullable fields as blank on package model
This helps when creating test packages through the Django admin.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-20 21:18:21 -05:00
Dan McGee
04066d190e Ensure reverse conflicts match architecture if applicable
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-15 20:26:26 -05:00
Dan McGee
5549b119ea Add a rate limiting filter for log messages
This should help cut down on the massive amount of emails I receive when
things go wrong on the production website.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-13 21:24:40 -05:00
Dan McGee
b425b192e1 Migrate flag request version info to new format
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08 22:21:05 -05:00
Dan McGee
b7a03d89d1 Push more default values down into the database
This makes it easier to do manual manipulation/insertion/etc. at the
database level, as well as just making things act more sane from an
overall software stack perspective.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07 23:22:18 -05:00
Dan McGee
f63a70f511 Make use of new ctypes ALPM API
We can use this when filtering down lists of depends, required by,
conflicts, etc. to ensure we are honoring the version specifications the
same way pacman would.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07 19:36:07 -05:00
Dan McGee
7d9ed0b881 Add reverse conflicts to package details
This is a place where calling vercmp could come in really handy.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-07 01:16:53 -05:00
Dan McGee
8ca64af397 Smarter handling of multilib packages in "Versions Elsewhere"
We can do some manipulation of the pkgname to ensure multilib packages
show up here, as well as showing the non-multilib versions in the list
when viewing the multilib packages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-05 11:21:59 -05:00
Dan McGee
a64bbbd413 Make adjustments for optional -> deptype conversion
Very little dealt directly with this field.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04 15:11:27 -05:00
Dan McGee
3f0c024754 PGP key handling updates
* 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-31 18:37:30 -05:00
Dan McGee
0cc369e985 Update several bits and pieces for staging packages
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-31 00:09:28 -05:00
Dan McGee
2a221fa72f Upgrade to jQuery 1.7.2 and a maintained tablesorter
This touches a wide variety of files as well as makes updates to some of
our own code to be fully compatible. We also use some of the newer
locale/accent sorting features of tablesorter to make tables with
developer names sort in a more sane fashion.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-28 17:52:52 -05:00
Dan McGee
c0bf9e2066 Remove custom utc_now() function, use django.utils.timezone.now()
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>
2012-07-24 19:57:20 -05:00
Dan McGee
8383a07160 Add a new jquery_tablesorter CDN template tag
And use it everywhere we were including the file before. This should
make updating the version a heck of a lot easier.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08 23:33:44 -05:00
Dan McGee
26a00cadce Don't log package updates in Python when we have DB trigger support
This adds a helper method to find the database engine in use, and then
skips code we shouldn't execute if we are doing this another way.

Note that this helper method could be useful for backend-specific code
paths elsewhere, such as custom SQL being called or lack of StdDev() in
sqlite3 out of the box.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08 21:08:04 -05:00
Dan McGee
d685d51e8c Ensure we use last_modified date from News in headers
We were actually using the postdate attribute rather than last_modified,
which means any News objects that get edited would not trigger an update
of the feed.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20 13:21:59 -05:00
Dan McGee
e1f9a3c44a Drop old PackageDepend model
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:11 -05:00
Dan McGee
72a92102df Switch to usage of new Depend object
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 21:36:11 -05:00
Dan McGee
f6c2bc6c33 Simplify get_best_satisfier and get_providers
We always passed values in that came off the containing package object;
we can access these directly in the methods themselves.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18 19:58:27 -05:00
Dan McGee
badc535aeb Ensure order_by default value is cleared when using distinct()
Otherwise the queryset returns nonsensical results. I find the design of
this less than obvious but so be it; we can ensure the results work
regardless of a default ordering on the model.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02 09:37:46 -05:00
Dan McGee
e35ad5dd8e Convert old index addition migration to new format
This moves it to the new class-based extending SchemaMigration format,
in hopes that it will play nicer when starting and migrating from
scratch.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26 11:55:18 -05:00
Dan McGee
206000df73 Add an index on packages last update column
Not sure why we don't have this already, given both the home page, the
packages page when ordered by last update, and the generated feeds would
see immediate benefit from it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-21 17:02:44 -05:00
Dan McGee
c3a5f8a4e8 Fix ContentType related migrations
This should fix the issues reported in FS#23228 for the most part.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20 11:15:03 -05:00
Dan McGee
d21d8be018 UserProfile model and fields shuffle
Move this model into the devel/ application, and move the PGPKeyField
which is used only by these models into the application as well. This
involves updating some old migrations along the way to ensure we don't
reference a field class that no longer exists.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20 11:15:03 -05:00
Dan McGee
31f9d3fc0f Add migrations for on_delete attributes
I don't think these end up doing anything at the database level, but
since South insists on generating alter_column() calls for these
changes, do them once so they don't keep reappearing in auto-generated
future migrations.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-08 14:08:45 -05:00
Dan McGee
b1a9818dde Include category when linking to bug reports
Also change the default category to something legit.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-03 14:44:16 -05:00
Dan McGee
ef88f3d5ef Add developer status table to master keys page
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-29 11:37:07 -05:00
Dan McGee
611e30172a Rename 'packagedepend_set' attribute to 'depends'
We do this for every other related package attribute, so do it here too.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26 12:33:28 -05:00
Dan McGee
48aec15343 Revert "Add some dev dashboard info regarding signed package count"
This reverts commit 797185faed. Now that
all packages in the Arch repos are signed, this column isn't very useful
as it just reflects the total package count.

Conflicts:

	packages/views.py -> packages/views/search.py

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 17:10:22 -05:00
Dan McGee
5888bdf0db Use staticfiles_storage in jQuery tag
To get the local URL to the jQuery JS file.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 13:12:02 -05:00
Dan McGee
024fd1b284 Remove cdnprefix template tag
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-24 12:32:38 -05:00
Dan McGee
90e08b4863 Make all datetime objects fully timezone aware
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to
ensure we don't mix aware and non-aware datetime objects when dealing
with datetimes in the code. Add a utc_now() helper method that we can
use most places, and ensure there is always a timezone attached when
necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
bc1ba4e95a PEP8 cleanup with blank lines
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
6218ccc570 Use python hashlib directly
Django hashcompat is now deprecated.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23 19:54:40 -05:00
Dan McGee
7edc58c89c Show signature data on package details page
Now that we have a way to decode and process the signature data, we can
match the key_id to a known developer if possible and show this data on
the package page.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-08 11:36:18 -06:00
Dan McGee
314608aee3 Allow more flexibility in pgp_key_link
Allow key_id to be a large integer value that gets converted to hex, and
allow overriding of the default link text.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-08 00:37:07 -06:00
Dan McGee
0ad6a96019 Tabs to spaces conversion
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-07 23:46:21 -06:00
Dan McGee
b2cfd30094 Show the latest flag request on package details if out of date
This only shows up for logged in users, but might be helpful for
developers browsing around the site, especially if they did not receive
the email themselves, or in the case of orphan packages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-02-07 00:47:21 -06:00
Dan McGee
6b16b9487a Adjust page and content caching lengths and decorators
Remove never_cache from many places now that we don't actually need it
since we aren't caching by default. Adjust our cache_function decorator
times be shorter values, and also randomize them a bit to make cache
invalidations not all line up.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05 13:03:00 -06:00
Dan McGee
5a91a246a8 Remove all cache middleware
It's time to stop serving up stale pages. Remove this middleware caching
and start pushing it down to spots where we can actually control it more
appropriately (and only cache things that are expensive anyway).

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-03 14:22:01 -06:00
Dan McGee
a60801bb7d PyLint suggested cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-11 19:52:27 -06:00
Dan McGee
3e094a548f Add a new FlagRequest model
This will be used to store all of the submitted data we get via flag out
of date forms on the website.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-08 15:02:11 -06:00
Dan McGee
c2e84a787a Various small admin touchups
* Don't capitalize things in verbose_name, Django does this
  automatically and uses title case
* Add overrides for IP, URL, ISO, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-07 13:11:52 -06:00
Dan McGee
943ef2e8e4 Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.

Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 23:06:10 -06:00
Dan McGee
20e9a83e05 Update groups fixture
Fix up permissions surrounding signoff objects.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05 16:48:53 -06:00
Dan McGee
6b8ef446bc Add master key overview page
And a bunch of text that may suck, but is better than nothing.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30 13:55:36 -06:00