summaryrefslogtreecommitdiff
path: root/main/models.py
AgeCommit message (Collapse)Author
2011-11-03Make maintainer lookup on todo lists fastDan McGee
This is rather sick to look at. Sorry, Django gives me no other choice. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03Add new attach_maintainers() utility methodDan McGee
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-03Add URL to todolist emailDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-03Many signoff page improvementsDan McGee
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-01Add created column to Donor modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21Add a generate_keyring commandDan McGee
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-21Accept 40 hex char PGP key signatures onlyDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19Add some dev dashboard info regarding signed package countDan McGee
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-10Use HTTPS by default in email URLsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-08List packages in required by list with depend provided by this packageDan McGee
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-08-17Add PGP signature package fieldDan McGee
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-09Refactor get_depends() to use PackageDepends methodsDan McGee
The returned objects now also have a providers list if it makes sense. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-09Add some methods to PackageDepend objectDan McGee
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-07-29Select arch/repo for split package related fieldsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06Delete old signoff modelrelease_2011-07-23Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06Refactor code to use new signoff modelDan McGee
This moves signoff creation and display to the new packages.Signoff model. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-05Allow more lenient data entry for PGP key fieldDan McGee
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-06-23Fix syntax errors, == not =release_2011-06-23Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23Add Package.in_staging methodDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23Set up queries for staging reposDan McGee
This treats repo.staging special in much the way we already have to treat repo.testing as special. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-23Revert "Remove unused flagged() manager method"Dan McGee
Far from unneeded, this is used on the developer dashboard. Silly me. Document this fact as well in the code so we don't screw it up again. This reverts commit 2a44855556531a27e949884d4084c6e5d37082e1.
2011-06-15Remove unused flagged() manager methodDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Refactor common select_related into manager methodDan McGee
For a Package object query, we almost always did .select_related('arch', 'repo). Refactor this into the manager as a 'normal()' method so we can avoid sprinkling the same logic everywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15PositiveBigIntegerField: set get_internal_type() correctlyDan McGee
This is a key for Django to return the DB type that matches this value. Since we are basically just ripping off a BigIntegerField, we can use the database types for it. This makes my prior checked in migrations actually work on MySQL. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Mark several package columns as non-NULLDan McGee
These have been around for a long time now so they don't need to be NULL-able anymore. We can also add a custom field type for our numbers to at least get a check constraint at the Django level. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02Add a PGP key field on the dev profileDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-09Ensure required by works for arch-agnostic packagesDan McGee
We weren't showing required by entries for arch-specific packages that depended on arch-agnostic ones. Make the check a bit less specific for arch-agnostic packages similar to what we do for dependencies. Fixes FS#24184. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18Reimplement links code as template tagsDan McGee
These were starting to get a bit too much inside the model itself, and they don't really belong there as they are view layer concerns anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-18Add a "Report a Bug" linkDan McGee
We need Flyspray category data to make this more useful, and we can prefill the Subject and Category fields (along with putting it on the right project). Implements FS#23751. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Utilize Django 1.3 'on_delete' feature on several foreign keysDan McGee
The most important one here is PROTECT to keep people from making bone-headed plays and deleting an Arch or Repo and every package along with it. We can use this in a few other places, as well as some carefully placed SET_NULL indicators. Note that nothing here pushes deletion responsibilities down to the database, although that will probably happen in a future commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Consolidate caching black magicDan McGee
Get the stuff used to retrieve and refresh the latest date values all in the same place, and make it a bit more beautiful by refactoring it all into a common set of methods. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-07Use UTC datetime objects everywhereDan McGee
Rather than the twisted mix of local times and UTC times we currently have. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22Fix potential logic bug in requiredby filteringDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22Add 'staging' field to Repo modelDan McGee
First steps towards implementing FS#23298. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-22Add index to todo list date addedDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-15Check in actual models update for DateTime migrationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-13Show epoch in package version if != 0Dan McGee
Add a full_version property method to our package object that does the version formatting, and switch all templates displaying package versions over to this new method. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-13Add package epoch supportDan McGee
This comes with pacman 3.5, replacing the old "force" PKGBUILD option. We parse it and store it for now, but don't display it anywhere just yet. Also update a few queries relying on version differences in any of the multiple parts. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-22Use new split package file fields everywhereDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-22Add new file and directory parts to package filesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-19Unify calls to applicable_arches()Dan McGee
Invoke the function everywhere it is used rather than passing a callable. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-16Allow for optional info in required by displayDan McGee
We need to make our root object the PackageDepend rather than the Package to get at this, so do a slight refactor on get_requiredby(). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-16Read in optional deps and show in web interfaceDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-15Move license to a related modelDan McGee
This allows us to store multiple licenses per package in a more elegant fashion, and will later allow us to search and filter on this information. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-15Allow optional deps in depends modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-02-15Clean up Package related objects codeDan McGee
Main change is just to move groups from the default packagegroup_set location to a related_name of groups. Also refer to the Package class directly rather than by text string if we have it available. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-08Use common timezones onlyDan McGee
No need to show historical and deprecated zone names. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-08Merge branch 'dev-timezones'Dan McGee
2011-01-08Remove automatic ID column definitionsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-08Add time zone field to developer profileDan McGee
This will be used by the developer world clock page soon to come. Default everyone to "UTC" for now. Signed-off-by: Dan McGee <dan@archlinux.org>