Changeset 44cc478


Ignore:
Timestamp:
09/12/2011 17:40:58 (3 years ago)
Author:
yomguy <yomguy@…>
Branches:
master, crem, crem2, dev, dev2, diadems, feature/breadcrumbs, feature/ts-0.5, feature/ts-0.5.4, feature/writecache, forma, generic, instru_search, lam, lam2, mapsv3, merge, nlivemulti, production, release/1.4.4, sabiod, security, server, social, storage, telecaster, test, video
Children:
97e4abc
Parents:
06ce8dd
git-author:
yomguy <yomguy@…> (09/12/2011 17:40:58)
git-committer:
yomguy <yomguy@…> (09/12/2011 17:40:58)
Message:

add languages table to receive ISO 639-3 data

Location:
telemeta
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • telemeta/admin.py

    r482c7bd r44cc478  
    22from telemeta.models.instrument import * 
    33from telemeta.models.location import * 
     4from telemeta.models.language import * 
    45from django.contrib import admin 
    56 
     
    1617class MediaItemRelatedAdmin(admin.ModelAdmin): 
    1718    search_fields = ['title', 'description'] 
    18      
     19 
    1920class MediaPartAdmin(admin.ModelAdmin): 
    2021    search_fields = ['title', 'item__code'] 
     
    2425    search_fields = ['name'] 
    2526    ordering = ['name'] 
    26      
     27 
    2728class InstrumentAliasAdmin(admin.ModelAdmin): 
    2829    search_fields = ['name'] 
     
    3233    search_fields = ['instrument__name', 'parent_instrument__name'] 
    3334    ordering = ['parent_instrument__name'] 
    34       
     35 
    3536class InstrumentAliasRelationAdmin(admin.ModelAdmin): 
    3637    search_fields = ['alias__name', 'instrument__name'] 
     
    4041    search_fields = ['name'] 
    4142    ordering = ['name'] 
    42       
     43 
    4344class LocationAliasAdmin(admin.ModelAdmin): 
    4445    search_fields = ['location__name', 'alias'] 
    4546    ordering = ['alias'] 
    46       
     47 
    4748class LocationRelationAdmin(admin.ModelAdmin): 
    4849    search_fields = ['location__name', 'ancestor_location__name'] 
    4950    ordering = ['ancestor_location__name'] 
     51 
     52class LanguageAdmin(admin.ModelAdmin): 
     53    search_fields = ['name', 'identifier'] 
     54    ordering = ['name'] 
     55 
    5056 
    5157admin.site.register(MediaCollection, MediaCollectionAdmin) 
     
    6470admin.site.register(LocationRelation, LocationRelationAdmin) 
    6571 
     72admin.site.register(Language, LanguageAdmin) 
  • telemeta/forms/__init__.py

    r71de57c r44cc478  
    11 
    22from media import * 
     3from language import * 
  • telemeta/models/__init__.py

    r71de57c r44cc478  
    4242from query import * 
    4343from dublincore import * 
     44from language import * 
    4445 
    45  
  • telemeta/models/media.py

    rd511f9f r44cc478  
    4949from telemeta.models.instrument import * 
    5050from telemeta.models.enum import * 
    51 from django.db.models.fields import URLField 
    52  
     51from telemeta.models.language import * 
     52from django.db import models 
    5353 
    5454collection_published_code_regex   = '[A-Za-z0-9._-]*' 
     
    336336                                           verbose_name=_('population / social group')) 
    337337    language              = CharField(_('language')) 
     338    language_iso          = ForeignKey('Language', related_name="items", 
     339                                       verbose_name=_('ISO language'), blank=True, 
     340                                        null=True, on_delete=models.SET_NULL) 
    338341    context_comment       = TextField(_('comments / ethnographic context')) 
    339342    moda_execut           = CharField(_('moda_execut')) 
Note: See TracChangeset for help on using the changeset viewer.