Commit Graph

278 Commits

Author SHA1 Message Date
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
Dan McGee
0afedf606f Move main fields to separate module
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-30 13:24:41 -06:00
Dan McGee
85657db05d Better support for non-latin full names
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-11-21 10:08:23 -06:00
Dan McGee
3a0e55a1de Change package description to a text field
No need to have length restrictions on this. Although long descriptions
are frowned upon, we shouldn't truncate them if someone really wants
one.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17 12:50:14 -06:00
Dan McGee
a9819e3d71 Ensure reporead is protected against simultaneous runs
This adds a bunch of transaction magic and SELECT FOR UPDATE stuff to
reporead to cope with the now-concurrent runs of reporead we get when
invoked from our inotify-based updater. The collision occurs with 'any'
architecture packages as both repo databases contain the new version,
and the updates occur at exactly the same time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-17 12:49:10 -06:00
Dan McGee
5b63c29fe1 Show full names on developer user list pages
The old display format doesn't really make sense. Also fix the invalid
HTML generated by the PGP tag link- we need to escape using &amp; inside
the generated URLs.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-15 14:04:39 -06:00
Dan McGee
886630dd4e Always use same URL for both secure and non-secure CDN requests
Use a scheme-relative URL rather than serving different content to
users based on HTTP or HTTPS. Should prevent mismatched certificate
errors.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-08 13:55:38 -06:00
Dan McGee
0db2830b8f Make maintainer lookup on todo lists fast
This is rather sick to look at. Sorry, Django gives me no other choice.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 23:30:16 -05:00
Dan McGee
19c2841f20 Add new attach_maintainers() utility method
This allows us to alleviate the N+1 query problem when we want
maintainer data for a queryset of packages. We use it on signoffs here;
we should also be able to apply this to the todolist section where this
problem has existed for some time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 23:04:16 -05:00
Dan McGee
e3e3e49876 Add URL to todolist email
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:33:40 -05:00
Dan McGee
ac2278423a Many signoff page improvements
Add a new 'SignoffSpecification' model which will capture metadata
regarding a specific package if it differs from the norm- e.g. more or
less than 2 required signoffs, is known to be bad, a comment from the
maintainer, etc. The groundwork is laid here; much of this will still
need to be wired up in the future.

Enhance the view with a lot more JS prettiness and add revoking of
signoffs. The signoff page can be filtered and the links and all the fun
stuff are totally dynamic now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03 17:19:26 -05:00
Dan McGee
bc0e9d3e85 Add created column to Donor model
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-01 16:56:40 -05:00
Dan McGee
2d5777b11d Add a generate_keyring command
This grabs all the PGP keys from the developer profiles and adds them to
the keyrings. Obviously we may want to do more in the future such as
filter by groups, active status, etc. but this is just a first
iteration.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 18:49:00 -05:00
Dan McGee
002574cce1 Accept 40 hex char PGP key signatures only
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21 18:18:49 -05:00
Dan McGee
71e57570c2 Pylint suggested and other cleanups
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-11 19:29:15 -05:00
Dan McGee
797185faed Add some dev dashboard info regarding signed package count
This adds a column similar to the flagged package count for the number
of signed packages in a given architecture or repository. It is up to
the user to do some simple math to figure out the number of unsigned
packages.

Also, add 'signed' as a hidden search field option similar to what we
did for packager.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 08:44:22 -05:00
Dan McGee
2cc3385aad Use HTTPS by default in email URLs
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-10 07:08:16 -05:00
Dan McGee
293e42fc55 List packages in required by list with depend provided by this package
Implements FS#25862. Most noticable on package like util-linux
(util-linux-ng) and openjdk6 (java-runtime, java-environment).

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-08 14:10:13 -05:00
Dan McGee
e5d09fb7e9 Add PGP signature package field
And add eventual display code for it to the details template, but don't
show it yet as no packages will have it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 16:18:12 -05:00
Dan McGee
b167fcb087 Refactor get_depends() to use PackageDepends methods
The returned objects now also have a providers list if it makes sense.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09 23:34:29 -05:00
Dan McGee
02c0dbc482 Add some methods to PackageDepend object
This will allow for some future "find the best provider link" stuff as
well as refactoring of the get_depends() method on Package.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09 23:33:27 -05:00
Dan McGee
2a73675f0e Select arch/repo for split package related fields
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-29 23:08:33 -05:00
Dan McGee
d8e089fd30 Delete old signoff model
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06 12:12:17 -05:00
Dan McGee
f95abca269 Refactor code to use new signoff model
This moves signoff creation and display to the new packages.Signoff
model.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06 12:12:17 -05:00
Dan McGee
c5308b7583 Recent updates refactor
Pull out a few helpful objects and functions for use later elsewhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:48:10 -05:00
Dan McGee
e37d465c4e Allow more lenient data entry for PGP key field
Don't allow the max_length parameter to make it through to the HTML
form, silently cutting off HTML cut and pastes. Trim out spaces
automatically, as well as '0x' and '2048R/' type prefixes.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05 09:47:20 -05:00