Initial import for public release...

Special Note
  Prior to git import, approx 90% of the code was done by Judd Vinet. Thanks Judd!
This commit is contained in:
eliott 2007-11-03 03:45:10 -04:00
commit 39a548fd26
109 changed files with 8206 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.pyc
*.swp
local_settings.py

6
AUTHORS Normal file
View File

@ -0,0 +1,6 @@
# AUTHORS
Judd Vinet <judd@archlinux.org>
Simo Leone <simo@archlinux.org>
eliott <eliott@cactuswax.net>

339
LICENSE Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

14
README Normal file
View File

@ -0,0 +1,14 @@
# License
See LICENSE file.
# Authors
See AUTHORS file.
# Installation
## Dependencies
- python
- mysql-python
- Django >= 0.95

0
__init__.py Normal file
View File

0
common/__init__.py Normal file
View File

50
common/models.py Normal file
View File

@ -0,0 +1,50 @@
from django.db import models
from django.contrib.auth.models import User
class Mirror(models.Model):
id = models.AutoField(primary_key=True)
domain = models.CharField(maxlength=255)
country = models.CharField(maxlength=255)
url = models.CharField(maxlength=255)
protocol_list = models.CharField(maxlength=255, null=True, blank=True)
admin_email = models.CharField(maxlength=255, null=True, blank=True)
def __str__(self):
return self.domain
class Admin:
list_display = ('domain', 'country')
list_filter = ('country',)
ordering = ['domain']
search_fields = ('domain')
pass
class Donator(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(maxlength=255)
def __str__(self):
return self.name
class Admin:
ordering = ['name']
search_fields = ('name')
pass
class UserProfile(models.Model):
id = models.AutoField(primary_key=True) # not technically needed
notify = models.BooleanField("Send notifications", default=True, help_text="When enabled, user will recieve 'flag out of date' notifications")
alias = models.CharField(core=True, maxlength=50, help_text="Required field")
public_email = models.CharField(core=True, maxlength=50, help_text="Required field")
other_contact = models.CharField(maxlength=100, null=True, blank=True)
website = models.URLField(null=True, blank=True)
yob = models.IntegerField(null=True, blank=True)
location = models.CharField(maxlength=50, null=True, blank=True)
languages = models.CharField(maxlength=50, null=True, blank=True)
interests = models.CharField(maxlength=255, null=True, blank=True)
occupation = models.CharField(maxlength=50, null=True, blank=True)
roles = models.CharField(maxlength=255, null=True, blank=True)
favorite_distros = models.CharField(maxlength=255, null=True, blank=True)
picture = models.FileField(upload_to='devs', default='devs/silhouette.png')
user = models.ForeignKey(User, edit_inline=models.STACKED, num_in_admin=1, min_num_in_admin=1, max_num_in_admin=1, num_extra_on_change=0, unique=True)
class Meta:
db_table = 'user_profiles'
verbose_name = 'Additional Profile Data'
verbose_name_plural = 'Additional Profile Data'

View File

View File

@ -0,0 +1,12 @@
from django import template
register = template.Library()
@register.inclusion_tag('errors.html')
def print_errors(errors):
errs = []
for e,msg in errors.iteritems():
errmsg = str(msg[0])
# hack -- I'm a python idiot
errs.append( (e, errmsg[2:-2]) )
return {'errors': errs}

164
data/pkgmaint_guide.txt Normal file
View File

@ -0,0 +1,164 @@
=============================================================================
THE QUICK AND DIRTY ON HOW TO BE A PACKAGE MAINTAINER
=============================================================================
questions to jvinet@zeroflux.org
1. Follow Package Guidelines
Package guidelines can be found in the Arch Linux documentation.
Please follow them closely.
2. How To Use CVS
The example commands below assume the module 'extra'.
2.1 Make sure your CVSROOT environment variable is set properly. If the
CVS repository is on the same box:
# export CVSROOT=/home/cvs-extra
If you want to access the repository from the different box via SSH:
# export CVS_RSH=ssh
# export CVSROOT=:ext:user@cvs.archlinux.org:/home/cvs-extra
2.2 Checkout the repository. This will download the entire repository to
your local machine:
# cvs co extra
2.3 Updating the repository. This syncs your local repository with the
master. You should do this often, especially if other people could be
working on the same repository.
# cd extra
# cvs -q update -d
2.4 Adding files/directories to the repository. When you want to add a new
package you should create a directory under the respective category and
place the new PKGBUILD in it. For example, to add fvwm to the repo:
# cd extra/x11
# mkdir fvwm
# cd fvwm
# cp /var/abs/PKGBUILD.proto ./PKGBUILD
<edit, test, build, etc>
# cd ..
# cvs add fvwm
# cvs add fvwm/PKGBUILD
2.5 Committing changes. Files are not written to the master repository until
you commit. Never forget to commit!
# cd extra
# cvs commit
This will find all modified files, then throw you into vi where you can
add a log message describing your changes. Save and exit from vi when
you're done and cvs will update the files in the master repository.
2.6 Removing files. If you need to remove a file (eg, an old patch that
isn't needed anymore), you can do the following:
# cd extra/x11/fvwm
# rm old.patch
# cvs remove old.patch
# cvs commit -m "removed old.patch" old.patch
also remove the CURRENT/STABLE tags from the file so it does not appear
in ABS any more:
# cvs tag -d CURRENT old.patch
Don't forget to commit afterwards! Remember that no changes are made
to the master until you commit.
2.7 Removing directories cannot be done easily. If you really need to
remove a directory, email the sysadmin (Judd) and I'll help you out.
2.8 Tagging files. Every file in CVS has tags associated with it, which
allows us to select certain versions of scripts. The db generation
scripts will only look at files that are tagged as CURRENT, so you need
to tag all files after you commit them:
# cd extra/x11/fvwm
# cvs tag -c -F -R CURRENT
NOTE: When tagging, you should be sure to ONLY tag the updated files,
not the entire repository. Otherwise, if parts of your checkout are
out-of-date, you may actually be tagging an OLDER version of a file,
reversing someone else's tag procedure.
3. The Process
3.1 Checkout/update your local repository from cvs.archlinux.org
3.2 Make any changes you need to
3.3 Put your new packages in your local staging directory on archlinux.org.
Suggested syntax is:
scp name-ver-rel.pkg.tar.gz you@archlinux.org:staging/extra/add
3.4 Commit your changes (section 2.5)
3.5 Update the CURRENT tags to new revisions (section 2.8)
3.6 Log in to archlinux.org and run the /arch/db-extra script, which
will re-generate the sync db and place it in /home/ftp/extra, then
move the new/updated packages from your staging directory to the
FTP tree.
3.7 Remove any older versions of packages from /home/ftp/extra to
save diskspace, they should be noted when the db generation script
finishes.
Make sure you do things in this order, mixing them up can break things
temporarily. For example, if you remove older versions from the ftp
tree before you update the database or update the database before
uploading new packages, arch users trying to download the package at
that time will get "file not found" errors.
4. Staging Directories
As mentioned in Section 3, packages need to be uploaded to the proper
staging directory before running a db generation script. The staging
area (located in your home dir) looks like so:
staging
|-- arch
| |-- add
| `-- del
|-- extra
| |-- add
| `-- del
|-- testing
| |-- add
| `-- del
`-- unstable
|-- add
`-- del
As you can see, each repository has two staging directories: "add" and
"del". When you want to add or update a package, you'll place it in the
"add" directory for the repository you're working in. Then run the db-gen
script.
When you want to remove a package, you will move the package OUT OF the FTP
directory (eg, /home/ftp/extra/os/i686/) and INTO the "del" directory for
the repository you're working in. Once moved, you can run the db-gen
script -- it will see that the file has left the FTP tree and will remove
it from the package database.
5. Miscellaneous Stuff
5.1 If you are creating a daemon you need to include an rc.d startup
script for it. Look at /var/abs/daemons/esd for a simple example.
5.2 Please include a line that says '# $Id: pkgmaint_guide.txt,v 1.3 2006/10/05 20:52:01 judd Exp $' at the top of each
PKGBUILD. This will be parsed by cvs during a commit, and replaced
with user/timestamp data.
5.3 Please do some rudimentary checks of the package before making it
'live'. Try installing it and see if there are any file conflicts.
Check for dependencies by running 'ldd' against the binaries and
looking through the .so files it requires. For example,
'ldd /usr/bin/gvim' returns a big list of libs, one of which is
libgtk-x11-2.0.so.0, so gtk2 should be one of the dependencies for
gvim. Also, namcap is available in the extra repository. Running it
against a package will print dependancy warnings as well as possible
configuration problems. Namcap is not the final word, if ldd or
runtime show otherwise, believe them instead.
5.4 When creating a package description for a package, do not include
the package name in a self-referencing way, as it is redundant.
For example, "Nedit is a text editor for X11" could be simplified to
"A text editor for X11". Also try to keep the descriptions to ~80
characters or less.
5.5 When entering cvs log messages for new/upgraded packages, please use
these tags so they can be easily parsed for changelog generation:
if the package is upgrade use: 'upgpkg: pkgname newpkgver'
if the package is new use: 'newpkg: pkgname newpkgver'
$Id: pkgmaint_guide.txt,v 1.3 2006/10/05 20:52:01 judd Exp $

0
devel/__init__.py Normal file
View File

67
devel/views.py Normal file
View File

@ -0,0 +1,67 @@
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core import validators
from archlinux.utils import render_template
from archlinux.packages.models import Package
from archlinux.todolists.models import Todolist, TodolistPkg
from archlinux.settings import DATA_DIR
from archlinux.utils import validate
from archlinux.common.models import UserProfile
@login_required
def index(request):
try:
thismaint = User.objects.get(username=request.user.username)
except User.DoesNotExist:
# weird, we don't have a maintainer record for this logged-in user
thismaint = None
# get a list of incomplete package todo lists
todos = Todolist.objects.get_incomplete()
# get flagged-package stats for all maintainers
stats = Package.objects.get_flag_stats()
if thismaint:
# get list of flagged packages for this maintainer
pkgs = Package.objects.filter(maintainer=thismaint.id).filter(needupdate=True).order_by('repo', 'pkgname')
else:
pkgs = None
return render_template('devel/index.html', request,
{'stats':stats, 'pkgs':pkgs, 'todos':todos, 'maint':thismaint})
@login_required
#@is_maintainer
def change_notify(request):
maint = User.objects.get(username=request.user.username)
notify = request.POST.get('notify', 'no')
try:
maint.get_profile().notify = notify == 'yes'
except UserProfile.DoesNotExist:
UserProfile(user_id=maint.id ,notify=notify == 'yes').save()
maint.get_profile().save()
return HttpResponseRedirect('/devel/')
@login_required
def change_profile(request):
errors = {}
if request.POST:
passwd1, passwd2 = request.POST['passwd'], request.POST['passwd2']
email = request.POST['email']
# validate
if passwd1 != passwd2:
errors['password'] = [' Passwords do not match. ']
validate(errors, 'Email', email, validators.isValidEmail, False, request)
# apply changes
if not errors:
request.user.email = email
if passwd1:
request.user.set_password(passwd1)
request.user.save()
return HttpResponseRedirect('/devel/')
return render_template('devel/profile.html', request, {'errors':errors,'email':request.user.email})
@login_required
def guide(request):
return HttpResponse(file(DATA_DIR + '/pkgmaint_guide.txt').read(),
mimetype='text/plain')

29
feeds.py Normal file
View File

@ -0,0 +1,29 @@
from django.contrib.syndication.feeds import Feed
from archlinux.packages.models import Package
from archlinux.news.models import News
#from datetime import datetime
class PackageFeed(Feed):
title = 'Recent Package Updates'
link = '/packages/'
description = 'Recent Package Updates'
def items(self):
return Package.objects.order_by('-last_update')[:10]
def item_pubdate(self, item):
return item.last_update
def item_categories(self, item):
return (item.repo.name,item.category.category)
class NewsFeed(Feed):
title = 'Recent News Updates'
link = '/news/'
description = 'Recent News Updates'
def items(self):
return News.objects.order_by('-postdate', '-id')[:10]
def item_pubdate(self, item):
return item.postdate

0
lib/__init__.py Normal file
View File

1874
lib/markdown.py Normal file

File diff suppressed because it is too large Load Diff

33
local_settings.py.example Normal file
View File

@ -0,0 +1,33 @@
# Django settings for archlinux project.
## Debug settings
DEBUG = False
## Notification admins
ADMINS = (
('Joe Admin', 'joeadmin@example.com'),
)
## Database settings
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'archlinux'
DATABASE_USER = 'archlinux'
DATABASE_PASSWORD = 'archlinux'
DATABASE_HOST = ''
DATABASE_PORT = ''
### Eanbles/disables caching
ENABLE_CACHE = False
## location for saving dev pictures
MEDIA_ROOT = '/var/www/archlinux/htdocs/img/devs/'
### web url for serving image files
MEDIA_URL = 'http://www.archlinux.org/img/devs/'
# do not put a / at the end
DEPLOY_PATH = '/var/www/archlinux/archlinux'
# Make this unique, and don't share it with anybody.
SECRET_KEY = '00000000000000000000000000000000000000000000000'

11
manage.py Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
sys.exit(1)
if __name__ == "__main__":
execute_manager(settings)

BIN
media/PythonPowered.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

384
media/arch.css Normal file
View File

@ -0,0 +1,384 @@
* { margin: 0; padding: 0; }
* ul { padding: 20px; }
body {
background: url("/media/title_back.png") repeat-x top left #fbf8f1;
padding: 0 30px;
color: #46494d;
font-family: Bitstream Vera Sans, Lucida Grande, Arial, sans-serif;
}
/*
* Divs
*/
#head_container {
height: 175px;
}
#main_nav ul {
list-style: none;
padding-right: 10px;
padding-top: 48px;
}
#main_nav ul li {
display: block;
float: right;
width: 67px;
height: 20px;
padding-top: 2px;
margin-left: 3px;
background: url("/media/tab.png") repeat-x bottom left #fbf8f1;
text-align: center;
font-size: 13px;
}
#main_nav ul li[class~=selected] {
background: #fbf8f1;
}
#main_nav ul li a {
text-decoration: none;
display: block;
}
#dev_nav ul li a {
text-decoration: none;
display: block;
}
#dev_nav ul {
list-style: none;
padding-right: 10px;
padding-top: 5px;
}
#dev_nav ul li {
display: block;
float: right;
width: 87px;
height: 20px;
padding-top: 2px;
margin-left: 3px;
background: url("/media/tab.png") repeat-x bottom left #fbf8f1;
border: 1px solid #cccccc;
text-align: center;
font-size: 13px;
}
#dev_nav ul li[class~=selected] {
background: #fbf8f1;
}
#dev_nav ul li a {
text-decoration: none;
}
#title {
height: 140px;
float: left;
}
#updates {
font-size: small;
/*position: relative;*/
top: 0px;
background: #f6efe0;
border: 1px solid #eee4cb;
padding: 10px;
}
#ads {
float: right;
}
#logo {
float: left;
width: 140px;
height: 140px;
}
#titleimg {
float: left;
}
#devlist {
width: 80%;
padding: 10px;
margin-left: auto;
margin-right: auto;
border-top: 1px dashed black;
border-bottom: 1px dashed black;
text-align: center;
}
.clear {
clear: both;
margin: 0;
padding: 0;
}
.right {
float: right;
width: 320px;
padding: 0 10px 10px 0;
}
.left {
padding: 10px;
margin: 0 360px 0 0;
}
.left p {
text-align: justify;
padding-bottom: 10px;
}
.box {
padding: 10px;
background: #e1e3e6;
border: 1px solid #8faecd;
}
.greybox {
padding: 10px;
background: #f6efe0;
border: 1px solid #eee4cb;
}
div.listing {
padding-right: 10px;
border-left: 1px solid #387cbf;
}
.error {
color: #dd0000;
font-size: small;
}
.foot {
clear: both;
text-align: center;
font-size: 0.8em;
}
#search {
float: right;
position: relative;
top: -2em;
font-size: 0.8em;
}
#search input {
background: #f6efe0;
border: 1px solid #eee4cb;
}
.smalltext {
text-align: right;
font-size: x-small;
}
/*
* Headers
*/
h2 {
margin: 20px 0 10px 0;
}
h2.title {
border-bottom: 1px solid #46494d;
}
h3 {
margin-bottom: 10px;
}
h3.title {
text-align: right;
border-bottom: 1px solid #46494d;
}
h4.title {
text-align: left;
border-bottom: 1px solid #46494d;
}
h4.news {
border-bottom: 1px dotted #8faecd;
}
div.listing h4 {
background: #d1d3d6;
border-top: 1px double #387cbf;
padding: 3px;
}
/*
* Paragraphs, Anchors, Images
*/
p {
padding-bottom: 20px;
}
p.news {
text-align: left;
font-size: small;
}
a {
color: #35526f;
font-weight: bold;
text-decoration: underline;
}
.news a {
text-decoration: none;
}
#about {
position: relative;
top: -9px;
}
#about a {
text-decoration: none;
}
.community a {
text-decoration: none;
}
ol {
padding-left: 45px;
}
ul.small {
list-style: none;
font-size: x-small;
}
ul.links {
list-style: none;
font-size: small;
padding: 0px 0px 20px 20px;
}
img {
border: none;
}
hr {
border: none;
border-top: 1px solid #46494d;
}
.greybox input, button, textarea, select {
background: #e1e3e6;
border: 1px solid #8faecd;
}
.box input, button {
padding: 2px;
background: #c1c3f6;
font-size: x-small;
border: 1px solid #8faecd;
}
button#f_trigger {
background: #e1e3e6;
}
/*
* Table stuff
*/
table.center {
margin-left: auto;
margin-right: auto;
}
table#releases {
font-size: small;
width: 100%;
}
table#releases td {
padding-right: 20px;
}
table#repolinks {
font-size: small;
width: 100%;
}
table#repolinks td {
text-align: right;
}
table#repolinks th {
text-align: left;
}
table#art {
text-align: center;
margin-left: auto;
margin-right: auto;
}
.devpic {
vertical-align: top;
padding-right: 15px;
}
table.deventry {
padding-bottom: 25px;
}
.deventry th {
text-align: left;
vertical-align: top;
white-space: nowrap;
}
.deventry td {
border-bottom: 1px solid black;
width: 100%;
}
table.results {
padding: 0px;
border-collapse: collapse;
}
.results th {
background: #e1e3e6;
border-bottom: 1px solid #46494d;
border-top: 1px solid #46494d;
text-align: left;
padding-top: 0px;
padding-bottom: 0px;
padding-right: 5px;
}
.results th>a {
text-decoration: none;
color: #46494d;
}
.results td {
padding-right: 5px;
vertical-align: top;
font-size: 0.8em;
}
.listing th {
background: #d1d3d6;
border-left: 1px solid #387cbf;
font-size: small;
vertical-align: top;
text-align: left;
padding: 2px;
}
.listing td {
font-size: small;
padding: 2px;
}
blockquote.code {
background: #c1c3f6;
border: 1px solid #8faecd;
margin-left: auto;
margin-right: auto;
white-space: nowrap;
padding: 5px;
font-family: Courier, Courier New, Monospace;
}
/*
* Wiki Styles
*/
h1.wiki {
border-bottom: 1px solid #46494d;
}
div.wikifoot_l {
font-size: x-small;
text-align: left;
padding-top: 25px;
}
div.wikifoot_r {
font-size: x-small;
text-align: right;
float: right;
padding-top: 25px;
}
.wikibody {
padding-top: 15px;
}
.wikibody ol {
padding-left: 28px;
padding-top: 0px;
}
.wikibody ul {
padding-left: 25px;
padding-top: 0px;
}
.wikibody dd {
padding-left: 30px;
}
.wikibody pre code {
background: #c1c3f6;
border: 1px solid #8faecd;
margin-left: auto;
margin-right: auto;
white-space: nowrap;
padding: 5px;
font-family: Courier, Courier New, Monospace;
}
.wikibody blockquote {
padding-left: 30px;
}
.wikibody td {
padding: 5px;
border: 1px solid black;
}
/* Used by Django's FormWrappers */
textarea.vLargeTextField {
width: 450px;
height: 250px;
}
.pkgr2 {
background-color: #eee4cb;
}

265
media/calendar.css Normal file
View File

@ -0,0 +1,265 @@
/* The main calendar widget. DIV containing a table. */
.calendar {
position: relative;
display: none;
border-top: 2px solid #fff;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
border-left: 2px solid #fff;
font-size: 11px;
color: #000;
cursor: default;
background: #c8d0d4;
font-family: tahoma,verdana,sans-serif;
}
.calendar table {
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
font-size: 11px;
color: #000;
cursor: default;
background: #c8d0d4;
font-family: tahoma,verdana,sans-serif;
}
/* Header part -- contains navigation buttons and day names. */
.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
text-align: center;
padding: 1px;
border-top: 1px solid #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
}
.calendar .nav {
background: transparent url(menuarrow.gif) no-repeat 100% 100%;
}
.calendar thead .title { /* This holds the current "month, year" */
font-weight: bold;
padding: 1px;
border: 1px solid #000;
background: #788084;
color: #fff;
text-align: center;
}
.calendar thead .headrow { /* Row <TR> containing navigation buttons */
}
.calendar thead .daynames { /* Row <TR> containing the day names */
}
.calendar thead .name { /* Cells <TD> containing the day names */
border-bottom: 1px solid #000;
padding: 2px;
text-align: center;
background: #e8f0f4;
}
.calendar thead .weekend { /* How a weekend day name shows in header */
color: #f00;
}
.calendar thead .hilite { /* How do the buttons in header appear when hover */
border-top: 2px solid #fff;
border-right: 2px solid #000;
border-bottom: 2px solid #000;
border-left: 2px solid #fff;
padding: 0px;
background-color: #d8e0e4;
}
.calendar thead .active { /* Active (pressed) buttons in header */
padding: 2px 0px 0px 2px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
background-color: #b8c0c4;
}
/* The body part -- contains all the days in month. */
.calendar tbody .day { /* Cells <TD> containing month days dates */
width: 2em;
text-align: right;
padding: 2px 4px 2px 2px;
}
.calendar tbody .day.othermonth {
font-size: 80%;
color: #aaa;
}
.calendar tbody .day.othermonth.oweekend {
color: #faa;
}
.calendar table .wn {
padding: 2px 3px 2px 2px;
border-right: 1px solid #000;
background: #e8f4f0;
}
.calendar tbody .rowhilite td {
background: #d8e4e0;
}
.calendar tbody .rowhilite td.wn {
background: #c8d4d0;
}
.calendar tbody td.hilite { /* Hovered cells <TD> */
padding: 1px 3px 1px 1px;
border: 1px solid;
border-color: #fff #000 #000 #fff;
}
.calendar tbody td.active { /* Active (pressed) cells <TD> */
padding: 2px 2px 0px 2px;
border: 1px solid;
border-color: #000 #fff #fff #000;
}
.calendar tbody td.selected { /* Cell showing selected date */
font-weight: bold;
padding: 2px 2px 0px 2px;
border: 1px solid;
border-color: #000 #fff #fff #000;
background: #d8e0e4;
}
.calendar tbody td.weekend { /* Cells showing weekend days */
color: #f00;
}
.calendar tbody td.today { /* Cell showing today date */
font-weight: bold;
color: #00f;
}
.calendar tbody .disabled { color: #999; }
.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
visibility: hidden;
}
.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
display: none;
}
/* The footer part -- status bar and "Close" button */
.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
}
.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
background: #e8f0f4;
padding: 1px;
border: 1px solid #000;
background: #788084;
color: #fff;
text-align: center;
}
.calendar tfoot .hilite { /* Hover style for buttons in footer */
border-top: 1px solid #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
padding: 1px;
background: #d8e0e4;
}
.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
padding: 2px 0px 0px 2px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
}
/* Combo boxes (menus that display months/years for direct selection) */
.calendar .combo {
position: absolute;
display: none;
width: 4em;
top: 0px;
left: 0px;
cursor: default;
border-top: 1px solid #fff;
border-right: 1px solid #000;
border-bottom: 1px solid #000;
border-left: 1px solid #fff;
background: #d8e0e4;
font-size: 90%;
padding: 1px;
z-index: 100;
}
.calendar .combo .label,
.calendar .combo .label-IEfix {
text-align: center;
padding: 1px;
}
.calendar .combo .label-IEfix {
width: 4em;
}
.calendar .combo .active {
background: #c8d0d4;
padding: 0px;
border-top: 1px solid #000;
border-right: 1px solid #fff;
border-bottom: 1px solid #fff;
border-left: 1px solid #000;
}
.calendar .combo .hilite {
background: #048;
color: #aef;
}
.calendar td.time {
border-top: 1px solid #000;
padding: 1px 0px;
text-align: center;
background-color: #e8f0f4;
}
.calendar td.time .hour,
.calendar td.time .minute,
.calendar td.time .ampm {
padding: 0px 3px 0px 4px;
border: 1px solid #889;
font-weight: bold;
background-color: #fff;
}
.calendar td.time .ampm {
text-align: center;
}
.calendar td.time .colon {
padding: 0px 2px 0px 3px;
font-weight: bold;
}
.calendar td.time span.hilite {
border-color: #000;
background-color: #667;
color: #fff;
}
.calendar td.time span.active {
border-color: #f00;
background-color: #000;
color: #0f0;
}

2133
media/calendar.js Normal file

File diff suppressed because it is too large Load Diff

BIN
media/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,57 @@
/**********************************
Use: cmxform template
Author: Nick Rigby
***********************************/
form.cmxform fieldset { margin-bottom: 10px; }
form.cmxform legend {
padding: 0 2px;
font-weight: bold;
_margin: 0 -7px; /* IE Win */
}
form.cmxform label {
display: inline-block;
line-height: 1.8;
vertical-align: top;
}
form.cmxform fieldset ol {
margin: 0;
padding: 0;
}
form.cmxform fieldset li {
list-style: none;
padding: 5px;
margin: 0;
}
form.cmxform fieldset fieldset {
border: none;
margin: 3px 0 0;
}
form.cmxform fieldset fieldset legend {
padding: 0 0 5px;
font-weight: normal;
}
form.cmxform fieldset fieldset label {
display: block;
width: auto;
}
form.cmxform em {
font-weight: bold;
font-style: normal;
color: #f00;
}
form.cmxform label { width: 120px; } /* Width of labels */
form.cmxform fieldset fieldset label { margin-left: 123px; } /* Width plus 3 (html space) */
/*\*//*/ form.cmxform legend { display: inline-block; } /* IE Mac legend fix */

30
media/forms/cmxform.css Normal file
View File

@ -0,0 +1,30 @@
/**********************************
Name: cmxform Styles
Author: Nick Rigby
***********************************/
form.cmxform {
width: 370px;
font-size: 1.1em;
color: #333;
}
form.cmxform legend { padding-left: 0; }
form.cmxform legend,
form.cmxform label { color: #333; }
form.cmxform fieldset {
border: none;
border-top: 1px solid #C9DCA6;
background: url(../images/cmxform-fieldset.gif) left bottom repeat-x;
}
form.cmxform fieldset fieldset { background: none; }
form.cmxform fieldset li {
padding: 5px 10px 7px;
background: url(../images/cmxform-divider.gif) left bottom repeat-x;
}

22
media/forms/cmxform.js Normal file
View File

@ -0,0 +1,22 @@
if( document.addEventListener ) document.addEventListener( 'DOMContentLoaded', cmxform, false );
function cmxform(){
// Hide forms
$( 'form.cmxform' ).hide().end();
// Processing
$( 'form.cmxform' ).find( 'li/label' ).not( '.nocmx' ).each( function( i ){
var labelContent = this.innerHTML;
var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
var labelSpan = document.createElement( 'span' );
labelSpan.style.display = 'block';
labelSpan.style.width = labelWidth;
labelSpan.innerHTML = labelContent;
this.style.display = '-moz-inline-box';
this.innerHTML = null;
this.appendChild( labelSpan );
} ).end();
// Show forms
$( 'form.cmxform' ).show().end();
}

22
media/forms/core.css Normal file
View File

@ -0,0 +1,22 @@
/**********************************
Use: Core Styles
Author: Nick Rigby
***********************************/
body {
padding: 0 10px;
font: normal 62.5% "Lucida Grande", Helvetica, Verdana, Arial;
}
p { margin: 10px 0; }
.sr {
position: absolute;
left: -9999em;
top: 0;
width: 1px;
height: 1px;
overflow: hidden;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

62
media/forms/reset.css Normal file
View File

@ -0,0 +1,62 @@
/**********************************
Use: Reset Styles for all browsers
Author: Nick Rigby
***********************************/
body, p, blockquote {
margin: 0;
padding: 0;
}
a img, iframe { border: none; }
/* Headers
------------------------------*/
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
font-size: 100%;
}
/* Lists
------------------------------*/
ul, ol, dl, li, dt, dd {
margin: 0;
padding: 0;
}
/* Links
------------------------------*/
a, a:link {}
a:visited {}
a:hover {}
a:active {}
/* Forms
------------------------------*/
form, fieldset {
margin: 0;
padding: 0;
}
fieldset { border: 1px solid #000; }
legend {
padding: 0;
color: #000;
}
input, textarea, select {
margin: 0;
padding: 1px;
font-size: 100%;
font-family: inherit;
}
select { padding: 0; }

16
media/forms/screen.css Normal file
View File

@ -0,0 +1,16 @@
/**********************************
Use: Main Screen Import
Author: Nick Rigby
***********************************/
@import "reset.css";
@import "core.css";
@import "_library/cmxform.css";
@import "cmxform.css";
/* IE5 Macintosh \*//*/
@import "_ie/mac/5.css";
/**/

BIN
media/gnu-head-tiny.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

14
media/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

BIN
media/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
media/mailman-large.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
media/mailman.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
media/mm-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

BIN
media/rss.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

BIN
media/tab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

BIN
media/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
media/title_back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

0
news/__init__.py Normal file
View File

19
news/models.py Normal file
View File

@ -0,0 +1,19 @@
from django.db import models
from django.contrib.auth.models import User
import re
from archlinux.utils import Stripper
class News(models.Model):
id = models.AutoField(primary_key=True)
author = models.ForeignKey(User)
postdate = models.DateField(auto_now_add=True)
title = models.CharField(maxlength=255)
content = models.TextField()
class Meta:
db_table = 'news'
verbose_name_plural = 'news'
get_latest_by = 'postdate'
ordering = ['-postdate', '-id']
def get_absolute_url(self):
return '/news/%i/' % self.id

82
news/views.py Normal file
View File

@ -0,0 +1,82 @@
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import get_object_or_404
from django.contrib.auth.decorators import user_passes_test
from django.contrib.auth.models import User
from django import forms
from archlinux.utils import render_template
from archlinux.news.models import News
from datetime import date
def view(request, newsid):
news = get_object_or_404(News, id=newsid)
return render_template('news/view.html', request, {'news':news})
def list(request):
news = News.objects.order_by('-postdate', '-id')
return render_template('news/list.html', request, {'news':news})
@user_passes_test(lambda u: u.has_perm('news.add_news'))
def add(request):
try:
m = User.objects.get(username=request.user.username)
except User.DoesNotExist:
return render_template('error_page.html', request,
{'errmsg': 'Cannot find a maintainer record for you! No posting allowed.'})
manipulator = News.AddManipulator()
if request.POST:
data = request.POST.copy()
# add in the author ID
data['author'] = m.id
errors = manipulator.get_validation_errors(data)
if not errors:
manipulator.do_html2python(data)
manipulator.save(data)
return HttpResponseRedirect('/news/')
else:
errors = {}
data = {}
form = forms.FormWrapper(manipulator, data, errors)
return render_template('news/add.html', request, {'form': form})
@user_passes_test(lambda u: u.has_perm('news.delete_news'))
def delete(request, newsid):
news = get_object_or_404(News, id=newsid)
#if news.author.id != request.user.id:
# return render_template('error_page.html', request, {'errmsg': 'You do not own this news item'})
if request.POST:
news.delete()
return HttpResponseRedirect('/news/')
return render_template('news/delete.html', request)
@user_passes_test(lambda u: u.has_perm('news.change_news'))
def edit(request, newsid):
try:
m = User.objects.get(username=request.user.username)
except User.DoesNotExist:
return render_template('error_page.html', request,
{'errmsg': 'Cannot find a maintainer record for you! No posting allowed.'})
try:
manipulator = News.ChangeManipulator(newsid)
except News.DoesNotExist:
raise Http404
news = manipulator.original_object
# if news.author != m:
# return render_template('error_page.html', request, {'errmsg': 'You do not own this news item'})
if request.POST:
data = request.POST.copy()
# add in the author ID
data['author'] = news.author.id
errors = manipulator.get_validation_errors(data)
if not errors:
manipulator.do_html2python(data)
manipulator.save(data)
return HttpResponseRedirect('/news/')
else:
errors = {}
data = news.__dict__
form = forms.FormWrapper(manipulator, data, errors)
return render_template('news/add.html', request, {'form': form, 'news':news})

0
packages/__init__.py Normal file
View File

91
packages/models.py Normal file
View File

@ -0,0 +1,91 @@
from django.db import models
from django.contrib.auth.models import User
import re
class PackageManager(models.Manager):
def get_flag_stats(self):
results = []
# first the orphans
unflagged = self.filter(maintainer=0).count()
flagged = self.filter(maintainer=0).filter(needupdate=True).count()
results.append((User(id=0,first_name='Orphans'), unflagged, flagged))
# now the rest
for maint in User.objects.all().order_by('first_name'):
unflagged = self.filter(maintainer=maint.id).count()
flagged = self.filter(maintainer=maint.id).filter(needupdate=True).count()
results.append((maint, unflagged, flagged))
return results
class Category(models.Model):
id = models.AutoField(primary_key=True)
category = models.CharField(maxlength=255)
class Meta:
db_table = 'categories'
verbose_name_plural = 'categories'
class Repo(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(maxlength=255)
class Meta:
db_table = 'repos'
def last_update(self):
try:
latest = Package.objects.filter(repo__name__exact=self.name).order_by('-last_update')[0]
return latest.last_update
except IndexError:
return "N/A"
class Package(models.Model):
id = models.AutoField(primary_key=True)
repo = models.ForeignKey(Repo)
maintainer = models.ForeignKey(User)
category = models.ForeignKey(Category)
needupdate = models.BooleanField(default=False)
pkgname = models.CharField(maxlength=255)
pkgver = models.CharField(maxlength=255)
pkgrel = models.CharField(maxlength=255)
pkgdesc = models.CharField(maxlength=255)
url = models.URLField()
sources = models.TextField()
depends = models.TextField()
last_update = models.DateTimeField(null=True, blank=True)
objects = PackageManager()
class Meta:
db_table = 'packages'
get_latest_by = 'last_update'
def get_absolute_url(self):
return '/packages/%i/' % self.id
def depends_urlize(self):
urls = ''
for dep in self.depends.split(' '):
# shave off any version qualifiers
nameonly = re.match(r"([a-z0-9-]+)", dep).group(1)
try:
p = Package.objects.filter(pkgname=nameonly)[0]
except IndexError:
# couldn't find a package in the DB -- it might be a virtual depend
urls = urls + '<li>' + dep + '</li>'
continue
url = '<li><a href="/packages/' + str(p.id) + '">' + dep + '</a></li>'
urls = urls + url
return urls
def sources_urlize(self):
urls = ''
for source in self.sources.split(' '):
if re.search('://', source):
url = '<li><a href="' + source + '">' + source + '</a></li>'
else:
url = '<li>' + source + '</li>'
urls = urls + url
return urls
class PackageFile(models.Model):
id = models.AutoField(primary_key=True)
pkg = models.ForeignKey(Package)
path = models.CharField(maxlength=255)
class Meta:
db_table = 'packages_files'

View File

View File

@ -0,0 +1,28 @@
from django import template
register = template.Library()
class BuildQueryStringNode(template.Node):
def __init__(self, sortfield):
self.sortfield = sortfield
def render(self, context):
qs = context['querystring'].copy()
if qs.has_key('sort') and qs['sort'] == self.sortfield:
qs['sort'] = '-' + self.sortfield
else:
qs['sort'] = self.sortfield
return '?' + qs.urlencode()
@register.tag(name='buildsortqs')
def do_buildsortqs(parser, token):
try:
tagname, sortfield = token.split_contents()
except ValueError:
raise template.TemplateSyntaxError, "%r tag requires a single argument" % tagname
if not (sortfield[0] == sortfield[-1] and sortfield[0] in ('"', "'")):
raise template.TemplateSyntaxError, "%r tag's argument should be in quotes" % tagname
return BuildQueryStringNode(sortfield[1:-1])
@register.filter(name='space2br')
def space2br(value):
return value.replace(' ', '<br />')

172
packages/views.py Normal file
View File

@ -0,0 +1,172 @@
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.core.mail import send_mail
from django.template import Context, loader
from django.core import validators
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from archlinux.utils import validate, render_template
from datetime import datetime
from archlinux.packages.models import Package, PackageFile, Repo, Category
def update(request):
if request.POST.has_key('adopt'):
mode = 'adopt'
message = 'Adoption was successful'
if request.POST.has_key('disown'):
mode = 'disown'
message = 'Disown was successful'
try:
maint = User.objects.get(username=request.user.username)
except User.DoesNotExist:
return render_template('error_page.html', request, {'errmsg':'No maintainer record found! Are you a maintainer?'})
ids = request.POST.getlist('pkgid')
for id in ids:
pkg = Package.objects.get(id=id)
if mode == 'adopt' and pkg.maintainer_id == 0:
pkg.maintainer = maint
elif mode == 'disown' and pkg.maintainer == maint:
pkg.maintainer_id = 0
else:
message = "You are not the current maintainer"
pkg.save()
return render_template('status_page.html', request, {'message':message})
def details(request, pkgid=0, name='', repo=''):
if pkgid == 0:
p = Package.objects.filter(pkgname=name)
if repo: p = p.filter(repo__name__exact=repo)
# if more then one result, send to the search view
if len(p) > 1: return search(request, name)
if len(p) < 1: return render_template('error_page.html', request,
{'errmsg': 'No matching packages.'})
pkgid = p[0].id
pkg = get_object_or_404(Package, id=pkgid)
return render_template('packages/details.html', request, {'pkg':pkg})
def search(request, query=''):
if request.GET.has_key('q'):
# take the q GET var over the one passed on the URL
query = request.GET['q'].strip()
# fetch the form vars
repo = request.GET.get('repo', 'all')
category = request.GET.get('category', 'all')
lastupdate = request.GET.get('lastupdate', '')
limit = int(request.GET.get('limit', '50'))
skip = int(request.GET.get('skip', '0'))
sort = request.GET.get('sort', '')
maint = request.GET.get('maint', 'all')
# build the form lists
repos = Repo.objects.order_by('name')
cats = Category.objects.order_by('category')
# copy GET data over and add the lists
c = request.GET.copy()
c['repos'], c['categories'] = repos, cats
c['limit'], c['skip'] = limit, skip
c['lastupdate'] = lastupdate
c['sort'] = sort
# 'q' gets renamed to 'query', so it's not in GET
c['query'] = query
# validate
errors = {}
validate(errors, 'Last Update', lastupdate, validators.isValidANSIDate, True, request)
validate(errors, 'Page Limit', str(limit), validators.isOnlyDigits, True, request)
validate(errors, 'Page Skip', str(skip), validators.isOnlyDigits, True, request)
if errors:
c['errors'] = errors
return render_template('packages/search.html', request, c)
if query:
res1 = Package.objects.filter(pkgname__icontains=query)
res2 = Package.objects.filter(pkgdesc__icontains=query)
results = res1 | res2
else:
results = Package.objects.all()
if repo != 'all': results = results.filter(repo__name__exact=repo)
if category != 'all': results = results.filter(category__category__exact=category)
if maint != 'all': results = results.filter(maintainer=maint)
if lastupdate: results = results.filter(last_update__gte=datetime(int(lastupdate[0:4]),int(lastupdate[5:7]),int(lastupdate[8:10])))
# select_related() shouldn't be needed -- we're working around a Django bug
#results = results.select_related().order_by('repos.name', 'category', 'pkgname')
# sort results
if sort == '':
results = results.order_by('repo', 'category', 'pkgname')
else:
# duplicate sort fields shouldn't hurt anything
results = results.order_by(sort, 'repo', 'category', 'pkgname')
qs = request.GET.copy()
# build pagination urls
if results.count() > (skip + limit):
qs['skip'] = skip + limit
c['nextpage'] = '?' + qs.urlencode()
if skip > 0:
qs['skip'] = max(0, skip - limit)
c['prevpage'] = '?' + qs.urlencode()
# pass the querystring to the template so we can build sort queries
c['querystring'] = request.GET
# if only there's only one result, pass right to the package details view
if results.count() == 1: return details(request, results[0].id)
# limit result set
if limit > 0: results = results[skip:(skip+limit)]
c['results'] = results
return render_template('packages/search.html', request, c)
def files(request, pkgid):
pkg = get_object_or_404(Package, id=pkgid)
files = PackageFile.objects.filter(pkg=pkgid)
return render_template('packages/files.html', request, {'pkg':pkg,'files':files})
def flaghelp(request):
return render_template('packages/flaghelp.html', request)
def flag(request, pkgid):
pkg = get_object_or_404(Package, id=pkgid)
context = {'pkg': pkg}
if request.POST.has_key('confirmemail'):
email = request.POST['confirmemail']
if request.POST.has_key('usermessage'):
message = request.POST['usermessage']
else:
message = None
# validate
errors = {}
validate(errors, 'Email Address', email, validators.isValidEmail, False, request)
if errors:
context['errors'] = errors
return render_template('packages/flag.html', request, context)
context['confirmemail'] = email
pkg.needupdate = 1
pkg.save()
if pkg.maintainer_id > 0:
# send notification email to the maintainer
t = loader.get_template('packages/outofdate.txt')
c = Context({
'email': request.POST['confirmemail'],
'message': message,
'pkgname': pkg.pkgname,
'weburl': 'http://www.archlinux.org/packages/' + str(pkg.id) + '/'
})
send_mail('arch: Package [%s] marked out-of-date' % pkg.pkgname,
t.render(c),
'Arch Website Notification <nobody@archlinux.org>',
[pkg.maintainer.email],
fail_silently=True)
return render_template('packages/flag.html', request, context)
@login_required
def unflag(request, pkgid):
pkg = get_object_or_404(Package, id=pkgid)
if pkg.maintainer.username != request.user.username:
return render_template('error_page.html', request, {'errmsg': 'You do not own this package.'})
pkg.needupdate = 0
pkg.save()
return HttpResponseRedirect('/packages/%d/' % (pkg.id))

0
public/__init__.py Normal file
View File

56
public/views.py Normal file
View File

@ -0,0 +1,56 @@
from django.http import HttpResponse
from archlinux.utils import render_template
from django.contrib.auth.models import User
from archlinux.packages.models import Package, Repo
from archlinux.news.models import News
from archlinux.settings import DATA_DIR
from archlinux.common.models import Donator, Mirror
def index(request):
# get the most recent 10 news items
news = News.objects.order_by('-postdate', '-id')[:10]
pkgs = Package.objects.exclude(repo__name__exact='Testing').order_by('-last_update')[:15]
repos = Repo.objects.order_by('name')
return render_template('public/index.html', request, {'news_updates':news,'pkg_updates':pkgs,'repos':repos})
def about(request):
return render_template('public/about.html', request)
def art(request):
return render_template('public/art.html', request)
def cvs(request):
return render_template('public/cvs.html', request)
def developers(request):
devs = User.objects.order_by('username')
return render_template('public/developers.html', request, {'devs':devs})
def donate(request):
donor_count = Donator.objects.count()
splitval = donor_count / 4
slice1 = Donator.objects.all()[:splitval]
slice2 = Donator.objects.all()[(splitval):(splitval*2)]
slice3 = Donator.objects.all()[(splitval*2):(donor_count-splitval)]
slice4 = Donator.objects.all()[(donor_count-splitval):donor_count]
return render_template('public/donate.html', request,
{'slice1':slice1,'slice2':slice2,'slice3':slice3,'slice4':slice4})
def download(request):
mirrors = Mirror.objects.order_by('country', 'domain')
return render_template('public/download.html', request, {'mirrors':mirrors})
def irc(request):
return render_template('public/irc.html', request)
def moreforums(request):
return render_template('public/moreforums.html', request)
def press(request):
return render_template('public/press.html', request)
def projects(request):
return render_template('public/projects.html', request)
def denied(request):
return render_template('public/denied.html', request)

14
scripts/daily_cleanup.py Normal file
View File

@ -0,0 +1,14 @@
from django.db import backend, connection, transaction
""" Daily cleanup file
This purges the session data that is old from the session table.
"""
def clean_up():
# Clean up old database records
cursor = connection.cursor()
cursor.execute("DELETE FROM %s WHERE %s < NOW()" % \
(backend.quote_name('django_session'), backend.quote_name('expire_date')))
cursor.execute("OPTIMIZE TABLE %s" % backend.quote_name('django_session'))
transaction.commit_unless_managed()
if __name__ == "__main__":
clean_up()

6
scripts/djangoshell.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd /home/sites/archlinux/archlinux
export PYTHONPATH=/usr/local/django:/home/sites/archlinux:${PYTHONPATH}
export DJANGO_SETTINGS_MODULE=archlinux.settings
python manage.py $*

89
settings.py Normal file
View File

@ -0,0 +1,89 @@
# Django settings for archlinux project.
## Import local settings
from local_settings import *
## Set the debug values
TEMPLATE_DEBUG = DEBUG
# Set managers to admins
MANAGERS = ADMINS
## Cache backend settings
if ENABLE_CACHE == True:
CACHE_BACKEND = 'file:///tmp/ALdjangocache?timeout=900'
CACHE_MIDDLEWARE_SECONDS = 900
CACHE_MIDDLEWARE_KEY_PREFIX = 'arch'
CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True
# Full path to the data directory
DATA_DIR = '%s/data' % DEPLOY_PATH
# Local time zone for this installation. All choices can be found here:
# http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
TIME_ZONE = 'US/Eastern'
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'
SITE_ID = 1
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/admin-media/'
# URL to send users when they don't have sufficient privileges
BADPRIVS_URL = '/denied/'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
# 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
"django.contrib.sessions.middleware.SessionMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
'django.middleware.http.ConditionalGetMiddleware',
)
# A bit of hackery to insert caching at the right spot
if ENABLE_CACHE == True:
MIDDLEWARE_CLASSES += ('django.middleware.cache.CacheMiddleware',)
MIDDLEWARE_CLASSES += (
"django.middleware.common.CommonMiddleware",
"django.middleware.doc.XViewMiddleware",
)
ROOT_URLCONF = 'archlinux.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates".
# Always use forward slashes, even on Windows.
'%s/templates' % DEPLOY_PATH,
)
# Set django's User stuff to use our profile model
# format is app.model
AUTH_PROFILE_MODULE = 'common.UserProfile'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'archlinux.common',
'archlinux.news',
'archlinux.packages',
'archlinux.public',
'archlinux.todolists',
'archlinux.devel',
'archlinux.wiki'
)

9
templates/403.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2>403 - Access Forbidden</h2>
Sorry, the page you've requested is not available.
</div>
{% endblock %}

9
templates/404.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2>404 - Page Not Found</h2>
Sorry, the page you've requested does not exist.
</div>
{% endblock %}

9
templates/500.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2>500 - Internal Server Error</h2>
Something has gone horribly wrong. Back away slowly.
</div>
{% endblock %}

84
templates/base.html Normal file
View File

@ -0,0 +1,84 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1-strict.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{% block title %}Arch Linux{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/media/arch.css" />
<link rel="icon" href="/media/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/media/favicon.ico" type="image/x-icon" />
{% block head %}
{% endblock %}
</head>
<body>
<div id="head_container">
<div id="title">
<div id="logo"><a href="/"><img src="/media/logo.png" alt="Arch Logo" /></a></div>
<div id="titleimg"><a href="/"><img src="/media/title.png" alt="Arch Linux" /></a></div>
</div>
<div style="float: right; color: #eeeeee; font-size: small">
{% if not user.is_anonymous %}
Logged in as <strong>{{ user.username }}</strong>.
<a href="/accounts/logout/">Logout</a>
{% endif %}
</div>
<div id="main_nav">
{% block topmenu %}
<ul>
<li{% ifequal path '/download/' %} class="selected"{% endifequal %}><a href="/download/">Get Arch</a></li>
<li><a href="http://aur.archlinux.org">AUR</a></li>
<li><a href="http://bugs.archlinux.org">Bugs</a></li>
<li><a href="http://wiki.archlinux.org">Wiki</a></li>
<li><a href="http://bbs.archlinux.org">Forums</a></li>
<li{% ifequal path '/' %} class="selected"{% endifequal %}><a href="/">Home</a></li>
</ul>
{% endblock %}
</div>
{% block ads %}
{% if not user.is_anonymous %}
<div id="dev_nav">
<ul>
<li><a href="/devel/profile/">Profile</a></li>
<li><a href="https://www.archlinux.org/mailman/private/arch-dev/">Archives</a></li>
<li><a href="https://www.archlinux.org/wiki/">Dev Wiki</a></li>
<li><a href="/todo/">Todos</a></li>
<li><a href="/news/">News</a></li>
<li><a href="/devel/">Dashboard</a></li>
</ul>
</div>
{% else %}
<div id="ads">
<script type="text/javascript"><!--
google_ad_client = "pub-0403484505451360";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_color_border = "2D5893";
google_color_border = "fbf8f1";
google_color_bg = "fbf8f1";
google_color_link = "6C83B0";
google_color_url = "99AACC";
google_color_text = "000000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
{% endif %}
</div>
{% endblock %}
</div>
<div id="content">
{% block content %}
<div class="right">
{% block content_right %}
{% endblock %}
</div>
<div class="left">
{% block content_left %}
{% endblock %}
</div>
{% endblock %}
</div>
<div class="foot">
Copyright © 2002-2007, Judd Vinet &lt;<a href="mailto:jvinet@zeroflux.org">jvinet@zeroflux.org</a>&gt;<br /><br />
<img src="http://www.archlinux.org/logos/button.png" alt="Arch Linux" />
</div>
</body>
</html>

View File

@ -0,0 +1,75 @@
{% extends "base.html" %}
{% block content %}
{% if todos %}
<div class="greybox">
<h3 class="title">Package ToDo Lists</h3>
<table class="results" width="100%">
<tr>
<th>Name</th>
<th>Creation Date</th>
<th>Description</th>
</tr>
{% for todo in todos %}
<tr>
<td style="white-space:nowrap"><a href="/todo/{{ todo.id }}/">{{ todo.name }}</a></td>
<td>{{ todo.date_added }}</td>
<td>{{ todo.description }}</td>
</tr>
{% endfor %}
</table>
</div>
<br /><br />
{% endif %}
<div class="greybox">
<h3 class="title">Flagged Package Stats</h3>
<table class="results" width="100%">
<tr>
<th>Maintainer</th>
<th># Package</th>
<th># Flagged</th>
</tr>
{% for maint in stats %}
<tr>
<td><a href="/packages/?maint={{ maint.0.id }}">{{ maint.0.get_full_name }}</a></td>
<td><strong>{{ maint.1 }}</strong> packages</td>
<td><strong>{{ maint.2 }}</strong> packages</td>
</tr>
{% endfor %}
</table>
</div>
<br /><br />
<div class="box">
<h3 class="title">Package Maintenance</h3>
<br />
<table width="100%">
<tr>
<td style="vertical-align: top">
{% if maint %}
<a href="/packages/?maint={{ maint.id }}">My Packages</a><br />
{% endif %}
<a href="/packages/?maint=0">Orphan Packages</a><br />
<br />
<a href="/devel/guide/">Package Maintainer's Guide</a><br />
</td><td style="vertical-align: top">
{% if pkgs %}
<h4>My Flagged Packages:</h4>
<ul class="small">
<li><form method="post" action="/devel/notify/">
<input name="notify" type="checkbox" value="yes"{% if maint.get_profile.notify %} checked{% endif %} /> Notify me when packages are flagged
&nbsp; &nbsp;
<input type="submit" value="Update" />
</form></li>
</ul>
<ul class="small">
{% for pkg in pkgs %}
<li><a href="/packages/{{ pkg.id }}/">{{ pkg.repo.name }}::{{ pkg.pkgname }} {{ pkg.pkgver }}</a></li>
{% endfor %}
</ul>
{% endif %}
</td>
</tr>
</table>
{% endblock %}

View File

@ -0,0 +1,32 @@
{% load validation %}
{% extends "base.html" %}
{% block content %}
<div class="greybox">
<h2 class="title">Developer Profile</h2>
{% if errors %}
{% print_errors errors %}
{% endif %}
<form method="post" action=".">
<table>
<tr>
<td>Username:</td>
<td><strong>{{ user.username }}</strong></td>
</tr><tr>
<td>Email Address:</td>
<td><input type="text" name="email" value="{{ user.email }}" size="30"></td>
</tr><tr>
<td>New Password:</td>
<td><input type="password" name="passwd" size="30"></td>
</tr><tr>
<td>Confirm Password:</td>
<td><input type="password" name="passwd2" size="30"></td>
</tr><tr>
<td colspan="2" align="right">
<input type="submit" value=" Save ">
</td>
</tr>
</table>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h4>{{ errmsg }}</h4>
</div>
{% endblock %}

5
templates/errors.html Normal file
View File

@ -0,0 +1,5 @@
<ul class="error">
{% for err in errors %}
<li>{{ err.0 }}: {{ err.1 }}</li>
{% endfor %}
</ul>

View File

@ -0,0 +1 @@
{{ obj.content }}

View File

@ -0,0 +1 @@
{{ obj.title }}

View File

@ -0,0 +1 @@
{{ obj.pkgdesc }}

View File

@ -0,0 +1 @@
{{ obj.pkgname }} {{ obj.pkgver }}-{{ obj.pkgrel }}

26
templates/news/add.html Normal file
View File

@ -0,0 +1,26 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
{% if news %}
<h2 class="title">Edit News</h2>
{% else %}
<h2 class="title">Add News</h2>
{% endif %}
<form method="post" action=".">
<table>
<tr>
<td>Title:</td>
<td>{{ form.title }}</td>
</tr><tr>
<td style="vertical-align:top">Content:</td>
<td>{{ form.content }}</td>
</tr><tr>
<td colspan="2" align="right">
<input type="submit" value=" Save " />
</td>
</tr>
</table>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
<h2>Confirm Delete</h2>
<hr />
<form method="post" action=".">
<table>
<tr>
<td>Are You Sure?</td>
<td>&nbsp; &nbsp; <input name="delete" type="submit" value=" Yes " /></td>
</tr>
</table>
</form>
</div>
{% endblock %}

26
templates/news/list.html Normal file
View File

@ -0,0 +1,26 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
{% if perms.news.add_news %}
<div style="float:right">
<a href="/news/add/">Add News Item</a>
</div>
{% endif %}
<h2 class="title">News Updates</h2>
<table class="results" width="100%">
{% for item in news %}
<tr>
<td>{{ item.postdate }}</td>
<td><a href="{{ item.get_absolute_url }}">{{ item.title }}</a></td>
<td>
{% comment %}{% if item.author %}{% ifequal user.username item.author.username %}{% endcomment %}
<a href="/news/edit/{{ item.id }}/">edit</a>
<a href="/news/delete/{{ item.id }}/">delete</a>
{% comment %}{% endifequal %}{% endif %}{% endcomment %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

13
templates/news/view.html Normal file
View File

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<div style="float: right; font-size: small">
{{ news.author.get_full_name }}<br />
{{ news.postdate }}
</div>
<h3>{{ news.title }}</h3>
<hr /><br />
{{ news.content|linebreaks }}
</div>
{% endblock %}

View File

@ -0,0 +1,77 @@
{% load package_extras %}
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h2>
<div style="float:right" class="listing">
<ul class="small">
<li><a href="http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/{{ pkg.category.category }}/{{ pkg.pkgname }}/?cvsroot={{ pkg.repo.name }}&amp;only_with_tag=CURRENT">View CVS Entries</a></li>
<li><a href="/packages/files/{{ pkg.id }}/">View File List</a></li>
<li>
{% if pkg.needupdate %}
<span style="font-size:x-small"><em>This package has been flagged out-of-date</em></span>
{% if not user.is_anonymous %}{% if pkg.maintainer %}{% ifequal user.username pkg.maintainer.username %}
<br />&nbsp; &nbsp; <a href="/packages/unflag/{{ pkg.id }}/">Click here to unflag</a>
{% endifequal %}{% endif %}{% endif %}
{% else %}
<a href="/packages/flag/{{ pkg.id }}/" onclick="return !window.open('/packages/flag/{{ pkg.id }}/','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">Flag Package Out-of-Date</a>
<a href="/packages/flaghelp" onclick="return !window.open('/packages/flaghelp','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');"><span style="font-size:x-small">(?)</span></a>
{% endif %}
</li>
{% if not user.is_anonymous %}
<li>&nbsp;</li>
<li>
<form name="devaction" method="post" action="/packages/update/">
<input type="hidden" name="pkgid" value="{{ pkg.id }}" />
<input type="submit" style="background: #e1e3e6;" name="adopt" value="Adopt Package" />
<input type="submit" style="background: #e1e3e6;" name="disown" value="Disown Package" />
</form>
</li>
{% endif %}
</ul>
</div>
<table class="listing">
<tr>
<th>Repository:</th>
<td>{{ pkg.repo.name }}</td>
</tr><tr>
<th>Category:</th>
<td>{{ pkg.category.category }}</td>
</tr><tr>
<th>Description:</th>
<td>{{ pkg.pkgdesc }}</td>
</tr><tr>
<th>URL:</th>
<td><a href="{{ pkg.url }}">{{ pkg.url }}</a></td>
</tr><tr>
<th>Maintainer:</th>
<td>{% if pkg.maintainer %}{{ pkg.maintainer.get_full_name }}{% else %}None{% endif %}</td>
</tr><tr>
<th>LastUpdated:</th>
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
</tr>
</table>
<br />
<table width="100%">
<tr>
<td valign="top">
<div class="listing">
<h4>Dependencies:</h4>
<ul style="font-size:small;list-style:none">
{{ pkg.depends_urlize }}
</ul>
</div>
</td><td colspan="2" valign="top">
<div class="listing">
<h4>Sources:</h4>
<ul style="font-size:small;list-style:none">
{{ pkg.sources_urlize }}
</ul>
</div>
</td>
</tr>
</table>
</div>
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h3>Viewing Files: {{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</h3>
{% for file in files %}
{{ file.path }}<br />
{% endfor %}
</div>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% load validation %}
<html>
<head><title>Flagging Packages</title></head>
<body>
{% if errors %}
{% print_errors errors %}
{% endif %}
<span style="font-family: verdana, arial, helvetica">
{% if confirmemail %}
Thank you. Maintainers have been notified.
{% else %}
<form method="post" action=".">
Please confirm your flag request.<br />
<br />
Email Address: (required) <br />
<input type="text" name="confirmemail" size="40" maxlength="128" /><br />
<br />
Message to dev: (optional)<br />
<textarea name="usermessage" rows="3" cols="40"></textarea><br />
<input type="submit" value=" Confirm " />
</form>
{% endif %}
</span>
</body>
</html>

View File

@ -0,0 +1,14 @@
<html>
<head><title>Flagging Packages</title></head>
<body>
<span style="font-family: verdana, arial, helvetica">
If you notice that one of Arch's packages is out of date (ie, there is a newer
<b>stable</b> release available), then please notify us by using the <b>Flag</b>
button in the <i>Package Details</i> screen. This will notify the maintainer
responsible for that package so they can update it.
<br><br>
<b>Note:</b> Please do <i>not</i> use this facility if the package is broken!
Use the <a target="_blank" href='http://bugs.archlinux.org'>bugtracker</a> instead.
</span>
</body>
</html>

View File

@ -0,0 +1,13 @@
* Note: this is an automated message
{{ email }} wants to notify you that the following package may be out
of date:
{{ pkgname }} ({{ weburl }})
{% if message %}
The user provided the following additional text:
{{ message }}
{% endif %}

View File

@ -0,0 +1,120 @@
{% load validation %}
{% load package_extras %}
{% extends "base.html" %}
{% block head %}
<script type="text/JavaScript" src="/media/calendar.js"></script>
<link href="/media/calendar.css" rel="stylesheet" type="text/css" />
{% endblock %}
{% block content %}
<div class="greybox">
<h4 style="text-align: right">Search Criteria</h4>
{% if errors %}
{% print_errors errors %}
{% endif %}
<hr />
<form method="get" action="/packages/search/">
<table width="100%">
<tr>
<td><span class="smalltext">Repository</span></td>
<td><span class="smalltext">Category</span></td>
<td><span class="smalltext">Keywords</span></td>
<td><span class="smalltext">Last Update</span></td>
<td><span class="smalltext">Per Page</span></td>
</tr><tr>
<td>
<select name="repo">
<option value="all">All</option>
{% for r in repos %}
<option value="{{ r.name }}"{% ifequal repo r.name %} selected{% endifequal %}>{{ r.name|capfirst }}</option>
{% endfor %}
</select>
</td><td>
<select name="category">
<option value="all">All</option>
{% for c in categories %}
<option value="{{ c.category }}"{% ifequal category c.category %} selected{% endifequal %}>{{ c.category|capfirst }}</option>
{% endfor %}
</select>
</td><td>
<input type="text" name="q" value="{{ query|escape }}" size="30" maxlength="200" />
</td><td>
<input type="text" name="lastupdate" value="{{ lastupdate|escape }}" size="10" maxlength="10" id="f_lastupdate" /> <button type="reset" id="f_trigger">...</button>
<script type="text/javascript">
Calendar.setup({
inputField : "f_lastupdate", // id of the input field
ifFormat : "%Y-%m-%d", // format of the input field
showsTime : false, // will display a time selector
button : "f_trigger", // trigger for the calendar (button ID)
singleClick : true, // double-click mode
step : 1 // show all years in drop-down boxes (instead of every other year as default)
});
</script>
</td><td>
<select name="limit">
<option value="50"{% ifequal limit 50 %} selected{% endifequal %}>50</option>
<option value="100"{% ifequal limit 100 %} selected{% endifequal %}>100</option>
<option value="250"{% ifequal limit 250 %} selected{% endifequal %}>250</option>
<option value="0"{% ifequal limit 0 %} selected{% endifequal %}>All</option>
</select>
</td><td>
<input type="submit" value=" Search " />
</td>
</tr>
</table>
</form>
</div>
<br /><br />
{% if results %}
<div class="greybox">
<table class="results" width="100%">
<tr>
{% if not user.is_anonymous %}
<form method="post" action="/packages/update/">
<th>&nbsp;</th>
{% endif %}
<th><a href="{% buildsortqs "repo" %}">Repo</a></th>
<th><a href="{% buildsortqs "category" %}">Category</a></th>
<th><a href="{% buildsortqs "pkgname" %}">Name</a></th>
<th>Version</th>
<th>Description</th>
<th><a href="{% buildsortqs "last_update" %}">Last Updated</a></th>
</tr>
{% for pkg in results %}
<tr class="{% cycle pkgr1,pkgr2 %}">
{% if not user.is_anonymous %}
<td><input type="checkbox" name="pkgid" value="{{ pkg.id }}" /></td>
{% endif %}
<td>{{ pkg.repo.name }}</td>
<td>{{ pkg.category.category }}</td>
<td><a href="{{ pkg.get_absolute_url }}">{{ pkg.pkgname }}</a></td>
{% if pkg.needupdate %}
<td><span style="color:red">{{ pkg.pkgver }}-{{ pkg.pkgrel }}</span></td>
{% else %}
<td>{{ pkg.pkgver }}-{{ pkg.pkgrel }}</td>
{% endif %}
<td>{{ pkg.pkgdesc }}</td>
<td>{{ pkg.last_update|date:"Y-m-d" }}</td>
</tr>
{% endfor %}
<tr>
<td colspan="2" style="font-size:x-small">{% if prevpage %}<br /><a href="{{ prevpage }}">&lt;&lt;&lt; Prev</a>{% endif %}</td>
<td colspan="2">&nbsp;</td>
<td colspan="2" style="font-size:x-small;text-align:right">{% if nextpage %}<br /><a href="{{ nextpage }}">Next &gt;&gt;&gt;</a>{% endif %}</td>
</tr>
{% if not user.is_anonymous %}
<tr>
<td colspan="3">&nbsp;</td>
<td colspan="2" style="text-align:center"><input type="submit" name="adopt" value="Adopt Packages"></td>
<td colspan="1" style="text-align:center"><input type="submit" name="disown" value="Disown Packages"></td>
<td colspan="1">&nbsp;</td>
</tr>
</form>
{% endif %}
</table>
</div>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,82 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">About Arch Linux</h2>
<p>
Arch Linux is a general purpose linux distribution that can be molded to
do just about anything. It is fast, lightweight, flexible, and most of the
parts under the hood are quite simple to understand and tweak, which can
make it a good distro to "learn the ropes" on. We do not provide any
configuration helper utilities (ie, you won't find <i>linuxconf</i> in
here) so you will quickly become very proficient at configuring your system
from the shell commandline.
</p>
<p>
Arch Linux uses i686-optimized packages which gives us improved
performance over some of our i386-optimized cousins. This means that Arch
Linux will only run on a Pentium II processor or higher. We try to stay
fairly bleeding edge, and typically have the latest stable versions of
software.
</p>
<p>
Arch Linux uses the <a href='http://www.archlinux.org/pacman'>Pacman</a>
package manager, which couples a simple binary package format with an
easy-to-use build system, allowing the users to easily manage and customize
their packages, whether they be official Arch packages or the user's own
homegrown ones. The repository system allows users to build and maintain
their own custom package repositories, which encourages community growth and
contribution.
</p>
<p>
Pacman can keep a system up to date by synchronizing package lists with
the master server, making it a breeze for the security-conscious system
administrator to maintain. This server/client model also allows you to
download/install packages with a simple command, complete with all required
dependencies (similar to Debian's apt-get).
</p>
<p>
Arch's official package set is fairly streamlined, but we supplement this
with a larger, more complete "extra" repository that contains a lot of the
stuff that never made it into our core package set. This repository is
constantly growing with the help of packages submitted from our strong
community.
</p>
<p>
Arch Linux does not provide any official support, but you will find a lot
of helpful people on our IRC channel and on our <a
href='http://bbs.archlinux.org'>user forums</a>. Chances are that some other
Archer has had the same problem/question as you and it's already been
answered. Ask around!
</p>
<p>
Arch Linux uses a "rolling release" system which works like this: We have
two versions of our core package set at any given time, <b>Current</b> and
<b>Release</b>. The Current repository always contains the latest and
greatest versions of packages. As soon as a package is updated it is part of
the Current repository, so this is the one to follow if you want to stay very
up to date. The Release repository follows the semi-regular snapshot
releases and does not update until the next snapshot/iso has been released.
For example, the Release repository will point to all packages on the 0.5 ISO
until we release 0.6; then it will point to 0.6 packages until 0.7 is
released. This is useful if you only want to update your system when a new
release is available.
</p>
<p>
So, to sum up: Arch Linux is a workhorse distribution designed to fit the
needs of the competent linux user. We strive to make it both powerful and
easy to manage, making it an ideal distro for servers and workstations. Take
it in any direction you like.
</p>
</div>
<br /><br />
{% endblock %}

28
templates/public/art.html Normal file
View File

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block content %}
<br /><br />
<div class="box">
<h2 class="title">Arch Linux Logos</h2>
<br /><br />
<table id="art" width="90%">
<tr>
<td><img src="/logos/archblue2.png"><br><a href="/logos/archlinux_logo_1.svg">SVG</a></td>
<td><a href="/logos/archlinux_logo_aqua.png"><img src="/logos/sml-archlinux_logo_aqua.png" border=0></a><br><a href="/logos/archlinux_logo_aqua.svg">SVG</a></td>
</tr><tr>
<td><img src="/logos/128x128/arch_linux_blue.png"><br><a href="/logos/scalable/arch_linux_blue.svg">SVG</a></td>
<td><img src="/logos/128x128/arch_linux_white.png"><br><a href="/logos/scalable/arch_linux_white.svg">SVG</a></td>
</tr><tr>
<td><img src="/logos/archblue.png"><br><a href="/logos/archlinux_logo_2.svg">SVG</a></td>
<td><a href="/logos/archstar.jpg"><img src="/logos/sml-archstar.jpg" border="0"></a></td>
</tr><tr>
<td><a href="/logos/cdlabel-0.8-2.svg"><img src="/logos/sml-cdlabel-0.8-2.png" border="0"></a></td>
<td><a href="/logos/cdlabel-0.8.svg"><img src="/logos/sml-cdlabel-0.8.png" border="0"></a></td>
</tr><tr>
<td colspan="2"><img src="/logos/archbannerglass3.jpg"></td>
</tr>
</table>
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Download Arch Linux</h2>
<br /><br />
</div>
<br /><br />
{% endblock %}

48
templates/public/cvs.html Normal file
View File

@ -0,0 +1,48 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox" style="text-align:center">
You can access all of our PKGBUILD files from the
<a href="http://cvs.archlinux.org">cvsweb</a> interface.
</div>
<br /><br />
<div class="box">
<h2 class="title">CVS Repositories</h2>
<br /><br />
Anonymous CVS access is also available. Use <i><u>anonymous</u></i> as the
username and password.<br /><br />
<ol class="instructions">
<li>
Set CVSROOT to the repository you wish to access:<br /><br />
<blockquote class="code">
# export CVSROOT=:pserver:anonymous@cvs.archlinux.org:/home/cvs-core<br /><br />
OR<br /><br />
# export CVSROOT=:pserver:anonymous@cvs.archlinux.org:/home/cvs-extra<br /><br />
OR<br /><br />
# export CVSROOT=:pserver:anonymous@cvs.archlinux.org:/home/cvs-unstable<br /><br />
</blockquote>
<br /><br />
</li>
<li>
Login:<br /><br />
<blockquote class="code">
# touch ~/.cvspass<br />
# cvs login<br />
Logging in to :pserver:anonymous@cvs.archlinux.org:2401/home/cvs-core<br />
CVS password: anonymous<br />
</blockquote>
<br /><br />
</li>
<li>
Check out the repository:<br /><br />
<blockquote class="code">
# cvs -z3 co core<br /><br />
OR<br /><br />
# cvs -z3 co extra<br />
</blockquote>
</li>
</ol>
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<br /><br />
Sorry, you don't have sufficient privileges to perform this function.
<br /><br />
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,67 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Arch Linux Core Developers</h2>
<br /><br />
<div id="devlist">
{% for dev in devs %}
<a href="#{{ dev.first_name}}">{{ dev.first_name }}</a> &nbsp;
{% endfor %}
</div><br /><br />
<table class="center" cellpadding="20">
{% for dev in devs %}
<tr>
<td class="devpic">
<img src="{{ dev.get_profile.get_picture_url }}" height="175" width="175" style="border:1px solid black">
</td><td>
<a name="{{ dev.first_name }}" />
<table class="deventry" cellspacing="5">
<tr>
<th>Name:</th>
<td>{{ dev.get_full_name }}</td>
</tr><tr>
<th>Alias:</th>
<td>{{ dev.get_profile.alias }}</td>
</tr><tr>
<th>Email:</th>
<td>{{ dev.get_profile.public_email }}</td>
</tr><tr>
<th>Other Contact:</th>
<td>{{ dev.get_profile.other_contact }}</td>
</tr><tr>
<th>Roles:</th>
<td>{{ dev.get_profile.roles }}<br />
</td>
</tr><tr>
<th>Website:</th>
<td>{{ dev.get_profile.website }}</td>
</tr><tr>
<th>Occupation:</th>
<td>{{ dev.get_profile.occupation }}</td>
</tr><tr>
<th>YOB:</th>
<td>{% if dev.get_profile.yob %}{{ dev.get_profile.yob }}{% else %}&nbsp;{% endif %}</td>
</tr><tr>
<th>Location:</th>
<td>{{ dev.get_profile.location }}</td>
</tr><tr>
<th>Languages:</th>
<td>{{ dev.get_profile.languages }}</td>
</tr><tr>
<th>Interests:</th>
<td>{{ dev.get_profile.interests }}</td>
</tr><tr>
<th>Favorite Distros:</th>
<td>{{ dev.get_profile.favorite_distros }}</td>
</tr>
</table>
</td>
</tr>
{% endfor %}
</table>
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,59 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Donate to Arch Linux</h2>
<p>
Arch Linux survives because of the tireless efforts of many people in
the community and the core development circle. None of us are paid for our
work, and we don't have the personal funds to sustain server costs ourselves.
</p><p>
There are many ways to help Arch Linux. If technical development,
documentation, or support aren't your strong points, you could certainly
help us by dropping a few bucks our way.
</p><p>
Many thanks!
</p>
<div style="text-align:center">
<!-- paypal code -->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="jvinet@zeroflux.org">
<input type="hidden" name="item_name" value="Arch Linux">
<input type="hidden" name="image_url" value="/logos/arch-paypal.jpg">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="cn" value="Suggestions/Comments">
<input type="hidden" name="no_note" value="1">
<input type="image" src="https://www.paypal.com/images/x-click-butcc-donate.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" style="background: transparent; border: none">
</form>
</div>
<br /><br />
<h2 class="title">Past Donors</h2>
<table width="100%">
<tr>
<td style="font-size:x-small;vertical-align:top">
{% for donor in slice1 %}
{{ donor.name }}<br />
{% endfor %}
</td>
<td style="font-size:x-small;vertical-align:top">
{% for donor in slice2 %}
{{ donor.name }}<br />
{% endfor %}
</td>
<td style="font-size:x-small;vertical-align:top">
{% for donor in slice3 %}
{{ donor.name }}<br />
{% endfor %}
</td>
<td style="font-size:x-small;vertical-align:top">
{% for donor in slice4 %}
{{ donor.name }}<br />
{% endfor %}
</td>
</tr>
</table>
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,74 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Buy A CD</h2>
CDs are available for purchase from OSDisc.com. For each CD purchased, a
portion of the money goes to the Arch Linux Project.<br /><br />
<div style="text-align:center">
<a href="http://www.osdisc.com/cgi-bin/distro/index.cgi?distro=archlinux">Click here to purchase a CD</a>
</div>
<br /><br />
<h2 class="title">BitTorrent Download</h2>
<br /><br />
<div style="text-align:center">
<h3>Download with BitTorrent</h3>
If you can spare the bytes, please leave the BT client
open after your<br /> download is finished, so you can seed it back to others.<br />
<br />
<table class="center" cellspacing="10">
<tr>
<th>&nbsp;</th>
<th>CORE</th>
<th>FTP Install</th>
</tr>
<tr>
<td>i686:</td>
<td>
<a href="ftp://ftp.archlinux.org/iso/2007.08/i686/Archlinux-i686-2007.08-2.core.iso.torrent">
2007.08-2
</a>
</td>
<td>
<a href="ftp://ftp.archlinux.org/iso/2007.08/i686/Archlinux-i686-2007.08-2.ftp.iso.torrent">
2007.08-2
</a>
</td>
</tr><tr>
<td>x86_64:</td>
<td>
<a href="ftp://ftp.archlinux.org/iso/2007.08/x86_64/Archlinux-x86_64-2007.08-2.core.iso.torrent">
2007.08-2
</a>
</td>
<td>
<a href="ftp://ftp.archlinux.org/iso/2007.08/x86_64/Archlinux-x86_64-2007.08-2.ftp.iso.torrent">
2007.08-2
</a>
</td>
</tr>
</table>
</div>
<br /><br />
<h2 class="title">HTTP/FTP Download</h2>
<br /><br />
<div style="text-align:center">
<h3>Download with HTTP/FTP</h3>
In addition to the BitTorrent links above, ISO images can also be downloaded <br /> via HTTP/FTP from the /iso/ sub-directory of mirror sites listed below.<br />
<br /><br />
<h3>Mirror Sites</h3>
<table class="center" cellspacing="10">
{% for mirror in mirrors %}
<tr>
<td style="text-align:left"><a href="{{ mirror.url }}">{{ mirror.domain }}</a></td>
<td style="text-align:right">{{ mirror.country }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<br /><br />
{% endblock %}

174
templates/public/index.html Normal file
View File

@ -0,0 +1,174 @@
{% extends "base.html" %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" />
<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" />
{% endblock %}
{% block content_left %}
<div id="about" class="box">
<h2>Welcome to Arch!</h2>
<p>
You've reached the website for <strong>Arch Linux</strong>, a lightweight
and flexible linux distribution that tries to Keep It Simple.
</p><p>
Currently we have official packages optimized for the i686 and x86-64
architectures. We complement our official package sets with a
<a href="http://aur.archlinux.org">community-operated package repository</a>
that grows in size and quality each and every day.
</p><p>
Our strong community is diverse and helpful, and we pride ourselves on
the range of skillsets and uses for Arch that stem from it. Please
check out our <a href="http://bbs.archlinux.org">forums</a> and
<a href="http://www.archlinux.org/mailman/listinfo/">mailing lists</a>
to get your feet wet. Also glance through our <a href="http://wiki.archlinux.org">wiki</a>
if you want to learn more about Arch.
</p><p style="text-align: right">
<a href="/about/"><span style="font-size:x-small">Learn more...</span></a>
</p>
</div>
<br /><br />
<div style="float:right;position:relative;bottom:-25px">
<a href="/feeds/news/"><img src="/media/rss.png" alt="RSS Feed" /></a>
</div>
<h2 class="title">Latest News</h2>
<div>
{% for news in news_updates %}
<br />
<span style="float:right; font-size:x-small">{{ news.postdate }}</span>
<h4 class="news"><a href="{{ news.get_absolute_url }}">{{ news.title }}</a></h4>
<p class="news">{{ news.content|striptags|truncatewords:60 }}</p>
<br />
{% endfor %}
<span style="float:right;font-size:x-small"><a href="/news/">More News...</a></span>
<br /><br />
</div>
{% endblock %}
{% block content_right %}
<div id="search">
<form method="get" action="/packages/search/">
<p>Package Search:&nbsp;&nbsp;<input type="text" name="q" size="20" maxlength="200" /></p>
</form>
</div>
<div id="updates">
<table width="100%">
<tr>
<td><h3>Recent Updates</h3></td>
<td style="vertical-align:top;text-align:right"><a href="/feeds/packages/"><img src="/media/rss.png" alt="RSS Feed" /></a></td>
</tr>
{% for pkg in pkg_updates %}
<tr>
<td><a href="{{ pkg.get_absolute_url }}">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</a></td>
<td style="text-align:right">{{ pkg.category.category }}</td>
</tr>
{% endfor %}
<tr>
<td colspan="2" style="text-align:right;font-size:x-small"><br /><a href="/packages/search?sort=-last_update">More...</a></td>
</tr>
</table>
</div>
<br />
<div class="greybox">
<h3>Package Repositories</h3>
<table id="repolinks">
{% for repo in repos %}
<tr>
<th><a href="/packages/?repo={{ repo.name }}">{{ repo.name }}</a></th>
<td>{{ repo.last_update }}</td>
</tr>
{% endfor %}
</table>
</div>
<br />
<div class="greybox">
<h3>Releases</h3>
<table id="releases">
<tr>
<td><a href="/packages/?repo=Core">2007.08-2</a></td>
<td><a href="/packages/?repo=Core">Don't Panic</a></td>
<td style="text-align:right">2007-10-07</td>
</tr><tr>
<td><a href="/packages/?repo=Current">2007.08.1</a></td>
<td><a href="/packages/?repo=Current">Don't Panic</a></td>
<td style="text-align:right">2007-09-10</td>
</tr><tr>
<td><a href="/packages/?repo=Current">2007.08</a></td>
<td><a href="/packages/?repo=Current">Don't Panic</a></td>
<td style="text-align:right">2007-08-05</td>
</tr><tr>
<td><a href="/packages/?repo=Current">2007.05</a></td>
<td><a href="/packages/?repo=Current">Duke</a></td>
<td style="text-align:right">2007-05-17</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.8.txt">0.8</a></td>
<td><a href="/static/pkglists/list-0.8.txt">Voodoo</a></td>
<td style="text-align:right">2007-03-31</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.7.2.txt">0.7.2</a></td>
<td><a href="/static/pkglists/list-0.7.2.txt">Gimmick</a></td>
<td style="text-align:right">2006-05-23</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.7.1.txt">0.7.1</a></td>
<td><a href="/static/pkglists/list-0.7.1.txt">Noodle</a></td>
<td style="text-align:right">2006-01-05</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.7.txt">0.7</a></td>
<td><a href="/static/pkglists/list-0.7.txt">Wombat</a></td>
<td style="text-align:right">2005-01-24</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.6.txt">0.6</a></td>
<td><a href="/static/pkglists/list-0.6.txt">Widget</a></td>
<td style="text-align:right">2004-03-01</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.5.txt">0.5</a></td>
<td><a href="/static/pkglists/list-0.5.txt">Nova</a></td>
<td style="text-align:right">2003-07-21</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.4.txt">0.4</a></td>
<td><a href="/static/pkglists/list-0.4.txt">Dragon</a></td>
<td style="text-align:right">2002-12-18</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.3.txt">0.3</a></td>
<td><a href="/static/pkglists/list-0.3.txt">Firefly</a></td>
<td style="text-align:right">2002-08-07</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.2.txt">0.2</a></td>
<td><a href="/static/pkglists/list-0.2.txt">Vega</a></td>
<td style="text-align:right">2002-04-17</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.1.txt">0.1</a></td>
<td><a href="/static/pkglists/list-0.1.txt">Homer</a></td>
<td style="text-align:right">2002-03-11</td>
</tr>
</table>
</div>
<br />
<h3>Documentation:</h3>
<ul class="links">
<li><a href="/static/docs/arch-install-guide.txt">Installation Guide</a></li>
<li><a href="http://wiki.archlinux.org">Wiki</a></li>
</ul>
<h3>Support Arch:</h3>
<ul class="links">
<li><a href="/donate/">Donate</a></li>
<li><a href="http://www.cafeshops.com/archlinux/">Arch Schwag</a></li>
<li><a href="/art/">Logos &amp; Artwork</a></li>
</ul>
<h3>Community Links:</h3>
<ul class="links">
<li><a href="http://www.archlinux.org/mailman/listinfo/">Mailing Lists</a></li>
<li><a href="/irc/">IRC Channels</a></li>
<li><a href="http://planet.archlinux.org">Planet Arch</a></li>
<li><a href="/static/newsletters/">Newsletters</a></li>
<li><a href="/projects/">Arch-Based Projects</a></li>
<li><a href="/moreforums/">Non-English Forums</a></li>
<li><a href="/press/">Press</a></li>
</ul>
<h3>Development:</h3>
<ul class="links">
<li><a href="/developers/">Developers</a></li>
<li><a href="http://bugs.archlinux.org">Bug Tracker</a></li>
<li><a href="/cvs/">CVS</a></li>
</ul>
{% endblock %}

View File

@ -0,0 +1,151 @@
{% extends "base.html" %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" />
<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" />
{% endblock %}
{% block content_left %}
<div id="about" class="box">
<h2>Welcome to Arch!</h2>
<p>
You've reached the website for <strong>Arch Linux</strong>, a lightweight
and flexible linux distribution that tries to Keep It Simple.
</p><p>
Currently we have official packages optimized for the i686 and x86-64
architectures. We complement our official package sets with a
<a href="http://aur.archlinux.org">community-operated package repository</a>
that grows in size and quality each and every day.
</p><p>
Our strong community is diverse and helpful, and we pride ourselves on
the range of skillsets and uses for Arch that stem from it. Please
check out our <a href="http://bbs.archlinux.org">forums</a> and
<a href="http://www.archlinux.org/mailman/listinfo/">mailing lists</a>
to get your feet wet. Also glance through our <a href="http://wiki.archlinux.org">wiki</a>
if you want to learn more about Arch.
</p><p style="text-align: right">
<a href="/about/"><span style="font-size:x-small">Learn more...</span></a>
</p>
</div>
<br /><br />
<div style="float:right;position:relative;bottom:-25px">
<a href="/feeds/news/"><img src="/media/rss.png" alt="RSS Feed" /></a>
</div>
<h2 class="title">Latest News</h2>
<div>
{% for news in news_updates %}
<span style="float:right; font-size:x-small">{{ news.postdate }}</span>
<h4 class="news"><a href="{{ news.get_absolute_url }}">{{ news.title }}</a></h4>
<p class="news">{{ news.content|striptags|truncatewords:60 }}</p><br /><br />
{% endfor %}
</div>
{% endblock %}
{% block content_right %}
<div id="search">
<form method="get" action="/packages/search/">
<p>Package Search:&nbsp;&nbsp;<input type="text" name="q" size="20" maxlength="200" /></p>
</form>
</div>
<br /><br />
<div id="updates">
<div style="float:right">
<a href="/feeds/packages/"><img src="/media/rss.png" alt="RSS Feed" /></a>
</div>
<h3>Recent Updates</h3>
<table width="100%">
{% for pkg in pkg_updates %}
<tr>
<td><a href="{{ pkg.get_absolute_url }}">{{ pkg.pkgname }} {{ pkg.pkgver }}-{{ pkg.pkgrel }}</a></td>
<td style="text-align:right">{{ pkg.category.category }}</td>
</tr>
{% endfor %}
</table>
</div>
<div class="greybox">
<h3>Package Repositories</h3>
<table id="repolinks">
{% for repo in repos %}
<tr>
<th><a href="/packages/?repo={{ repo.name }}">{{ repo.name }}</a></th>
<td>{{ repo.last_update }}</td>
</tr>
{% endfor %}
</table>
</div>
<br />
<div class="greybox">
<h3>Releases</h3>
<table id="releases">
<tr>
<td><a href="/packages/?repo=Current">0.8</a></td>
<td><a href="/packages/?repo=Current">_________</a></td>
<td style="text-align:right"><em>pending</em></td>
</tr><tr>
<td><a href="/static/pkglists/list-0.7.2.txt">0.7.2</a></td>
<td><a href="/static/pkglists/list-0.7.2.txt">Gimmick</a></td>
<td style="text-align:right">2006-05-23</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.7.1.txt">0.7.1</a></td>
<td><a href="/static/pkglists/list-0.7.1.txt">Noodle</a></td>
<td style="text-align:right">2006-01-05</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.7.txt">0.7</a></td>
<td><a href="/static/pkglists/list-0.7.txt">Wombat</a></td>
<td style="text-align:right">2005-01-24</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.6.txt">0.6</a></td>
<td><a href="/static/pkglists/list-0.6.txt">Widget</a></td>
<td style="text-align:right">2004-03-01</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.5.txt">0.5</a></td>
<td><a href="/static/pkglists/list-0.5.txt">Nova</a></td>
<td style="text-align:right">2003-07-21</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.4.txt">0.4</a></td>
<td><a href="/static/pkglists/list-0.4.txt">Dragon</a></td>
<td style="text-align:right">2002-12-18</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.3.txt">0.3</a></td>
<td><a href="/static/pkglists/list-0.3.txt">Firefly</a></td>
<td style="text-align:right">2002-08-07</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.2.txt">0.2</a></td>
<td><a href="/static/pkglists/list-0.2.txt">Vega</a></td>
<td style="text-align:right">2002-04-17</td>
</tr><tr>
<td><a href="/static/pkglists/list-0.1.txt">0.1</a></td>
<td><a href="/static/pkglists/list-0.1.txt">Homer</a></td>
<td style="text-align:right">2002-03-11</td>
</tr>
</table>
</div>
<br />
<h3>Documentation:</h3>
<ul class="links">
<li><a href="/static/docs/arch-install-guide.html">Installation Guide</a></li>
</ul>
<h3>Support Arch:</h3>
<ul class="links">
<li><a href="/donate/">Donate</a></li>
<li><a href="http://www.cafeshops.com/archlinux/">Arch Schwag</a></li>
<li><a href="/art/">Logos &amp; Artwork</a></li>
</ul>
<h3>Community Links:</h3>
<ul class="links">
<li><a href="http://www.archlinux.org/mailman/listinfo/">Mailing Lists</a></li>
<li><a href="/irc/">IRC Channels</a></li>
<li><a href="http://planet.archlinux.org">Planet Arch</a></li>
<li><a href="http://blog.archlinux.org">Development Blog</a></li>
<li><a href="/static/newsletters/">Newsletters</a></li>
<li><a href="/projects/">Arch-Based Projects</a></li>
<li><a href="/moreforums/">Non-English Forums</a></li>
<li><a href="/press/">Press</a></li>
</ul>
<h3>Development:</h3>
<ul class="links">
<li><a href="/developers/">Developers</a></li>
<li><a href="http://bugs.archlinux.org">Bug Tracker</a></li>
<li><a href="/cvs/">CVS</a></li>
</ul>
{% endblock %}

39
templates/public/irc.html Normal file
View File

@ -0,0 +1,39 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">IRC Channels</h2>
<br /><br />
<p>You can find Arch-related discussion on the following IRC channels.
All channels are on <strong>irc.freenode.net</strong></p>
<table cellspacing="20">
<tr>
<td><strong>#archlinux</strong></td>
<td>The main discussion channel, mostly in English</td>
</tr><tr>
<td><strong>#archlinux-bugs<strong></td>
<td>Bug-centric discussion</td>
</tr><tr>
<td><strong>#archlinuxfr</strong></td>
<td>Discussion (French)</td>
</tr><tr>
<td><strong>#archlinux.de</strong></td>
<td>Discussion (German)</td>
</tr><tr>
<td><strong>#archlinux.se</strong></td>
<td>Discussion (Swedish)</td>
</tr><tr>
<td><strong>#archlinux.dk</strong></td>
<td>Discussion (Danish)</td>
</tr><tr>
<td><strong>#archlinux-es</strong></td>
<td>Discussion (Spanish)</td>
</tr><tr>
<td><strong>#archlinux.br</strong></td>
<td>Discussion (Brazilian Community)</td>
</tr>
</table>
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,78 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">More Arch Forums</h2>
<br /><br />
<p>
Our main forum is located at <a href="http://bbs.archlinux.org">bbs.archlinux.org</a>.
However, there are other locale-specific forums available.
</p>
<table cellspacing="20">
<tr>
<td width="200">Brazilian</td>
<td><a href="http://forum.archlinux-br.org/">http://forum.archlinux-br.org</a></td>
</tr>
<tr>
<td>Czech</td>
<td><a href="http://forum.archlinux.cz/">http://forum.archlinux.cz/</a></td>
</tr>
<tr>
<td>Danish</td>
<td><a href="http://forum.archlinux.dk">http://forum.archlinux.dk/</a></td>
</tr>
<tr>
<td>Dutch</td>
<td><a href="http://arch-forum.nl/">http://arch-forum.nl/</a></td>
</tr>
<tr>
<td>French</td>
<td><a href="http://forums.archlinuxfr.org/">http://forums.archlinuxfr.org</a></td>
</tr>
<tr>
<td>French</td>
<td><a href="http://forums.archlinux.fr/">http://forums.archlinux.fr</a></td>
</tr>
<tr>
<td>German</td>
<td><a href="http://forum.archlinux.de/">http://forum.archlinux.de</a></td>
</tr>
<tr>
<td>Hungarian</td>
<td><a href="http://archlinux.hu/forum/">http://archlinux.hu/forum/</a></td>
</tr>
<tr>
<td>Italian</td>
<td><a href="http://www.archlinux.it/forum/">http://www.archlinux.it/forum/</a></td>
</tr>
<tr>
<td>Polish</td>
<td><a href="http://forum.arch-linux.pl">http://forum.arch-linux.pl</a></td>
</tr>
<tr>
<td>Russian</td>
<td><a href="http://archlinux.org.ru/forum/">http://archlinux.org.ru/forum/</a></td>
</tr>
<tr>
<td>Spanish</td>
<td><a href="http://www.archlinux.com.ar/foros/">http://www.archlinux.com.ar/foros/</a></td>
</tr>
<tr>
<td>Sweden</td>
<td><a href="http://forum.archlinux.se/">http://forum.archlinux.se/</a>
</tr>
<tr>
<td>Turkish</td>
<td><a href="http://forum.linux-sevenler.org/index.php/board,65.0.html">http://forum.linux-sevenler.org/index.php/board,65.0.html</a></td>
</tr>
<tr>
<td>Ukrainian</td>
<td><a href="http://archlinux.org.ua/">http://archlinux.org.ua/</a></td>
</tr>
</table>
<br />
If you have a forum you would like linked, please open a <a href="http://bugs.archlinux.org/">Bug Ticket</a> with the category "web site", and a relevant description.
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,33 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Who's Talking About Arch?</h2>
<br /><br />
Lots of people.
<ul>
<li><a href="http://www.openaddict.com/page.php?28">Open Addict</a></li>
<li><a href="http://cutecomputer.wordpress.com/2006/11/12/review-arch-linux-072/">Myself and my Computer</a></li>
<li><a href="http://www.linuxtechdaily.com/2006/11/review-arch64-archlinux-for-64bit-processors/">Linux Tech Daily</a></li>
<li><a href="http://www.osnews.com/story.php?news_id=15075">OSNews</a></li>
<li><a href="http://www.linux-magazine.com/issue/64/Arch_Linux_Review.pdf">Linux Magazine (pdf)</a></li>
<li><a href="http://michael-and-mary.net/intro/?q=node/260">Michael &amp; Mary</a></li>
<li><a href="http://osnews.com/story.php?news_id=10142">OSNews</a></li>
<li><a href="http://osnews.com/story.php?news_id=10047">OSNews</a></li>
<li><a href="http://os.newsforge.com/os/05/02/14/1722211.shtml?tid=2">NewsForge</a></li>
<li><a href="http://www.linuxtimes.net/modules.php?name=News&file=article&sid=774">LinuxTimes</a></li>
<li><a href="http://osnews.com/story.php?news_id=9540">OSNews</a></li>
<li><a href="http://discuss.extremetech.com/n/mb/display.asp?webtag=extremetech&msg=53648.1">Robert Burns</a></li>
<li><a href="http://www.linuxlookup.com/modules.php?op=modload&name=Reviews&file=index&req=showcontent&id=58">LinuxLookup</a></li>
<li><a href="http://www.osnews.com/story.php?news_id=5971">OSNews</a></li>
<li><a href="http://www.osnews.com/story.php?news_id=4827">OSNews</a></li>
<li><a href="http://lwn.net/Articles/40952/">LWN</a></li>
<li><a href="http://www.distrowatch.com/dwres.php?resource=interview-arch">DistroWatch</a></li>
<li><a href="http://home.nyc.rr.com/computertaijutsu/arch.html">Scott Robbins</a></li>
</ul>
<br />
If you have some press you would like linked, please open a <a href="http://bugs.archlinux.org/">Bug Ticket</a> with the category "web site", and a relevant description.
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Arch Related Projects</h2>
<br /><br />
<p>There are a few Arch-based projects or communities that have sprung up
over the years. Here's a list of the ones we know about.</p>
<table cellspacing="20">
<tr>
<td><a href="http://user-contributions.org/home/index.php">user-contributions.org</a></td>
<td>A website belongs to members wanting to give a little something to the free software community</td>
</tr><tr>
<td><a href="http://www.archlinux.org/~simo/archstats/">ArchStats</a></td>
<td>An opt-in system that tracks which packages each user has installed, hardware specs, etc</td>
</tr><tr>
<td><a href="http://archie.dotsrc.org/">Archie Live CD</a></td>
<td>A live CD (and live CD build scripts) based on Arch</td>
</tr>
<tr>
<td><a href="http://www.archlinuxppc.org/">ArchPPC</a></td>
<td>Arch packages optimized for PPC</td>
</tr><tr>
<td><a href="http://user-contributions.org/projects/hwd/hwd.html">Hardware Detection</a></td>
<td>Hardware detection scripts for Arch <span style="font-size:x-small">(deprecated in favor of udev's auto-detection)</span></td>
</tr><tr>
<td><a href="http://arch-egis.berlios.de/">AEGIS</a></td>
<td>Arch Environmental/Geographical Information Systems (AEGIS) Project</td>
</tr>
</table>
<br />
If you have an Arch related project you would like linked, please open a <a href="http://bugs.archlinux.org/">Bug Ticket</a> with the category "web site", and a relevant description.
</div>
<br /><br />
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
<h2 class="title">Developer Login</h2>
{% if form.has_errors %}
<p class="error">Your username and password didn't match. Please try again.</p>
{% endif %}
<br /><br />
<form method="post" action=".">
<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}/{% endif %}" />
<table>
<tr><td><label for="id_username">Username:</label></td><td>{{ form.username }}</td></tr>
<tr><td><label for="id_password">Password:</label></td><td>{{ form.password }}</td></tr>
<tr><td colspan="2" align="right"><input type="submit" value="Login" /></td></tr>
</table>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
You've been logged out.
</div>
{% endblock %}

View File

@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h4>{{ message }}</h4>
</div>
{% endblock %}

View File

@ -0,0 +1,25 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
<h2 class="title">Add ToDo List</h2>
<form method="post" action=".">
<table>
<tr>
<td>Name:</td>
<td><input type="text" name="name" size="30" value="" /></td>
</tr><tr>
<td style="vertical-align:top">Description:</td>
<td><textarea name="description" cols="60" rows="4"></textarea></td>
</tr><tr>
<td style="vertical-align:top">List of Package Names:<br /><span style="font-size:x-small">(one per line)</span></td>
<td><textarea name="packages" cols="60" rows="20"></textarea></td>
</tr><tr>
<td colspan="2" style="text-align:right">
<input type="submit" value=" Create List " />
</td>
</tr>
</table>
</form>
</div>
{% endblock %}

View File

@ -0,0 +1,30 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
{% if perms.todolists.add_todolist %}
<div style="float:right">
<a href="/todo/add/">Add Todo List</a>
</div>
{% endif %}
<h2 class="title">Package ToDo lists</h2>
<table class="results" width="100%">
<tr>
<th>Name</th>
<th>Creation Date</th>
<th>Creator</th>
<th>Description</th>
<th>Status</th>
</tr>
{% for list in lists %}
<tr>
<td style="white-space:nowrap"><a href="/todo/{{ list.id }}/">{{ list.name }}</a></td>
<td>{{ list.date_added }}</td>
<td>{{ list.creator.get_full_name }}</td>
<td>{{ list.description }}</td>
<td>{% if list.complete %}<span style="color:blue">Complete</span>{% else %}<span style="color:red">Incomplete</span>{% endif %}</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -0,0 +1,31 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
<h3 class="title">ToDo List: {{ list.name }}</h2>
<table class="results" width="100%">
<tr>
<th>ID</th>
<th>Repo</th>
<th>Name</th>
<th>Maintainer</th>
<th>Status</th>
</tr>
{% for pkg in pkgs %}
<tr>
<td><a href="/packages/{{ pkg.pkg.id }}/">{{ pkg.pkg.id }}</a></td>
<td>{{ pkg.pkg.repo.name }}</td>
<td>{{ pkg.pkg.pkgname }}</td>
<td>{{ pkg.pkg.maintainer.get_full_name }}</td>
<td>
{% if pkg.complete %}
<a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"><span style="color:blue">Complete</span></a>
{% else %}
<a href="/todo/flag/{{ list.id }}/{{ pkg.id }}/"><span style="color:red">Incomplete</span></a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

30
templates/wiki/base.html Normal file
View File

@ -0,0 +1,30 @@
<html>
<head>
<style type='text/css'>
body {
background: #333;
color: #ddd;
}
a {
color: #fff;
}
div.body {
padding: 25px;
margin: 15px;
background: #444;
}
div.controls {
padding: 20px;
}
</style>
<title>{% block title %}{% endblock %}</title>
</head>
<body>
{% block content %}
<h1>This is the base template. Extend it with the "extends" template tag.</h1>
{% endblock %}
</body>
</html>

22
templates/wiki/edit.html Normal file
View File

@ -0,0 +1,22 @@
{% extends "base.html" %}
{% block content %}
<div class="greybox">
<div style="float:right;font-size:x-small">
<a href="http://daringfireball.net/projects/markdown/syntax/">Wiki Syntax</a>
</div>
<h2 class="title">Editing: {{ page.title }}</h2>
<form action="." method="post">
<input name="title" value="{{ page.title }}" />
<br /><br />
<textarea name="content" cols="100" rows="32">{{ page.content }}</textarea>
<br /><br />
<input type="submit" value="Save" />
</form>
<!--
<form action="/wiki/delete/" method="post">
<input type="hidden" name="title" value="{{ page.title }}" />
<input type="submit" value="Delete" />
</form>
-->
</div>
{% endblock %}

9
templates/wiki/home.html Normal file
View File

@ -0,0 +1,9 @@
{% extends "base.html" %}
{% block content %}
<div class="box">
<h2 class="title">Wiki Index</h2>
{% for page in pages %}
<h3><a href='{{ page.title }}/'>{{ page.title }}</a></h3>
{% endfor %}
</div>
{% endblock %}

17
templates/wiki/page.html Normal file
View File

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% load wikitags %}
{% block content %}
<div class="box">
<h1 class="wiki">{{ page.title }}</h1>
<div class="wikibody">
{{ page.content|wikify }}
</div>
<div class="wikifoot_r">
<a href='{{ page.editurl }}'>Edit this page</a> | <a href='/wiki/'>Wiki Index</a>
</div>
<div class="wikifoot_l">
Last Author: {{ page.last_author.username }}
</div>
</div>
{% endblock %}

0
todolists/__init__.py Normal file
View File

Some files were not shown because too many files have changed in this diff Show More