All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Russian fields on Mineral model (name_ru, description_ru, history_ru, etc.) - scrape_minerals_ru management command fetches from Russian Wikipedia via langlinks - EN/RU toggle in header, saved to localStorage - Speaker button next to mineral name uses Web Speech API - Section headers and labels translated - Russian Wikipedia link in footer when in RU mode Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
from django.contrib import admin
|
|
|
|
from .models import Mineral
|
|
|
|
|
|
@admin.register(Mineral)
|
|
class MineralAdmin(admin.ModelAdmin):
|
|
list_display = ('name', 'name_ru', 'formula', 'day_of_year', 'color_hex', 'category')
|
|
list_filter = ('category', 'crystal_system')
|
|
search_fields = ('name', 'name_ru', 'formula')
|
|
list_editable = ('day_of_year', 'color_hex')
|
|
fieldsets = (
|
|
(None, {
|
|
'fields': ('name', 'formula', 'day_of_year'),
|
|
}),
|
|
('Appearance', {
|
|
'fields': ('color_hex', 'color_description', 'image_urls'),
|
|
}),
|
|
('Properties', {
|
|
'fields': ('category', 'crystal_system', 'mohs_hardness',
|
|
'luster', 'streak', 'specific_gravity'),
|
|
}),
|
|
('Text', {
|
|
'fields': ('description', 'history'),
|
|
}),
|
|
('Russian', {
|
|
'fields': ('name_ru', 'color_description_ru',
|
|
'description_ru', 'history_ru', 'wikipedia_url_ru'),
|
|
}),
|
|
('Links', {
|
|
'fields': ('wikipedia_url',),
|
|
}),
|
|
)
|