Django

Code

Changeset 7979

Show
Ignore:
Timestamp:
07/19/08 08:30:47 (4 months ago)
Author:
jbronn
Message:

gis: Merged revisions 7921,7926-7928,7938-7941,7945-7947,7949-7950,7952,7955-7956,7961,7964-7968,7970-7978 via svnmerge from trunk.

This includes the newforms-admin branch, and thus is backwards-incompatible. The geographic admin is _not_ in this changeset, and is forthcoming.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis

    • Property svnmerge-integrated changed from /django/trunk:1-7917 to /django/trunk:1-7978
  • django/branches/gis/AUTHORS

    r7918 r7979  
    7575    Paul Bissex <http://e-scribe.com/> 
    7676    Simon Blanchard 
     77    David Blewett <david@dawninglight.net> 
    7778    Matt Boersma <ogghead@gmail.com> 
    7879    boobsd@gmail.com 
     
    173174    Thomas Güttler <hv@tbz-pariv.de> 
    174175    dAniel hAhler 
     176    hambaloney 
    175177    Brian Harring <ferringb@gmail.com> 
    176178    Brant Harris 
     
    195197    james_027@yahoo.com 
    196198    jcrasta@gmail.com 
     199    jdetaeye 
    197200    Zak Johnson <zakj@nox.cx> 
    198201    Nis Jørgensen <nis@superlativ.dk> 
     
    242245    limodou 
    243246    Philip Lindborg <philip.lindborg@gmail.com> 
     247    Simon Litchfield <simon@quo.com.au> 
    244248    Daniel Lindsley <polarcowz@gmail.com> 
    245249    Trey Long <trey@ktrl.com> 
     
    247251    Matt McClanahan <http://mmcc.cx/> 
    248252    Martin Maney <http://www.chipy.org/Martin_Maney> 
     253    Petr Marhoun <petr.marhoun@gmail.com> 
    249254    masonsimon+django@gmail.com 
    250255    Manuzhai 
     
    259264    Jason McBrayer <http://www.carcosa.net/jason/> 
    260265    mccutchen@gmail.com 
     266    Christian Metts 
    261267    michael.mcewan@gmail.com 
    262268    michal@plovarna.cz 
     
    271277    mrmachine <real.human@mrmachine.net> 
    272278    Robin Munn <http://www.geekforgod.com/> 
     279    msundstr 
    273280    Robert Myers <myer0052@gmail.com> 
    274281    Nebojša Dorđević 
     
    291298    pgross@thoughtworks.com 
    292299    phaedo <http://phaedo.cx/> 
     300    Julien Phalip <http://www.julienphalip.com> 
    293301    phil@produxion.net 
    294302    phil.h.smith@gmail.com 
     
    299307    Daniel Poelzleithner <http://poelzi.org/> 
    300308    polpak@yahoo.com 
     309    Matthias Pronk <django@masida.nl> 
    301310    Jyrki Pulliainen <jyrki.pulliainen@gmail.com> 
    302311    Johann Queuniet <johann.queuniet@adh.naellia.eu> 
     
    315324    Henrique Romano <onaiort@gmail.com> 
    316325    Armin Ronacher 
     326    Daniel Roseman <http://roseman.org.uk/>     
    317327    Brian Rosner <brosner@gmail.com> 
    318328    Oliver Rutherfurd <http://rutherfurd.net/> 
  • django/branches/gis/django/conf/project_template/urls.py

    r4265 r7979  
    11from django.conf.urls.defaults import * 
     2 
     3# Uncomment this for admin: 
     4#from django.contrib import admin 
    25 
    36urlpatterns = patterns('', 
     
    58    # (r'^{{ project_name }}/', include('{{ project_name }}.foo.urls')), 
    69 
     10    # Uncomment this for admin docs: 
     11    #(r'^admin/doc/', include('django.contrib.admindocs.urls')), 
     12 
    713    # Uncomment this for admin: 
    8 #     (r'^admin/', include('django.contrib.admin.urls')), 
     14    #('^admin/(.*)', admin.site.root), 
    915) 
  • django/branches/gis/django/contrib/admin/filterspecs.py

    r6672 r7979  
    1616class FilterSpec(object): 
    1717    filter_specs = [] 
    18     def __init__(self, f, request, params, model): 
     18    def __init__(self, f, request, params, model, model_admin): 
    1919        self.field = f 
    2020        self.params = params 
     
    2424    register = classmethod(register) 
    2525 
    26     def create(cls, f, request, params, model): 
     26    def create(cls, f, request, params, model, model_admin): 
    2727        for test, factory in cls.filter_specs: 
    2828            if test(f): 
    29                 return factory(f, request, params, model
     29                return factory(f, request, params, model, model_admin
    3030    create = classmethod(create) 
    3131 
     
    5353 
    5454class RelatedFilterSpec(FilterSpec): 
    55     def __init__(self, f, request, params, model): 
    56         super(RelatedFilterSpec, self).__init__(f, request, params, model
     55    def __init__(self, f, request, params, model, model_admin): 
     56        super(RelatedFilterSpec, self).__init__(f, request, params, model, model_admin
    5757        if isinstance(f, models.ManyToManyField): 
    5858            self.lookup_title = f.rel.to._meta.verbose_name 
     
    8282 
    8383class ChoicesFilterSpec(FilterSpec): 
    84     def __init__(self, f, request, params, model): 
    85         super(ChoicesFilterSpec, self).__init__(f, request, params, model
     84    def __init__(self, f, request, params, model, model_admin): 
     85        super(ChoicesFilterSpec, self).__init__(f, request, params, model, model_admin
    8686        self.lookup_kwarg = '%s__exact' % f.name 
    8787        self.lookup_val = request.GET.get(self.lookup_kwarg, None) 
     
    9999 
    100100class DateFieldFilterSpec(FilterSpec): 
    101     def __init__(self, f, request, params, model): 
    102         super(DateFieldFilterSpec, self).__init__(f, request, params, model
     101    def __init__(self, f, request, params, model, model_admin): 
     102        super(DateFieldFilterSpec, self).__init__(f, request, params, model, model_admin
    103103 
    104104        self.field_generic = '%s__' % self.field.name 
     
    134134 
    135135class BooleanFieldFilterSpec(FilterSpec): 
    136     def __init__(self, f, request, params, model): 
    137         super(BooleanFieldFilterSpec, self).__init__(f, request, params, model
     136    def __init__(self, f, request, params, model, model_admin): 
     137        super(BooleanFieldFilterSpec, self).__init__(f, request, params, model, model_admin
    138138        self.lookup_kwarg = '%s__exact' % f.name 
    139139        self.lookup_kwarg2 = '%s__isnull' % f.name 
     
    160160# more appropriate, and the AllValuesFilterSpec won't get used for it. 
    161161class AllValuesFilterSpec(FilterSpec): 
    162     def __init__(self, f, request, params, model): 
    163         super(AllValuesFilterSpec, self).__init__(f, request, params, model
     162    def __init__(self, f, request, params, model, model_admin): 
     163        super(AllValuesFilterSpec, self).__init__(f, request, params, model, model_admin
    164164        self.lookup_val = request.GET.get(f.name, None) 
    165         self.lookup_choices = model._meta.admin.manager.distinct().order_by(f.name).values(f.name) 
     165        self.lookup_choices = model_admin.queryset(request).distinct().order_by(f.name).values(f.name) 
    166166 
    167167    def title(self): 
  • django/branches/gis/django/contrib/admin/__init__.py

    r4265 r7979  
     1from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL 
     2from django.contrib.admin.options import StackedInline, TabularInline 
     3from django.contrib.admin.sites import AdminSite, site 
     4 
     5def autodiscover(): 
     6    """ 
     7    Auto-discover INSTALLED_APPS admin.py modules and fail silently when  
     8    not present. This forces an import on them to register any admin bits they 
     9    may want. 
     10    """ 
     11    from django.conf import settings 
     12    for app in settings.INSTALLED_APPS: 
     13        try: 
     14            __import__("%s.admin" % app) 
     15        except ImportError: 
     16            pass 
  • django/branches/gis/django/contrib/admin/media/css/forms.css

    r5492 r7979  
    5959.flatpages-flatpage #id_content { height:40.2em; } 
    6060.module table .vPositiveSmallIntegerField { width:2.2em; } 
     61 
     62/* x unsorted */ 
     63.inline-group {padding:10px; padding-bottom:5px; background:#eee; margin:10px 0;} 
     64.inline-group h3.header {margin:-5px -10px 5px -10px; background:#bbb; color:#fff; padding:2px 5px 3px 5px; font-size:11px} 
     65.inline-related {margin-bottom:15px; position:relative;} 
     66.last-related {margin-bottom:0px;} 
     67.inline-related h2 { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold;  color:#888; } 
     68.inline-related h2 b {font-weight:normal; color:#aaa;} 
     69.inline-related h2 span.delete {padding-left:20px; position:absolute; top:0px; right:5px;} 
     70.inline-related h2 span.delete label {margin-left:2px; padding-top:1px;} 
     71.inline-related fieldset {background:#fbfbfb;} 
     72.inline-related fieldset.module h2 { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; background:#bcd; color:#fff; } 
     73.inline-related.tabular fieldset.module table {width:100%;} 
     74 
     75.inline-group .tabular tr.has_original td {padding-top:2em;} 
     76.inline-group .tabular tr td.original { padding:2px 0 0 0; width:0; _position:relative; } 
     77.inline-group .tabular th.original {width:0px; padding:0;} 
     78.inline-group .tabular td.original p {position:absolute; left:0; height:1.1em; padding:2px 7px; overflow:hidden; font-size:9px; font-weight:bold; color:#666; _width:700px;     } 
     79.inline-group ul.tools {padding:0; margin: 0; list-style:none;} 
     80.inline-group ul.tools li {display:inline; padding:0 5px;} 
     81.inline-group ul.tools a.add {background:url(../img/admin/icon_addlink.gif) 0 50% no-repeat; padding-left:14px;} 
  • django/branches/gis/django/contrib/admin/media/js/admin/CollapsedFieldsets.js

    r3415 r7979  
    4848        var divs = fs.getElementsByTagName('div'); 
    4949        for (var i=0; i<divs.length; i++) { 
    50             if (divs[i].className.match(/\berror\b/)) { 
     50            if (divs[i].className.match(/\berrors\b/)) { 
    5151                return true; 
    5252            } 
  • django/branches/gis/django/contrib/admin/media/js/admin/RelatedObjectLookups.js

    r681