Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is for users that aren't logged in; developers will still see them.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is temporary or at least a quick way to ensure regular users aren't
confused by staging packages; later updates should re-enable display of
this for logged in developers and trusted users.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
There is no real good reason not to do this, since our packages are
lowercased by convention.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Things like ' ', '-', '.', etc. will no longer be accepted in this
field.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This reverts commit 9ab460c53a1ac4c79da6f05f2850ee21beedbab2.
This seemed like the right thing to do, but it doesn't really play well
with our more general dispatch framework we now do on the package
details pages. Just let it 404 like it always did, as these pages are
less essential. We can perhaps add a full dispatcher later if we really
feel the need.
|
|
For example, bitcoin-git in the Arch repos is currently marked replaced
by both bitcoin-qt and bitcoin-daemon. This allows us to show a page
with both options listed instead of a blank 404 page.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This makes sense if there is only one available replacement. We could
get more sophisticated and show the removed page if there are multiple
replacements available.
Additionally, automatically redirect if there was only one matching
package for a given package update deletion object.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We had a variety of fallback paths that we took if a details page didn't
exist for the combination of URL parts passed in. Before I go adding a
few more possibilities, rework this so it is more flexible. It is now as
simple as adding a method to the dispatch options list in order to have
further fallback options.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We can convert the entire search view to a generic class-based ListView.
This is still one of the more disgusting views in the application and
has a ton of logic scattered buckshot across several methods, but this
commit is not meant to address all of that in one go.
This is the last of the deprecated pieces I know of we are still using
in the codebase, so we should be relatively safe in the long run now for
an upgrade to the eventual next major Django release.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that Django actually provides a concise way to use a RequestContext
object without instantiating it, we can use that rather than the old
function-based generic view that worked well to do the same.
Additionally, these function-based generic views will be gone in Django
1.5, so might as well make the move now.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
This is another thing that Google and other search engines try to crawl
that no longer exists at times, so we should handle it gracefully.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We should handle the cases dealing with no filelist available, outdated
filelist, or a package without files, just as the HTML server-side page
does. Add a bit more info to the JSON returned so we can do so.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that we just generate this list in JS, we don't need this separate
code.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This allows us to do better than a generic 404 handler when we know a
package previously existed in a given repository, and should also make
things a bit nicer when getting sent in from a search engine to a page
that no longer exists.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This moves a lot of the package and group display logic into a new view
module, similar to what we already did earlier with a bunch of other
views.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
For something like "/extra/i686/apache-ant/", we can redirect to
"/extra/any/apache-ant/" without ambiguity. Previously this redirected
to the split packages listing with a single package, which was neither
correct nor really expected.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
As of Python 2.6, this is a builtin module that has all the same
functions and capabilities of the Django simplejson module. Additionally
simplejson is deprecated in the upcoming Django 1.5 release.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is why you should test this stuff with random input before rolling
it out. Whoops. URL that caught this problem:
/opensearch/packages/suggest?q=%D7%A0%D7%9F%D7%92%D7%9F
aka
/opensearch/packages/suggest?q=נןגן
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Unfortunately, "invalid" in this case includes spaces, which is a bit
crazy. MD5 the provided search term before using it as a cache key to be
safe.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Touch up the style slightly on the flag help popup to match the main
site style more closely.
When a logged-in user is flagging a package out of date, we have no need
for them to fill in the email field since we already have an email
address on file.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Both some simple cache headers as well as low-level results caching on
search terms suggestions.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* Add a 64x64 icon as indicated in the Opensearch specification.
* Add suggestions capability and a new view providing suggestions based
on package name starting with the typed value.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This still might change and should not be viewed as a public API yet.
This has been a longstanding request in FS#13026.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will allow it to be used elsewhere, and doesn't really belong in
views anyway.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Given that we collect a lot of mirror status data, we can utilize it to
ensure the download link on the website actually works and newly-added
packages have actually been mirrored out. Add a method that attempts to
use the mirror status data to determine a mirror we should redirect our
download requests to. This can change on a regular basis, and falls back
to the old method if no mirror status data is available.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is much more useful than the old contains match if you are trying
to narrow down your search to a specific package.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
When we read the repository databases, we get a filelist in sorted
order. Save time by returning the file list in that order rather than
resorting it based on filename and directory.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We do this for every other related package attribute, so do it here too.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Due to datetime formatting changes in Django 1.4, we know follow the
ECMA specification more closely and use 'yyyy-mm-ddThh:mm_ssZ' format.
As this could break existing users of the JSON data, bump the version.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This reverts commit 797185faed0555efb88a1e6a18e447548a9935fd. 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>
|
|
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>
|
|
This is not a very high bar to meet, and should cut down on at least a
few bogus or spam requests.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These would cause page errors if passed anything not in the ASCII
character set. This change allows for packages to have names composed of
any Unicode characters, not just those in the ASCII set.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* Add a default field to be used for latest() calls.
* Remove signal-based set of created date; instead, set it explicitly so
all of our packages and flag request have the exact same date and time
attached.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is never currently called directly as a view method, but is used by
the normal package details view as a fallback if a package cannot be
located.
This also fixes an issue where looking up a package in a repo it is not
in returns the split details page for one package, which is incorrect
behavior.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This makes it easier to match up a flag request with the package state
at the time of flagging, and might also help to determine if flagging
actions were legit. We only store it if it is the same across all
packages to be marked.
Also, move the various database write activities when flagging packages
into a single transaction.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This makes them persistent rather than the transient beings they
currently are. We attempt to capture all the metadata we need to be able
to do things with this later- aka IP address (for spam checking later),
fields that allow us to mark the request as spam or not an actual
out-of-date report, etc.
As a bonus, logged-in developers now get the email address field filled
in for free. Yay.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This new tables shows multilib packages paired with their regular
counterparts in the normal repos if the pkgver differs. A few name hacks
are needed to trim lib32-, -multilib, etc. from the name to find the
matching package.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We use underscores in all other templates.
Also remove some of the generated whitespace in the template which is
noticeable in very large package lists.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
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>
|