summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2010-09-08Move news model to an appropriate placeDan McGee
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 McGee
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-06Remove unnecessary commentsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-03Add ability to get versions of a package elsewhereDan McGee
E.g. if we are looking at one version for a particular architecture, I want to see all versions for all architectures in all repositories. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-28PyLint suggested cleanupsDan McGee
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-25Use new repository fields in link generation coderelease_2010-08-25Dan McGee
We can rip out a lot of the code for SVN and bugs links now that this data is pulled off the model instead. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-25Simple migration to populate repo dataDan McGee
Also update the repos fixture to include the new fields and [multilib] repository. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-25Add more metadata to repo modelDan McGee
Things like the flyspray project ID and SVN repo path should go here rather than being hardcoded in the code. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-25Fix multilib SVN linkDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-08-17Make package size fields big integersDan McGee
We had a package go in today that has an installed size > 2GB, which makes PostgreSQL blow up when trying to create the package entry. Enlarge these fields to big integers so they can store all conceivable package size values. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-28Add packager fields to package modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-10Make the cache_function key a bit more descriptiveDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Add helper method to package to find self in testing repoDan McGee
This will be useful in templates getting touched in an upcoming commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Remove old needupdate columnDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Update code to use new flag_date columnDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-06Make flag column on packages a dateDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-05Add absolute URL method for todo listsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-07-02Add mirror protocols fixtureDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-24Get unit tests up and running againDan McGee
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-21Cache results of get_depends() and get_requiredby()release_2010-06-21Dan McGee
Do it in our actual cache rather than an object-level, single request cache. 300 seconds is good enough resolution to have this data right; if it is updated everyone will see the results 5 minutes late at the most. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-21Add utility cache_functionDan McGee
This allows caching the results of an arbitrary function and its arguments in the Django-managed cache, e.g. memcached in production. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-20Remove AutoUserMiddlewareDan McGee
This was having some serious effects on caching as we would always have to access the user in the session, marking every page with a "Vary: Cookie" header. This is the start of stamping that out. The way we get the user for news item creation is now more similar to that from the todo lists, but not quite. That should be adjusted to be more like the news item creation. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-16Update fixturesDan McGee
We have added some repos and some fields to these guys, so update them with what we have in production at the moment. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-09Enhance base package listing in package detailsrelease_2010-06-10Dan McGee
Add two methods to the package class, base_package() and split_packages(), that allow us to grab other related packages to one we are interested in. This allows us to list the Base Package on the package details page as a link. With the split_packages() method, we can also now list and link all sub-packages on the package details page; e.g. for 'kernel26' we can now link through to 'kernel26-firmware' and 'kernel26-headers'. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-08Use Sites framework instead of hardcoded domain nameDan McGee
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-05-26Add filename column to package modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-24Merge branch 'redesign'Dan McGee
Conflicts: templates/public/download.html
2010-05-24Fix null field issues exposed by Django 1.1.2Dan McGee
Apparently Django 1.1.1 let null fields pass right through but this now causes reporead to blow up in 1.1.2. Fix the issue and get things working again by allowing nulls where it probably makes sense and including a migration to fix the issue, which for the real database will be a no-op. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-17Add alphabetical sorting to mirrorlistsThayer Williams
Also unify the sorting at the model-level for donors and remove the now duplicate sorting in the admin for mirrors. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-14Make CDN not dependent on DEBUG settingDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04Add a hacked version of Django UpdateCacheMiddlewarerelease_2010-05-04Dan McGee
This is to address a rather large issue with caching of feed objects in Django. Because they are built up using an XML library that does multiple writes on a file-like object, a single feed object, even when pulled from memcached, generates 1582 writes to the open socket rather than the optimal one it could do. Some version of this fix will be making it upstream, but I need to figure out how to approach that before I do so and for now this will address one of our larger performance issues on the live site since the packages feed is hit as often as it is. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-27Dedupe entries in required by listDan McGee
Use distinct() on a query. Fixes FS#19195. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Migration to remove external projectsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Remove Arch-Based ProjectsDan McGee
Add a link to the wiki instead. Also remove ExternalProject model and associated dealings. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Migration to delete AltForum modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Remove International CommunitiesDan McGee
Add link to wiki instead. Also remove AltForum model and associated dealings. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Migration to remove press modelrelease_2010-04-18Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-18Remove Press model and adminDan McGee
A link to the wiki was already present, but the model and admin had not been removed. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-04-17Maintainer doesn't exist on package anymoreDan McGee
So remove it from the select_related() call on todo lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Simplify code now that pkgbase is always definedrelease_2010-03-28Dan McGee
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-27Make pkgbase non-null and indexedDan McGee
Now that we always populate it, this change will make it a lot easier to use when relating to other tables, such as our maintainer relations. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Make reporead always populate pkgbaseDan McGee
And also add a data migration to add the value retroactively for anything already in our database. We simply fall back to pkgname if pkgbase isn't available. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Drop maintainer column off packages modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-27Move package maintainer off of package modelDan McGee
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-20Make rsync fields on mirrors optionalrelease_2010-03-20Dan McGee
I think I bumbled this up a while back, but make sure they aren't required and we use the empty string for all of those that don't provide a value. Fixes FS#18763. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-10Make the new 'testing' flag on repo a bit clearerrelease_2010-03-10Dan McGee
Since at least two repositories currently fall under this flag, add some help text and visibility to this column. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Fix up get_depends logic a bitDan McGee
We were not handing depends of 'any' packages correctly if they depended on arch-dependent packages; we labeled them all as virtual. If we have an 'any' package, drop the arch screening and just pick one to link to. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Use repo.testing flag instead of test-based checksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Add a flag to the repo to indicate its 'testing' statusDan McGee
This will eventually lead into a cleanup where we don't do checks on the repo name all over the place like we currently do. There are two migrations involved here; one to add the column and one to deduce the correct value from the existing names of the repos. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-06Fix get_depends() method descriptionDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>