From ab8055b5cab2523d925f59c65bc38df103a26991 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 2 Dec 2020 15:02:12 -0500 Subject: deleted old apps and media --- app/media/models.py | 3 +- app/photos/__init__.py | 0 app/photos/admin.py | 184 ------- app/photos/build.py | 48 -- app/photos/detail_urls.py | 10 - app/photos/flickrauth | 2 - app/photos/forms.py | 179 ------- app/photos/migrations/0001_initial.py | 137 ----- app/photos/migrations/0002_auto_20151216_1958.py | 26 - .../migrations/0003_luxgallery_caption_style.py | 20 - app/photos/migrations/0004_luximage_alt.py | 20 - app/photos/migrations/0005_auto_20160318_1244.py | 25 - app/photos/migrations/0006_auto_20160318_2047.py | 30 -- app/photos/migrations/0007_auto_20160320_0802.py | 20 - app/photos/migrations/0008_luximagesize_quality.py | 21 - app/photos/migrations/0009_auto_20160320_0907.py | 20 - app/photos/migrations/0010_auto_20160517_0906.py | 30 -- app/photos/migrations/0011_luximagesize_name.py | 20 - .../migrations/0012_luximagesize_is_portrait.py | 20 - app/photos/migrations/0013_auto_20161022_1348.py | 20 - .../0014_remove_luximagesize_is_portrait.py | 19 - app/photos/migrations/0015_auto_20161022_1411.py | 20 - app/photos/migrations/0016_auto_20161022_1411.py | 25 - app/photos/migrations/0017_auto_20161130_1218.py | 38 -- app/photos/migrations/0018_auto_20161130_1218.py | 29 -- app/photos/migrations/0019_auto_20190704_0903.py | 17 - app/photos/migrations/0020_auto_20201201_2116.py | 20 - app/photos/migrations/0021_auto_20201201_2118.py | 18 - app/photos/migrations/__init__.py | 0 app/photos/models.py | 555 -------------------- app/photos/photos.js | 71 --- app/photos/readexif.py | 78 --- app/photos/resize.py | 53 -- app/photos/retriever.py | 323 ------------ app/photos/retriever.py.bak | 314 ------------ app/photos/static/image-preview.js | 42 -- app/photos/static/my_styles.css | 40 -- app/photos/sync_photo_sets.py | 14 - app/photos/sync_photos.py | 13 - app/photos/templatetags/__init__.py | 0 app/photos/templatetags/get_image_by_size.py | 8 - app/photos/templatetags/get_image_width.py | 9 - app/photos/templatetags/get_size_by_name.py | 8 - app/photos/urls.py | 74 --- app/photos/utils.py | 28 - app/photos/views.py | 137 ----- app/unused_apps/bird.html | 47 -- app/unused_apps/birds/__init__.py | 0 app/unused_apps/birds/aba_importer.py | 16 - app/unused_apps/birds/admin.py | 101 ---- .../birds/autocomplete_light_registry.py | 24 - app/unused_apps/birds/birds.json | 1 - app/unused_apps/birds/build.py | 21 - app/unused_apps/birds/migrations/0001_initial.py | 86 ---- .../birds/migrations/0002_auto_20160313_0953.py | 26 - .../birds/migrations/0003_birdsighting_images.py | 21 - .../birds/migrations/0004_auto_20160321_1123.py | 24 - .../birds/migrations/0005_auto_20170714_2222.py | 25 - .../birds/migrations/0006_auto_20170714_2224.py | 25 - .../birds/migrations/0007_auto_20170821_1415.py | 36 -- .../birds/migrations/0008_auto_20170821_1418.py | 20 - .../birds/migrations/0009_auto_20170821_1429.py | 20 - .../birds/migrations/0010_auto_20170906_2100.py | 25 - .../birds/migrations/0011_auto_20180126_1456.py | 48 -- .../birds/migrations/0012_auto_20180126_1739.py | 44 -- .../birds/migrations/0013_auto_20180126_2010.py | 28 - .../birds/migrations/0014_auto_20180128_0902.py | 21 - app/unused_apps/birds/migrations/__init__.py | 0 app/unused_apps/birds/models.py | 295 ----------- app/unused_apps/birds/urls.py | 34 -- app/unused_apps/birds/views.py | 49 -- app/unused_apps/ccg_notes/__init__.py | 0 app/unused_apps/ccg_notes/admin.py | 32 -- .../ccg_notes/autocomplete_light_registry.py | 24 - app/unused_apps/ccg_notes/build.py | 36 -- app/unused_apps/ccg_notes/forms.py | 17 - app/unused_apps/ccg_notes/mdx_urlize.py | 81 --- .../ccg_notes/migrations/0001_initial.py | 33 -- app/unused_apps/ccg_notes/migrations/__init__.py | 0 app/unused_apps/ccg_notes/models.py | 36 -- app/unused_apps/ccg_notes/urls.py | 62 --- app/unused_apps/ccg_notes/views.py | 85 ---- app/unused_apps/daily/admin.py | 55 -- app/unused_apps/daily/create_daily.py | 14 - app/unused_apps/daily/get_weather.py | 14 - app/unused_apps/daily/migrations/0001_initial.py | 71 --- .../daily/migrations/0002_auto_20160118_2144.py | 21 - .../daily/migrations/0003_auto_20160119_1206.py | 49 -- .../daily/migrations/0004_auto_20160119_1223.py | 30 -- .../daily/migrations/0005_remove_daily_slug.py | 19 - .../daily/migrations/0006_daily_weather_human.py | 20 - .../daily/migrations/0007_auto_20160119_1604.py | 21 - .../daily/migrations/0008_auto_20160124_0914.py | 30 -- .../daily/migrations/0009_remove_daily_title.py | 19 - .../daily/migrations/0010_auto_20161023_2014.py | 19 - .../daily/migrations/0011_auto_20171214_2239.py | 21 - app/unused_apps/daily/migrations/__init__.py | 0 app/unused_apps/daily/models.py | 105 ---- app/unused_apps/daily/retriever.py | 53 -- app/unused_apps/ebay/__init__.py | 0 app/unused_apps/ebay/admin.py | 15 - app/unused_apps/ebay/migrations/0001_initial.py | 50 -- .../ebay/migrations/0002_auto_20161231_1401.py | 25 - .../ebay/migrations/0003_auto_20161231_1419.py | 24 - .../migrations/0004_trackeditem_date_ending.py | 21 - .../ebay/migrations/0005_auto_20161231_1444.py | 24 - app/unused_apps/ebay/migrations/__init__.py | 0 app/unused_apps/ebay/models.py | 84 --- app/unused_apps/ebay/update_price.py | 17 - app/unused_apps/essays/__init__.py | 0 app/unused_apps/essays/admin.py | 47 -- app/unused_apps/essays/build.py | 22 - app/unused_apps/essays/migrations/0001_initial.py | 49 -- .../essays/migrations/0002_auto_20190204_1541.py | 23 - .../essays/migrations/0003_essay_afterword_html.py | 18 - .../essays/migrations/0004_auto_20190205_0830.py | 27 - .../essays/migrations/0005_auto_20190208_0946.py | 25 - .../essays/migrations/0006_auto_20190303_1625.py | 18 - .../migrations/0006_remove_essay_has_video.py | 17 - .../essays/migrations/0007_auto_20190414_1455.py | 18 - .../essays/migrations/0007_essay_has_video.py | 18 - .../essays/migrations/0008_merge_20190303_1638.py | 14 - .../essays/migrations/0009_merge_20190414_1500.py | 14 - .../essays/migrations/0010_essay_field_notes.py | 19 - app/unused_apps/essays/migrations/__init__.py | 0 app/unused_apps/essays/models.py | 91 ---- app/unused_apps/essays/urls.py | 28 - app/unused_apps/essays/views.py | 47 -- app/unused_apps/expenses/__init__.py | 0 app/unused_apps/expenses/admin.py | 25 - app/unused_apps/expenses/build.py | 34 -- .../expenses/migrations/0001_initial.py | 48 -- .../expenses/migrations/0002_luxexpense.py | 26 - .../expenses/migrations/0003_auto_20170429_0748.py | 40 -- app/unused_apps/expenses/migrations/__init__.py | 0 app/unused_apps/expenses/models.py | 62 --- app/unused_apps/expenses/urls.py | 22 - app/unused_apps/expenses/views.py | 38 -- app/unused_apps/fieldnotes/__init__.py | 0 app/unused_apps/fieldnotes/admin.py | 38 -- app/unused_apps/fieldnotes/build.py | 36 -- .../fieldnotes/migrations/0001_initial.py | 37 -- .../migrations/0002_auto_20190303_1222.py | 25 - app/unused_apps/fieldnotes/migrations/__init__.py | 0 app/unused_apps/fieldnotes/models.py | 113 ---- .../fieldnotes/fieldnote_archive_list_date.html | 43 -- .../templates/fieldnotes/fieldnote_detail.html | 95 ---- .../templates/fieldnotes/fieldnote_list.html | 49 -- app/unused_apps/fieldnotes/urls.py | 39 -- app/unused_apps/fieldnotes/views.py | 37 -- app/unused_apps/fieldnotes_/__init__.py | 0 app/unused_apps/fieldnotes_/admin.py | 38 -- app/unused_apps/fieldnotes_/build.py | 36 -- .../fieldnotes_/migrations/0001_initial.py | 37 -- .../migrations/0002_auto_20190303_1222.py | 25 - app/unused_apps/fieldnotes_/migrations/__init__.py | 0 app/unused_apps/fieldnotes_/models.py | 113 ---- .../fieldnotes/fieldnote_archive_list_date.html | 43 -- .../templates/fieldnotes/fieldnote_detail.html | 95 ---- .../templates/fieldnotes/fieldnote_list.html | 49 -- app/unused_apps/fieldnotes_/urls.py | 39 -- app/unused_apps/fieldnotes_/views.py | 37 -- app/unused_apps/figments/admin.py | 46 -- app/unused_apps/figments/build.py | 17 - app/unused_apps/figments/ebook.py | 79 --- app/unused_apps/figments/models.py | 97 ---- app/unused_apps/figments/urls.py | 38 -- app/unused_apps/figments/views.py | 42 -- app/unused_apps/garden/admin.py | 38 -- app/unused_apps/garden/migrations/0001_initial.py | 91 ---- .../garden/migrations/0002_plant_family.py | 18 - .../garden/migrations/0003_auto_20200705_1629.py | 18 - .../garden/migrations/0004_auto_20200705_1650.py | 59 --- .../garden/migrations/0005_auto_20200705_1652.py | 24 - .../garden/migrations/0006_auto_20200706_0854.py | 23 - .../garden/migrations/0007_auto_20200706_0854.py | 18 - app/unused_apps/garden/migrations/__init__.py | 0 app/unused_apps/garden/models.py | 153 ------ app/unused_apps/guide/__init__.py | 0 app/unused_apps/guide/admin.py | 61 --- app/unused_apps/guide/models.py | 129 ----- app/unused_apps/guide/urls.py | 13 - app/unused_apps/guide/views.py | 35 -- app/unused_apps/guides/__init__.py | 0 app/unused_apps/guides/admin.py | 67 --- app/unused_apps/guides/build.py | 22 - app/unused_apps/guides/guide_urls.py | 18 - app/unused_apps/guides/migrations/0001_initial.py | 60 --- .../migrations/0002_remove_guide_category.py | 17 - .../guides/migrations/0003_guide_category.py | 21 - .../guides/migrations/0004_auto_20190914_0646.py | 47 -- .../migrations/0005_remove_guide_category.py | 17 - app/unused_apps/guides/migrations/__init__.py | 0 app/unused_apps/guides/models.py | 136 ----- app/unused_apps/guides/review_urls.py | 18 - .../guides/templates/guides/guide_detail.html | 176 ------- .../guides/templates/guides/guide_detail.txt | 8 - .../guides/templates/guides/guide_list.html | 40 -- app/unused_apps/guides/urls.py | 34 -- app/unused_apps/guides/views.py | 62 --- app/unused_apps/income/__init__.py | 0 app/unused_apps/income/admin.py | 88 ---- app/unused_apps/income/migrations/0001_initial.py | 37 -- .../income/migrations/0002_gig_due_date.py | 21 - .../income/migrations/0003_auto_20161213_1038.py | 25 - .../income/migrations/0004_invoice_invoiceitem.py | 31 -- .../income/migrations/0005_invoice_slug.py | 19 - .../income/migrations/0006_auto_20190131_2351.py | 17 - app/unused_apps/income/migrations/__init__.py | 0 app/unused_apps/income/models.py | 103 ---- app/unused_apps/income/parser.py | 23 - app/unused_apps/income/views.py | 53 -- app/unused_apps/jrnl/__init__.py | 0 app/unused_apps/jrnl/admin.py | 129 ----- app/unused_apps/jrnl/build.py | 100 ---- app/unused_apps/jrnl/export.py | 20 - app/unused_apps/jrnl/fields.py | 7 - app/unused_apps/jrnl/migrations/0001_initial.py | 75 --- .../0001_squashed_0019_remove_entry_thumbnail.py | 81 --- .../jrnl/migrations/0002_entrytitlesong.py | 32 -- .../jrnl/migrations/0003_auto_20160309_1018.py | 31 -- .../jrnl/migrations/0004_auto_20160309_1031.py | 30 -- .../jrnl/migrations/0005_auto_20160514_2151.py | 20 - .../jrnl/migrations/0006_auto_20160715_0703.py | 37 -- .../jrnl/migrations/0007_delete_postimage.py | 18 - .../jrnl/migrations/0008_auto_20160906_0845.py | 33 -- .../0009_homepagecurrator_image_offset_vertical.py | 21 - .../jrnl/migrations/0010_auto_20161102_0916.py | 22 - .../jrnl/migrations/0011_auto_20161102_0925.py | 22 - .../jrnl/migrations/0012_auto_20161102_0930.py | 30 -- .../jrnl/migrations/0013_entry_featured_image.py | 22 - .../jrnl/migrations/0014_homepagecurrator.py | 29 -- .../jrnl/migrations/0015_entry_has_video.py | 21 - .../jrnl/migrations/0016_auto_20161219_1058.py | 21 - .../jrnl/migrations/0017_entry_field_notes.py | 13 - .../jrnl/migrations/0018_auto_20180303_1037.py | 24 - .../jrnl/migrations/0019_remove_entry_thumbnail.py | 13 - .../jrnl/migrations/0020_auto_20180606_1058.py | 19 - .../jrnl/migrations/0021_auto_20180606_1058.py | 19 - .../jrnl/migrations/0022_auto_20180707_0958.py | 19 - .../jrnl/migrations/0023_auto_20180902_1210.py | 18 - .../jrnl/migrations/0024_auto_20180902_1217.py | 32 -- .../jrnl/migrations/0025_auto_20190131_2335.py | 28 - .../jrnl/migrations/0026_entry_country_name.py | 18 - .../jrnl/migrations/0027_entry_country_slug.py | 18 - .../jrnl/migrations/0028_auto_20190218_1614.py | 33 -- .../jrnl/migrations/0029_home_more_popular.py | 18 - .../jrnl/migrations/0030_remove_home_popular.py | 17 - .../jrnl/migrations/0031_auto_20190220_1136.py | 22 - .../jrnl/migrations/0032_entry_subtitle.py | 18 - .../jrnl/migrations/0033_entry_field_notes_two.py | 19 - .../migrations/0034_remove_entry_field_notes.py | 17 - .../jrnl/migrations/0035_auto_20190303_1610.py | 18 - app/unused_apps/jrnl/migrations/0036_enjoyitem.py | 23 - .../jrnl/migrations/0037_enjoyitem_entry.py | 20 - .../jrnl/migrations/0038_remove_enjoyitem_entry.py | 17 - .../jrnl/migrations/0039_enjoyitem_order.py | 18 - .../jrnl/migrations/0040_auto_20190315_1906.py | 20 - .../jrnl/migrations/0041_auto_20190315_2240.py | 28 - .../jrnl/migrations/0042_auto_20190412_1805.py | 24 - .../jrnl/migrations/0043_auto_20190704_0903.py | 21 - .../jrnl/migrations/0044_auto_20190917_1703.py | 18 - .../jrnl/migrations/0045_entry_books_new.py | 19 - .../jrnl/migrations/0046_remove_entry_books.py | 17 - .../jrnl/migrations/0047_auto_20191110_0859.py | 18 - .../jrnl/migrations/0048_auto_20191205_1720.py | 18 - .../jrnl/migrations/0049_entry_newrelated.py | 19 - .../jrnl/migrations/0050_auto_20191206_0741.py | 18 - .../jrnl/migrations/0051_auto_20201027_2102.py | 18 - .../jrnl/migrations/0052_entry_new_field_notes.py | 19 - .../jrnl/migrations/0053_auto_20201027_2105.py | 18 - .../jrnl/migrations/0054_auto_20201111_2148.py | 23 - app/unused_apps/jrnl/migrations/__init__.py | 0 app/unused_apps/jrnl/models.py | 309 ----------- .../jrnl/templates/horizontal_select.html | 17 - .../jrnl/templates/jrnl/entry_detail.html | 240 --------- .../jrnl/templates/jrnl/entry_detail.txt | 8 - .../jrnl/templates/jrnl/entry_list.html | 33 -- app/unused_apps/jrnl/urls.py | 61 --- app/unused_apps/jrnl/views.py | 165 ------ app/unused_apps/notes/__init__.py | 0 app/unused_apps/notes/admin.py | 28 - app/unused_apps/notes/build.py | 36 -- app/unused_apps/notes/migrations/0001_initial.py | 26 - app/unused_apps/notes/migrations/__init__.py | 0 app/unused_apps/notes/models.py | 50 -- app/unused_apps/notes/urls.py | 55 -- app/unused_apps/notes/views.py | 39 -- app/unused_apps/people/__init__.py | 0 app/unused_apps/people/admin.py | 8 - app/unused_apps/people/build.py | 35 -- app/unused_apps/people/migrations/0001_initial.py | 42 -- app/unused_apps/people/migrations/__init__.py | 0 app/unused_apps/people/models.py | 54 -- app/unused_apps/people/urls.py | 36 -- app/unused_apps/people/views.py | 38 -- app/unused_apps/projects/__init__.py | 0 app/unused_apps/projects/admin.py | 135 ----- app/unused_apps/projects/models/__init__.py | 5 - app/unused_apps/projects/models/base.py | 67 --- app/unused_apps/projects/models/fiveby.py | 53 -- app/unused_apps/projects/models/gifs.py | 26 - app/unused_apps/projects/models/natparks.py | 55 -- .../projects/models/self_experiments.py | 56 -- app/unused_apps/projects/natparks.js | 94 ---- app/unused_apps/projects/shortcuts.py | 235 --------- app/unused_apps/projects/urls.py | 29 -- app/unused_apps/projects/views.py | 45 -- app/unused_apps/prompts/__init__.py | 0 app/unused_apps/prompts/admin.py | 30 -- app/unused_apps/prompts/migrations/0001_initial.py | 32 -- .../prompts/migrations/0002_auto_20190228_0941.py | 34 -- .../prompts/migrations/0003_prompt_prompt_type.py | 18 - app/unused_apps/prompts/migrations/__init__.py | 0 app/unused_apps/prompts/models.py | 94 ---- app/unused_apps/prompts/urls.py | 13 - app/unused_apps/prompts/views.py | 11 - app/unused_apps/publications/__init__.py | 0 app/unused_apps/publications/admin.py | 85 ---- .../publications/migrations/0001_initial.py | 73 --- .../publications/migrations/0002_editor_section.py | 18 - .../migrations/0003_auto_20190131_0923.py | 37 -- .../publications/migrations/0004_pitchidea.py | 28 - .../migrations/0005_auto_20190131_1100.py | 23 - .../migrations/0006_auto_20190222_1819.py | 33 -- .../publications/migrations/__init__.py | 0 app/unused_apps/publications/models.py | 133 ----- app/unused_apps/publications/urls.py | 24 - app/unused_apps/publications/views.py | 20 - app/unused_apps/sketches/__init__.py | 0 app/unused_apps/sketches/admin.py | 42 -- app/unused_apps/sketches/build.py | 36 -- .../sketches/migrations/0001_initial.py | 32 -- .../sketches/migrations/0002_auto_20180208_0743.py | 17 - .../sketches/migrations/0003_auto_20190303_1057.py | 24 - app/unused_apps/sketches/migrations/__init__.py | 0 app/unused_apps/sketches/models.py | 89 ---- app/unused_apps/sketches/urls.py | 39 -- app/unused_apps/sketches/views.py | 40 -- app/unused_apps/src/__init__.py | 0 app/unused_apps/src/admin.py | 62 --- app/unused_apps/src/build.py | 62 --- app/unused_apps/src/migrations/0001_initial.py | 76 --- .../src/migrations/0002_auto_20160329_2107.py | 19 - .../src/migrations/0003_auto_20180707_0958.py | 17 - .../src/migrations/0004_auto_20191007_0905.py | 17 - app/unused_apps/src/migrations/__init__.py | 0 app/unused_apps/src/models.py | 171 ------- .../src/templates/src/srcpost_detail.html | 112 ---- .../src/templates/src/srcpost_list.html | 30 -- app/unused_apps/src/templates/src/topic_list.html | 35 -- app/unused_apps/src/urls.py | 49 -- app/unused_apps/src/views.py | 89 ---- app/unused_apps/stuff/__init__.py | 0 app/unused_apps/stuff/admin.py | 56 -- app/unused_apps/stuff/models.py | 65 --- app/unused_apps/stuff/temp.py | 115 ----- app/unused_apps/syndication/__init__.py | 0 app/unused_apps/syndication/admin.py | 20 - .../syndication/migrations/0001_initial.py | 37 -- .../migrations/0002_auto_20160628_2149.py | 31 -- .../migrations/0003_auto_20161023_2014.py | 19 - app/unused_apps/syndication/migrations/__init__.py | 0 app/unused_apps/syndication/models.py | 86 ---- app/unused_apps/syndication/syndicators.py | 123 ----- .../syndication/templatetags/__init__.py | 0 .../syndication/templatetags/facebook_processor.py | 23 - app/unused_apps/syndication/views.py | 17 - app/unused_apps/trips/__init__.py | 0 app/unused_apps/trips/admin.py | 34 -- app/unused_apps/trips/migrations/0001_initial.py | 31 -- app/unused_apps/trips/migrations/__init__.py | 0 app/unused_apps/trips/models.py | 40 -- app/unused_apps/trips/urls.py | 24 - app/unused_apps/trips/views.py | 101 ---- site/media/img/apple-touch-icon-114x114.png | Bin 16989 -> 0 bytes site/media/img/apple-touch-icon-57x57.png | Bin 5294 -> 0 bytes site/media/img/apple-touch-icon-72x72.png | Bin 7776 -> 0 bytes site/media/img/bio.jpg | Bin 15036 -> 0 bytes site/media/img/chricon.jpg | Bin 1827 -> 0 bytes site/media/img/exifbg.png | Bin 4089 -> 0 bytes site/media/img/favicon.ico | Bin 6518 -> 0 bytes site/media/img/feed-large.png | Bin 795 -> 0 bytes site/media/img/fficon.jpg | Bin 1795 -> 0 bytes site/media/img/mapbg-dark.png | Bin 5303 -> 0 bytes site/media/img/mapbg.png | Bin 5141 -> 0 bytes site/media/img/marker-entry.png | Bin 849 -> 0 bytes site/media/img/parkbg.png | Bin 3835 -> 0 bytes site/media/img/shadow.png | Bin 665 -> 0 bytes site/media/img/stop.gif | Bin 1873 -> 0 bytes site/media/img/text-centered.png | Bin 4850 -> 0 bytes site/media/img/text.png | Bin 4786 -> 0 bytes site/media/img/tree.png | Bin 14298 -> 0 bytes site/media/js/html5css3ie.min.js | 10 - site/media/js/hyphenate.js | 21 - site/media/js/hyphenate.min.js | 1 - site/media/js/jquery.js | 19 - site/media/js/jquery.scrollTo-1.4.2-min.js | 11 - site/media/js/natparks.js | 566 --------------------- site/media/js/photos.js | 543 -------------------- site/media/js/photos.min.js | 19 - 401 files changed, 2 insertions(+), 16439 deletions(-) delete mode 100644 app/photos/__init__.py delete mode 100644 app/photos/admin.py delete mode 100644 app/photos/build.py delete mode 100644 app/photos/detail_urls.py delete mode 100644 app/photos/flickrauth delete mode 100644 app/photos/forms.py delete mode 100644 app/photos/migrations/0001_initial.py delete mode 100644 app/photos/migrations/0002_auto_20151216_1958.py delete mode 100644 app/photos/migrations/0003_luxgallery_caption_style.py delete mode 100644 app/photos/migrations/0004_luximage_alt.py delete mode 100644 app/photos/migrations/0005_auto_20160318_1244.py delete mode 100644 app/photos/migrations/0006_auto_20160318_2047.py delete mode 100644 app/photos/migrations/0007_auto_20160320_0802.py delete mode 100644 app/photos/migrations/0008_luximagesize_quality.py delete mode 100644 app/photos/migrations/0009_auto_20160320_0907.py delete mode 100644 app/photos/migrations/0010_auto_20160517_0906.py delete mode 100644 app/photos/migrations/0011_luximagesize_name.py delete mode 100644 app/photos/migrations/0012_luximagesize_is_portrait.py delete mode 100644 app/photos/migrations/0013_auto_20161022_1348.py delete mode 100644 app/photos/migrations/0014_remove_luximagesize_is_portrait.py delete mode 100644 app/photos/migrations/0015_auto_20161022_1411.py delete mode 100644 app/photos/migrations/0016_auto_20161022_1411.py delete mode 100644 app/photos/migrations/0017_auto_20161130_1218.py delete mode 100644 app/photos/migrations/0018_auto_20161130_1218.py delete mode 100644 app/photos/migrations/0019_auto_20190704_0903.py delete mode 100644 app/photos/migrations/0020_auto_20201201_2116.py delete mode 100644 app/photos/migrations/0021_auto_20201201_2118.py delete mode 100644 app/photos/migrations/__init__.py delete mode 100644 app/photos/models.py delete mode 100644 app/photos/photos.js delete mode 100644 app/photos/readexif.py delete mode 100644 app/photos/resize.py delete mode 100644 app/photos/retriever.py delete mode 100644 app/photos/retriever.py.bak delete mode 100644 app/photos/static/image-preview.js delete mode 100644 app/photos/static/my_styles.css delete mode 100644 app/photos/sync_photo_sets.py delete mode 100644 app/photos/sync_photos.py delete mode 100644 app/photos/templatetags/__init__.py delete mode 100644 app/photos/templatetags/get_image_by_size.py delete mode 100644 app/photos/templatetags/get_image_width.py delete mode 100644 app/photos/templatetags/get_size_by_name.py delete mode 100644 app/photos/urls.py delete mode 100644 app/photos/utils.py delete mode 100644 app/photos/views.py delete mode 100644 app/unused_apps/bird.html delete mode 100644 app/unused_apps/birds/__init__.py delete mode 100644 app/unused_apps/birds/aba_importer.py delete mode 100644 app/unused_apps/birds/admin.py delete mode 100644 app/unused_apps/birds/autocomplete_light_registry.py delete mode 100644 app/unused_apps/birds/birds.json delete mode 100644 app/unused_apps/birds/build.py delete mode 100644 app/unused_apps/birds/migrations/0001_initial.py delete mode 100644 app/unused_apps/birds/migrations/0002_auto_20160313_0953.py delete mode 100644 app/unused_apps/birds/migrations/0003_birdsighting_images.py delete mode 100644 app/unused_apps/birds/migrations/0004_auto_20160321_1123.py delete mode 100644 app/unused_apps/birds/migrations/0005_auto_20170714_2222.py delete mode 100644 app/unused_apps/birds/migrations/0006_auto_20170714_2224.py delete mode 100644 app/unused_apps/birds/migrations/0007_auto_20170821_1415.py delete mode 100644 app/unused_apps/birds/migrations/0008_auto_20170821_1418.py delete mode 100644 app/unused_apps/birds/migrations/0009_auto_20170821_1429.py delete mode 100644 app/unused_apps/birds/migrations/0010_auto_20170906_2100.py delete mode 100644 app/unused_apps/birds/migrations/0011_auto_20180126_1456.py delete mode 100644 app/unused_apps/birds/migrations/0012_auto_20180126_1739.py delete mode 100644 app/unused_apps/birds/migrations/0013_auto_20180126_2010.py delete mode 100644 app/unused_apps/birds/migrations/0014_auto_20180128_0902.py delete mode 100644 app/unused_apps/birds/migrations/__init__.py delete mode 100644 app/unused_apps/birds/models.py delete mode 100644 app/unused_apps/birds/urls.py delete mode 100644 app/unused_apps/birds/views.py delete mode 100644 app/unused_apps/ccg_notes/__init__.py delete mode 100644 app/unused_apps/ccg_notes/admin.py delete mode 100644 app/unused_apps/ccg_notes/autocomplete_light_registry.py delete mode 100644 app/unused_apps/ccg_notes/build.py delete mode 100644 app/unused_apps/ccg_notes/forms.py delete mode 100644 app/unused_apps/ccg_notes/mdx_urlize.py delete mode 100644 app/unused_apps/ccg_notes/migrations/0001_initial.py delete mode 100644 app/unused_apps/ccg_notes/migrations/__init__.py delete mode 100644 app/unused_apps/ccg_notes/models.py delete mode 100644 app/unused_apps/ccg_notes/urls.py delete mode 100644 app/unused_apps/ccg_notes/views.py delete mode 100644 app/unused_apps/daily/admin.py delete mode 100644 app/unused_apps/daily/create_daily.py delete mode 100644 app/unused_apps/daily/get_weather.py delete mode 100644 app/unused_apps/daily/migrations/0001_initial.py delete mode 100644 app/unused_apps/daily/migrations/0002_auto_20160118_2144.py delete mode 100644 app/unused_apps/daily/migrations/0003_auto_20160119_1206.py delete mode 100644 app/unused_apps/daily/migrations/0004_auto_20160119_1223.py delete mode 100644 app/unused_apps/daily/migrations/0005_remove_daily_slug.py delete mode 100644 app/unused_apps/daily/migrations/0006_daily_weather_human.py delete mode 100644 app/unused_apps/daily/migrations/0007_auto_20160119_1604.py delete mode 100644 app/unused_apps/daily/migrations/0008_auto_20160124_0914.py delete mode 100644 app/unused_apps/daily/migrations/0009_remove_daily_title.py delete mode 100644 app/unused_apps/daily/migrations/0010_auto_20161023_2014.py delete mode 100644 app/unused_apps/daily/migrations/0011_auto_20171214_2239.py delete mode 100644 app/unused_apps/daily/migrations/__init__.py delete mode 100644 app/unused_apps/daily/models.py delete mode 100644 app/unused_apps/daily/retriever.py delete mode 100644 app/unused_apps/ebay/__init__.py delete mode 100644 app/unused_apps/ebay/admin.py delete mode 100644 app/unused_apps/ebay/migrations/0001_initial.py delete mode 100644 app/unused_apps/ebay/migrations/0002_auto_20161231_1401.py delete mode 100644 app/unused_apps/ebay/migrations/0003_auto_20161231_1419.py delete mode 100644 app/unused_apps/ebay/migrations/0004_trackeditem_date_ending.py delete mode 100644 app/unused_apps/ebay/migrations/0005_auto_20161231_1444.py delete mode 100644 app/unused_apps/ebay/migrations/__init__.py delete mode 100644 app/unused_apps/ebay/models.py delete mode 100755 app/unused_apps/ebay/update_price.py delete mode 100644 app/unused_apps/essays/__init__.py delete mode 100644 app/unused_apps/essays/admin.py delete mode 100644 app/unused_apps/essays/build.py delete mode 100644 app/unused_apps/essays/migrations/0001_initial.py delete mode 100644 app/unused_apps/essays/migrations/0002_auto_20190204_1541.py delete mode 100644 app/unused_apps/essays/migrations/0003_essay_afterword_html.py delete mode 100644 app/unused_apps/essays/migrations/0004_auto_20190205_0830.py delete mode 100644 app/unused_apps/essays/migrations/0005_auto_20190208_0946.py delete mode 100644 app/unused_apps/essays/migrations/0006_auto_20190303_1625.py delete mode 100644 app/unused_apps/essays/migrations/0006_remove_essay_has_video.py delete mode 100644 app/unused_apps/essays/migrations/0007_auto_20190414_1455.py delete mode 100644 app/unused_apps/essays/migrations/0007_essay_has_video.py delete mode 100644 app/unused_apps/essays/migrations/0008_merge_20190303_1638.py delete mode 100644 app/unused_apps/essays/migrations/0009_merge_20190414_1500.py delete mode 100644 app/unused_apps/essays/migrations/0010_essay_field_notes.py delete mode 100644 app/unused_apps/essays/migrations/__init__.py delete mode 100644 app/unused_apps/essays/models.py delete mode 100644 app/unused_apps/essays/urls.py delete mode 100644 app/unused_apps/essays/views.py delete mode 100644 app/unused_apps/expenses/__init__.py delete mode 100644 app/unused_apps/expenses/admin.py delete mode 100644 app/unused_apps/expenses/build.py delete mode 100644 app/unused_apps/expenses/migrations/0001_initial.py delete mode 100644 app/unused_apps/expenses/migrations/0002_luxexpense.py delete mode 100644 app/unused_apps/expenses/migrations/0003_auto_20170429_0748.py delete mode 100644 app/unused_apps/expenses/migrations/__init__.py delete mode 100644 app/unused_apps/expenses/models.py delete mode 100644 app/unused_apps/expenses/urls.py delete mode 100644 app/unused_apps/expenses/views.py delete mode 100644 app/unused_apps/fieldnotes/__init__.py delete mode 100644 app/unused_apps/fieldnotes/admin.py delete mode 100644 app/unused_apps/fieldnotes/build.py delete mode 100644 app/unused_apps/fieldnotes/migrations/0001_initial.py delete mode 100644 app/unused_apps/fieldnotes/migrations/0002_auto_20190303_1222.py delete mode 100644 app/unused_apps/fieldnotes/migrations/__init__.py delete mode 100644 app/unused_apps/fieldnotes/models.py delete mode 100644 app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_archive_list_date.html delete mode 100644 app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_detail.html delete mode 100644 app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_list.html delete mode 100644 app/unused_apps/fieldnotes/urls.py delete mode 100644 app/unused_apps/fieldnotes/views.py delete mode 100644 app/unused_apps/fieldnotes_/__init__.py delete mode 100644 app/unused_apps/fieldnotes_/admin.py delete mode 100644 app/unused_apps/fieldnotes_/build.py delete mode 100644 app/unused_apps/fieldnotes_/migrations/0001_initial.py delete mode 100644 app/unused_apps/fieldnotes_/migrations/0002_auto_20190303_1222.py delete mode 100644 app/unused_apps/fieldnotes_/migrations/__init__.py delete mode 100644 app/unused_apps/fieldnotes_/models.py delete mode 100644 app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_archive_list_date.html delete mode 100644 app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_detail.html delete mode 100644 app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_list.html delete mode 100644 app/unused_apps/fieldnotes_/urls.py delete mode 100644 app/unused_apps/fieldnotes_/views.py delete mode 100644 app/unused_apps/figments/admin.py delete mode 100644 app/unused_apps/figments/build.py delete mode 100644 app/unused_apps/figments/ebook.py delete mode 100644 app/unused_apps/figments/models.py delete mode 100644 app/unused_apps/figments/urls.py delete mode 100644 app/unused_apps/figments/views.py delete mode 100644 app/unused_apps/garden/admin.py delete mode 100644 app/unused_apps/garden/migrations/0001_initial.py delete mode 100644 app/unused_apps/garden/migrations/0002_plant_family.py delete mode 100644 app/unused_apps/garden/migrations/0003_auto_20200705_1629.py delete mode 100644 app/unused_apps/garden/migrations/0004_auto_20200705_1650.py delete mode 100644 app/unused_apps/garden/migrations/0005_auto_20200705_1652.py delete mode 100644 app/unused_apps/garden/migrations/0006_auto_20200706_0854.py delete mode 100644 app/unused_apps/garden/migrations/0007_auto_20200706_0854.py delete mode 100644 app/unused_apps/garden/migrations/__init__.py delete mode 100644 app/unused_apps/garden/models.py delete mode 100644 app/unused_apps/guide/__init__.py delete mode 100644 app/unused_apps/guide/admin.py delete mode 100644 app/unused_apps/guide/models.py delete mode 100644 app/unused_apps/guide/urls.py delete mode 100644 app/unused_apps/guide/views.py delete mode 100644 app/unused_apps/guides/__init__.py delete mode 100644 app/unused_apps/guides/admin.py delete mode 100644 app/unused_apps/guides/build.py delete mode 100644 app/unused_apps/guides/guide_urls.py delete mode 100644 app/unused_apps/guides/migrations/0001_initial.py delete mode 100644 app/unused_apps/guides/migrations/0002_remove_guide_category.py delete mode 100644 app/unused_apps/guides/migrations/0003_guide_category.py delete mode 100644 app/unused_apps/guides/migrations/0004_auto_20190914_0646.py delete mode 100644 app/unused_apps/guides/migrations/0005_remove_guide_category.py delete mode 100644 app/unused_apps/guides/migrations/__init__.py delete mode 100644 app/unused_apps/guides/models.py delete mode 100644 app/unused_apps/guides/review_urls.py delete mode 100644 app/unused_apps/guides/templates/guides/guide_detail.html delete mode 100644 app/unused_apps/guides/templates/guides/guide_detail.txt delete mode 100644 app/unused_apps/guides/templates/guides/guide_list.html delete mode 100644 app/unused_apps/guides/urls.py delete mode 100644 app/unused_apps/guides/views.py delete mode 100644 app/unused_apps/income/__init__.py delete mode 100644 app/unused_apps/income/admin.py delete mode 100644 app/unused_apps/income/migrations/0001_initial.py delete mode 100644 app/unused_apps/income/migrations/0002_gig_due_date.py delete mode 100644 app/unused_apps/income/migrations/0003_auto_20161213_1038.py delete mode 100644 app/unused_apps/income/migrations/0004_invoice_invoiceitem.py delete mode 100644 app/unused_apps/income/migrations/0005_invoice_slug.py delete mode 100644 app/unused_apps/income/migrations/0006_auto_20190131_2351.py delete mode 100644 app/unused_apps/income/migrations/__init__.py delete mode 100644 app/unused_apps/income/models.py delete mode 100644 app/unused_apps/income/parser.py delete mode 100644 app/unused_apps/income/views.py delete mode 100644 app/unused_apps/jrnl/__init__.py delete mode 100644 app/unused_apps/jrnl/admin.py delete mode 100644 app/unused_apps/jrnl/build.py delete mode 100644 app/unused_apps/jrnl/export.py delete mode 100644 app/unused_apps/jrnl/fields.py delete mode 100644 app/unused_apps/jrnl/migrations/0001_initial.py delete mode 100644 app/unused_apps/jrnl/migrations/0001_squashed_0019_remove_entry_thumbnail.py delete mode 100644 app/unused_apps/jrnl/migrations/0002_entrytitlesong.py delete mode 100644 app/unused_apps/jrnl/migrations/0003_auto_20160309_1018.py delete mode 100644 app/unused_apps/jrnl/migrations/0004_auto_20160309_1031.py delete mode 100644 app/unused_apps/jrnl/migrations/0005_auto_20160514_2151.py delete mode 100644 app/unused_apps/jrnl/migrations/0006_auto_20160715_0703.py delete mode 100644 app/unused_apps/jrnl/migrations/0007_delete_postimage.py delete mode 100644 app/unused_apps/jrnl/migrations/0008_auto_20160906_0845.py delete mode 100644 app/unused_apps/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py delete mode 100644 app/unused_apps/jrnl/migrations/0010_auto_20161102_0916.py delete mode 100644 app/unused_apps/jrnl/migrations/0011_auto_20161102_0925.py delete mode 100644 app/unused_apps/jrnl/migrations/0012_auto_20161102_0930.py delete mode 100644 app/unused_apps/jrnl/migrations/0013_entry_featured_image.py delete mode 100644 app/unused_apps/jrnl/migrations/0014_homepagecurrator.py delete mode 100644 app/unused_apps/jrnl/migrations/0015_entry_has_video.py delete mode 100644 app/unused_apps/jrnl/migrations/0016_auto_20161219_1058.py delete mode 100644 app/unused_apps/jrnl/migrations/0017_entry_field_notes.py delete mode 100644 app/unused_apps/jrnl/migrations/0018_auto_20180303_1037.py delete mode 100644 app/unused_apps/jrnl/migrations/0019_remove_entry_thumbnail.py delete mode 100644 app/unused_apps/jrnl/migrations/0020_auto_20180606_1058.py delete mode 100644 app/unused_apps/jrnl/migrations/0021_auto_20180606_1058.py delete mode 100644 app/unused_apps/jrnl/migrations/0022_auto_20180707_0958.py delete mode 100644 app/unused_apps/jrnl/migrations/0023_auto_20180902_1210.py delete mode 100644 app/unused_apps/jrnl/migrations/0024_auto_20180902_1217.py delete mode 100644 app/unused_apps/jrnl/migrations/0025_auto_20190131_2335.py delete mode 100644 app/unused_apps/jrnl/migrations/0026_entry_country_name.py delete mode 100644 app/unused_apps/jrnl/migrations/0027_entry_country_slug.py delete mode 100644 app/unused_apps/jrnl/migrations/0028_auto_20190218_1614.py delete mode 100644 app/unused_apps/jrnl/migrations/0029_home_more_popular.py delete mode 100644 app/unused_apps/jrnl/migrations/0030_remove_home_popular.py delete mode 100644 app/unused_apps/jrnl/migrations/0031_auto_20190220_1136.py delete mode 100644 app/unused_apps/jrnl/migrations/0032_entry_subtitle.py delete mode 100644 app/unused_apps/jrnl/migrations/0033_entry_field_notes_two.py delete mode 100644 app/unused_apps/jrnl/migrations/0034_remove_entry_field_notes.py delete mode 100644 app/unused_apps/jrnl/migrations/0035_auto_20190303_1610.py delete mode 100644 app/unused_apps/jrnl/migrations/0036_enjoyitem.py delete mode 100644 app/unused_apps/jrnl/migrations/0037_enjoyitem_entry.py delete mode 100644 app/unused_apps/jrnl/migrations/0038_remove_enjoyitem_entry.py delete mode 100644 app/unused_apps/jrnl/migrations/0039_enjoyitem_order.py delete mode 100644 app/unused_apps/jrnl/migrations/0040_auto_20190315_1906.py delete mode 100644 app/unused_apps/jrnl/migrations/0041_auto_20190315_2240.py delete mode 100644 app/unused_apps/jrnl/migrations/0042_auto_20190412_1805.py delete mode 100644 app/unused_apps/jrnl/migrations/0043_auto_20190704_0903.py delete mode 100644 app/unused_apps/jrnl/migrations/0044_auto_20190917_1703.py delete mode 100644 app/unused_apps/jrnl/migrations/0045_entry_books_new.py delete mode 100644 app/unused_apps/jrnl/migrations/0046_remove_entry_books.py delete mode 100644 app/unused_apps/jrnl/migrations/0047_auto_20191110_0859.py delete mode 100644 app/unused_apps/jrnl/migrations/0048_auto_20191205_1720.py delete mode 100644 app/unused_apps/jrnl/migrations/0049_entry_newrelated.py delete mode 100644 app/unused_apps/jrnl/migrations/0050_auto_20191206_0741.py delete mode 100644 app/unused_apps/jrnl/migrations/0051_auto_20201027_2102.py delete mode 100644 app/unused_apps/jrnl/migrations/0052_entry_new_field_notes.py delete mode 100644 app/unused_apps/jrnl/migrations/0053_auto_20201027_2105.py delete mode 100644 app/unused_apps/jrnl/migrations/0054_auto_20201111_2148.py delete mode 100644 app/unused_apps/jrnl/migrations/__init__.py delete mode 100644 app/unused_apps/jrnl/models.py delete mode 100644 app/unused_apps/jrnl/templates/horizontal_select.html delete mode 100644 app/unused_apps/jrnl/templates/jrnl/entry_detail.html delete mode 100644 app/unused_apps/jrnl/templates/jrnl/entry_detail.txt delete mode 100644 app/unused_apps/jrnl/templates/jrnl/entry_list.html delete mode 100644 app/unused_apps/jrnl/urls.py delete mode 100644 app/unused_apps/jrnl/views.py delete mode 100644 app/unused_apps/notes/__init__.py delete mode 100644 app/unused_apps/notes/admin.py delete mode 100644 app/unused_apps/notes/build.py delete mode 100644 app/unused_apps/notes/migrations/0001_initial.py delete mode 100644 app/unused_apps/notes/migrations/__init__.py delete mode 100644 app/unused_apps/notes/models.py delete mode 100644 app/unused_apps/notes/urls.py delete mode 100644 app/unused_apps/notes/views.py delete mode 100644 app/unused_apps/people/__init__.py delete mode 100644 app/unused_apps/people/admin.py delete mode 100644 app/unused_apps/people/build.py delete mode 100644 app/unused_apps/people/migrations/0001_initial.py delete mode 100644 app/unused_apps/people/migrations/__init__.py delete mode 100644 app/unused_apps/people/models.py delete mode 100644 app/unused_apps/people/urls.py delete mode 100644 app/unused_apps/people/views.py delete mode 100644 app/unused_apps/projects/__init__.py delete mode 100644 app/unused_apps/projects/admin.py delete mode 100644 app/unused_apps/projects/models/__init__.py delete mode 100644 app/unused_apps/projects/models/base.py delete mode 100644 app/unused_apps/projects/models/fiveby.py delete mode 100644 app/unused_apps/projects/models/gifs.py delete mode 100644 app/unused_apps/projects/models/natparks.py delete mode 100644 app/unused_apps/projects/models/self_experiments.py delete mode 100644 app/unused_apps/projects/natparks.js delete mode 100644 app/unused_apps/projects/shortcuts.py delete mode 100644 app/unused_apps/projects/urls.py delete mode 100644 app/unused_apps/projects/views.py delete mode 100644 app/unused_apps/prompts/__init__.py delete mode 100644 app/unused_apps/prompts/admin.py delete mode 100644 app/unused_apps/prompts/migrations/0001_initial.py delete mode 100644 app/unused_apps/prompts/migrations/0002_auto_20190228_0941.py delete mode 100644 app/unused_apps/prompts/migrations/0003_prompt_prompt_type.py delete mode 100644 app/unused_apps/prompts/migrations/__init__.py delete mode 100644 app/unused_apps/prompts/models.py delete mode 100644 app/unused_apps/prompts/urls.py delete mode 100644 app/unused_apps/prompts/views.py delete mode 100644 app/unused_apps/publications/__init__.py delete mode 100644 app/unused_apps/publications/admin.py delete mode 100644 app/unused_apps/publications/migrations/0001_initial.py delete mode 100644 app/unused_apps/publications/migrations/0002_editor_section.py delete mode 100644 app/unused_apps/publications/migrations/0003_auto_20190131_0923.py delete mode 100644 app/unused_apps/publications/migrations/0004_pitchidea.py delete mode 100644 app/unused_apps/publications/migrations/0005_auto_20190131_1100.py delete mode 100644 app/unused_apps/publications/migrations/0006_auto_20190222_1819.py delete mode 100644 app/unused_apps/publications/migrations/__init__.py delete mode 100644 app/unused_apps/publications/models.py delete mode 100644 app/unused_apps/publications/urls.py delete mode 100644 app/unused_apps/publications/views.py delete mode 100644 app/unused_apps/sketches/__init__.py delete mode 100644 app/unused_apps/sketches/admin.py delete mode 100644 app/unused_apps/sketches/build.py delete mode 100644 app/unused_apps/sketches/migrations/0001_initial.py delete mode 100644 app/unused_apps/sketches/migrations/0002_auto_20180208_0743.py delete mode 100644 app/unused_apps/sketches/migrations/0003_auto_20190303_1057.py delete mode 100644 app/unused_apps/sketches/migrations/__init__.py delete mode 100644 app/unused_apps/sketches/models.py delete mode 100644 app/unused_apps/sketches/urls.py delete mode 100644 app/unused_apps/sketches/views.py delete mode 100644 app/unused_apps/src/__init__.py delete mode 100644 app/unused_apps/src/admin.py delete mode 100644 app/unused_apps/src/build.py delete mode 100644 app/unused_apps/src/migrations/0001_initial.py delete mode 100644 app/unused_apps/src/migrations/0002_auto_20160329_2107.py delete mode 100644 app/unused_apps/src/migrations/0003_auto_20180707_0958.py delete mode 100644 app/unused_apps/src/migrations/0004_auto_20191007_0905.py delete mode 100644 app/unused_apps/src/migrations/__init__.py delete mode 100644 app/unused_apps/src/models.py delete mode 100644 app/unused_apps/src/templates/src/srcpost_detail.html delete mode 100644 app/unused_apps/src/templates/src/srcpost_list.html delete mode 100644 app/unused_apps/src/templates/src/topic_list.html delete mode 100644 app/unused_apps/src/urls.py delete mode 100644 app/unused_apps/src/views.py delete mode 100644 app/unused_apps/stuff/__init__.py delete mode 100644 app/unused_apps/stuff/admin.py delete mode 100644 app/unused_apps/stuff/models.py delete mode 100644 app/unused_apps/stuff/temp.py delete mode 100644 app/unused_apps/syndication/__init__.py delete mode 100644 app/unused_apps/syndication/admin.py delete mode 100644 app/unused_apps/syndication/migrations/0001_initial.py delete mode 100644 app/unused_apps/syndication/migrations/0002_auto_20160628_2149.py delete mode 100644 app/unused_apps/syndication/migrations/0003_auto_20161023_2014.py delete mode 100644 app/unused_apps/syndication/migrations/__init__.py delete mode 100644 app/unused_apps/syndication/models.py delete mode 100644 app/unused_apps/syndication/syndicators.py delete mode 100644 app/unused_apps/syndication/templatetags/__init__.py delete mode 100644 app/unused_apps/syndication/templatetags/facebook_processor.py delete mode 100644 app/unused_apps/syndication/views.py delete mode 100644 app/unused_apps/trips/__init__.py delete mode 100644 app/unused_apps/trips/admin.py delete mode 100644 app/unused_apps/trips/migrations/0001_initial.py delete mode 100644 app/unused_apps/trips/migrations/__init__.py delete mode 100644 app/unused_apps/trips/models.py delete mode 100644 app/unused_apps/trips/urls.py delete mode 100644 app/unused_apps/trips/views.py delete mode 100644 site/media/img/apple-touch-icon-114x114.png delete mode 100644 site/media/img/apple-touch-icon-57x57.png delete mode 100644 site/media/img/apple-touch-icon-72x72.png delete mode 100644 site/media/img/bio.jpg delete mode 100644 site/media/img/chricon.jpg delete mode 100644 site/media/img/exifbg.png delete mode 100644 site/media/img/favicon.ico delete mode 100644 site/media/img/feed-large.png delete mode 100644 site/media/img/fficon.jpg delete mode 100644 site/media/img/mapbg-dark.png delete mode 100644 site/media/img/mapbg.png delete mode 100644 site/media/img/marker-entry.png delete mode 100644 site/media/img/parkbg.png delete mode 100644 site/media/img/shadow.png delete mode 100644 site/media/img/stop.gif delete mode 100644 site/media/img/text-centered.png delete mode 100644 site/media/img/text.png delete mode 100644 site/media/img/tree.png delete mode 100644 site/media/js/html5css3ie.min.js delete mode 100644 site/media/js/hyphenate.js delete mode 100644 site/media/js/hyphenate.min.js delete mode 100644 site/media/js/jquery.js delete mode 100644 site/media/js/jquery.scrollTo-1.4.2-min.js delete mode 100644 site/media/js/natparks.js delete mode 100644 site/media/js/photos.js delete mode 100644 site/media/js/photos.min.js diff --git a/app/media/models.py b/app/media/models.py index bc27758..2fc669a 100644 --- a/app/media/models.py +++ b/app/media/models.py @@ -147,7 +147,7 @@ class LuxImage(models.Model): if size == "original": return self.image.url else: - luximagesize = LuxImageSize.objects.get(name=size) + luximagesize = LuxImageSize.objects.get(slug=size) #if luximagesize not in self.get_sizes: #self.sizes.add(luximagesize) return "%s%s/%s_%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.image_name, luximagesize.slug, self.image_ext) @@ -159,6 +159,7 @@ class LuxImage(models.Model): luximagesize = LuxImageSize.objects.get(slug=size) return "%s%s/%s_%s.%s" % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), self.image_name, luximagesize.slug, self.image_ext) + @cached_property def get_thumbnail_url(self): return self.get_image_url_by_size("tn") diff --git a/app/photos/__init__.py b/app/photos/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/photos/admin.py b/app/photos/admin.py deleted file mode 100644 index e77e50b..0000000 --- a/app/photos/admin.py +++ /dev/null @@ -1,184 +0,0 @@ -from django.contrib import admin -from django import forms -from django.contrib.gis.admin import OSMGeoAdmin -from django.conf.urls import url -from django.utils.translation import ungettext, ugettext_lazy as _ -from photos.models import Photo, PhotoGallery, LuxImage, LuxGallery, LuxImageSize, LuxVideo -from django.shortcuts import render -from django.contrib.admin import helpers -from django.http import HttpResponseRedirect - - -from .forms import UploadZipForm, GalleryForm - - -class LuxImageSizeAdmin(OSMGeoAdmin): - list_display = ('name', 'width', 'height', 'quality') - pass - - -admin.site.register(LuxImageSize, LuxImageSizeAdmin) - - -@admin.register(LuxVideo) -class LuxVideoAdmin(OSMGeoAdmin): - pass - - -class LuxImageAdmin(OSMGeoAdmin): - list_display = ('pk', 'admin_thumbnail', 'pub_date', 'caption', 'location') - list_filter = ('pub_date', 'location') - search_fields = ['title', 'caption', 'alt'] - list_editable = ('location',) - # Options for OSM map Using custom ESRI topo map - default_lon = -9285175 - default_lat = 4025046 - default_zoom = 6 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - - fieldsets = ( - (None, { - 'fields': ('title', ('image'), 'pub_date', 'sizes', 'alt', 'caption', 'point', ('is_public'), ('photo_credit_source', 'photo_credit_url')) - }), - ('Exif Data', { - 'classes': ('collapse',), - 'fields': ('exif_raw', 'exif_aperture', 'exif_make', 'exif_model', 'exif_exposure', 'exif_iso', 'exif_focal_length', 'exif_lens', 'exif_date', 'height', 'width'), - }), - ) - - class Media: - js = ('image-preview.js', 'next-prev-links.js') - - -admin.site.register(LuxImage, LuxImageAdmin) - - -class LuxGalleryAdmin(OSMGeoAdmin): - form = GalleryForm - list_display = ('title', 'location', 'pub_date') - list_filter = ('location',) - - # Options for OSM map Using custom ESRI topo map - default_lon = -9285175 - default_lat = 4025046 - default_zoom = 6 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - - def get_urls(self): - urls = super(LuxGalleryAdmin, self).get_urls() - custom_urls = [ - url( - r'upload_zip/$', - self.admin_site.admin_view(self.upload_zip), - name='upload_zip' - ) - ] - return custom_urls + urls - - def upload_zip(self, request): - context = { - 'title': _('Upload a zip archive of photos'), - 'app_label': self.model._meta.app_label, - 'opts': self.model._meta, - 'has_change_permission': self.has_change_permission(request) - } - - # Handle form request - if request.method == 'POST': - form = UploadZipForm(request.POST, request.FILES) - if form.is_valid(): - form.save(request=request) - return HttpResponseRedirect('..') - else: - form = UploadZipForm() - context['form'] = form - context['adminform'] = helpers.AdminForm(form, - list([(None, {'fields': form.base_fields})]), - {}) - return render(request, 'admin/upload_zip.html', context) - -admin.site.register(LuxGallery, LuxGalleryAdmin) - - -class PhotoAdmin(OSMGeoAdmin): - list_display = ('title', 'admin_thumbnail', 'flickr_id', 'pub_date',) - list_filter = ('pub_date',) - search_fields = ['title', 'description'] - fieldsets = ( - (None, { - 'fields': ( - ('title', 'description'), - 'pub_date', - ('lat', 'lon') - ) - }), - ('Exif Data', { - 'fields': ( - 'exif_aperture', - 'exif_exposure', - 'exif_iso', - 'exif_focal_length', - 'exif_lens', - 'exif_date', - 'exif_make', - 'exif_model' - ), - 'classes': ('collapse') - }), - ('Flickr Data', { - 'fields': ( - 'flickr_id', - 'flickr_owner', - 'flickr_farm', - 'flickr_server', - 'flickr_secret', - 'flickr_originalsecret' - ), - 'classes': ('collapse') - }), - ) - - # Options for OSM map Using custom ESRI topo map - default_lon = -9285175 - default_lat = 4025046 - default_zoom = 6 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - - -admin.site.register(Photo, PhotoAdmin) - - -class PhotoGalleryAdmin(OSMGeoAdmin): - list_display = ('set_title', 'region', 'location', 'pub_date') - list_filter = ('region', 'location') - fieldsets = ( - (None, { - 'fields': ( - ('set_id', 'set_title', 'set_desc'), - 'set_slug', - 'primary', - 'location', - 'region', - 'photos', - 'pub_date' - ) - }), - ) - - -admin.site.register(PhotoGallery, PhotoGalleryAdmin) diff --git a/app/photos/build.py b/app/photos/build.py deleted file mode 100644 index e95cbfc..0000000 --- a/app/photos/build.py +++ /dev/null @@ -1,48 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - -from .models import LuxImage - - -class BuildLuxPhotos(BuildNew): - - def build(self): - self.build_detail_view() - self.build_daily_photo() - - def get_model_queryset(self): - return self.model.objects.all() - - def build_daily_photo(self): - ''' - build out images that I post daily, found by title prefix daily_ - ''' - self.build_list_view( - base_path=reverse("photos:daily_photo_list"), - qs=LuxImage.objects.filter(is_public=True, title__startswith="daily_"), - paginate_by=10 - ) - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def dailybuilder(): - j = BuildLuxPhotos("photos", "LuxImage") - j.build_daily_photo() - - -def builder(): - j = BuildLuxPhotos("photos", "LuxGallery") - j.build() diff --git a/app/photos/detail_urls.py b/app/photos/detail_urls.py deleted file mode 100644 index 0ab94f6..0000000 --- a/app/photos/detail_urls.py +++ /dev/null @@ -1,10 +0,0 @@ -from django.conf.urls import url -from django.views.generic.detail import DetailView -from photos.models import Photo - -urlpatterns = [ - url( - r'^(?P\d+)/$', - DetailView.as_view(model=Photo, template_name='details/photo.html') - ), -] diff --git a/app/photos/flickrauth b/app/photos/flickrauth deleted file mode 100644 index 0fe7407..0000000 --- a/app/photos/flickrauth +++ /dev/null @@ -1,2 +0,0 @@ -72157629224829547-04c4f099c2550cd8 -812f6c53e5b122f4 \ No newline at end of file diff --git a/app/photos/forms.py b/app/photos/forms.py deleted file mode 100644 index 6ee7bde..0000000 --- a/app/photos/forms.py +++ /dev/null @@ -1,179 +0,0 @@ -import zipfile -from zipfile import BadZipFile -import logging -import datetime -import os -from io import BytesIO -try: - import Image -except ImportError: - from PIL import Image - -from django import forms -from django.utils.translation import ugettext_lazy as _ -from django.utils.safestring import mark_safe -from django.contrib import messages -from django.core.files.base import ContentFile -from django.contrib.admin import widgets -from django.conf import settings - -from photos.models import LuxImage, LuxGallery, LuxImageSize - -from .utils import resize_image -from .readexif import readexif - -logger = logging.getLogger('photos.forms') - - -class GalleryForm(forms.ModelForm): - class Meta: - fields = '__all__' - widgets = { - 'images': forms.SelectMultiple, - } - - def __init__(self, *args, **kwargs): - super(GalleryForm, self).__init__(*args, **kwargs) - self.fields['images'].choices = [(image.id, mark_safe('%sqq%sqq%s' % (image.title, image.get_image_by_size('tn'), image.pk))) for image in LuxImage.objects.all()[:40]] - self.fields['images'].allow_tags = True - - -from django.utils.safestring import mark_safe - -class ImageChoiceField(forms.ModelMultipleChoiceField): - - def label_from_instance(self, obj): - - return mark_safe('%sqq%sqq%s' % (obj.title, obj.get_image_by_size('tn'), obj.pk)) - - - -class FKGalleryForm(forms.ModelForm): - class Meta: - fields = '__all__' - widgets = { - 'image': ImageChoiceField(queryset=LuxImage.objects.all()), - } - - def __init__(self, *args, **kwargs): - super(FKGalleryForm, self).__init__(*args, **kwargs) - self.fields['image'].choices = [(o.id, str(o.image.url)) for o in LuxImage.objects.all()] - self.fields['image'].allow_tags = True - -class UploadZipForm(forms.Form): - """ - Handles the uploading of a gallery of photos packed in a .zip file - Creates Gallery object, adds photos with all metadata that's available - """ - zip_file = forms.FileField() - title = forms.CharField(label=_('Gallery Title'), max_length=250) - slug = forms.SlugField(label=_('Gallery Slug')) - desc = forms.CharField(label=_('Gallery Caption'), widget=forms.Textarea, required=False) - date = forms.SplitDateTimeField(label=_('Date'), widget=widgets.AdminSplitDateTime) - is_public = forms.BooleanField(label=_('Is public'), initial=True, required=False, help_text=_('Show on site')) - - def clean_zip_file(self): - """Open the zip file a first time, to check that it is a valid zip archive. - We'll open it again in a moment, so we have some duplication, but let's focus - on keeping the code easier to read! - """ - zip_file = self.cleaned_data['zip_file'] - try: - zip = zipfile.ZipFile(zip_file) - except BadZipFile as e: - raise forms.ValidationError(str(e)) - bad_file = zip.testzip() - if bad_file: - zip.close() - raise forms.ValidationError('"%s" in the .zip archive is corrupt.' % bad_file) - zip.close() # Close file in all cases. - return zip_file - - def clean_title(self): - title = self.cleaned_data['title'] - if title and LuxGallery.objects.filter(title=title).exists(): - raise forms.ValidationError(_('A gallery with that title already exists.')) - return title - - def clean(self): - cleaned_data = super(UploadZipForm, self).clean() - if not self['title'].errors: - # If there's already an error in the title, no need to add another - # error related to the same field. - if not cleaned_data.get('title', None) and not cleaned_data['gallery']: - raise forms.ValidationError( - _('Select an existing gallery, or enter a title for a new gallery.')) - return cleaned_data - - def save(self, request=None, zip_file=None): - if not zip_file: - zip_file = self.cleaned_data['zip_file'] - - gallery, created = LuxGallery.objects.get_or_create( - title=self.cleaned_data['title'], - description=self.cleaned_data['desc'], - slug=self.cleaned_data['slug'], - pub_date=self.cleaned_data['date'], - is_public=self.cleaned_data['is_public'] - ) - zipper = zipfile.ZipFile(zip_file) - count = 1 - for filename in sorted(zipper.namelist()): - f, file_extension = os.path.splitext(filename) - logger.debug('Reading file "{0}".'.format(filename)) - if filename.startswith('__') or filename.startswith('.'): - logger.debug('Ignoring file "{0}".'.format(filename)) - continue - if os.path.dirname(filename): - logger.warning('Ignoring file "{0}" as it is in a subfolder; all images should be in the top ' - 'folder of the zip.'.format(filename)) - if request: - messages.warning(request, - _('Ignoring file "{filename}" as it is in a subfolder').format(filename=filename), fail_silently=True) - continue - data = zipper.read(filename) - - if not len(data): - logger.debug('File "{0}" is empty.'.format(filename)) - continue - - fn, file_extension = os.path.splitext(filename) - if file_extension != ".mp4": - # Basic check that we have a valid image. - try: - file = BytesIO(data) - opened = Image.open(file) - opened.verify() - except Exception: - # Pillow (or PIL) doesn't recognize it as an image. - # If a "bad" file is found we just skip it. - # But we do flag this both in the logs and to the user. - logger.error('Could not process file "{0}" in the .zip archive.'.format(filename)) - if request: - messages.warning(request, - _('Could not process file "{0}" in the .zip archive.').format( - filename), - fail_silently=True) - continue - image = LuxImage( - pub_date=datetime.datetime.now() - ) - contentfile = ContentFile(data) - image.image.save(filename, contentfile) - if file_extension != ".mp4": - img = Image.open(image.image.path) - if img.size[0] > img.size[1]: - image.sizes.add(LuxImageSize.objects.get(width=2560)) - image.sizes.add(LuxImageSize.objects.get(width=1170)) - image.sizes.add(LuxImageSize.objects.get(width=720)) - if img.size[1] > img.size[0]: - image.sizes.add(LuxImageSize.objects.get(height=1600)) - image.sizes.add(LuxImageSize.objects.get(height=800)) - image.sizes.add(LuxImageSize.objects.get(height=460)) - image.save() - gallery.images.add(image) - - zipper.close() - - if request: - messages.success(request, _('The photos have been uploaded')) diff --git a/app/photos/migrations/0001_initial.py b/app/photos/migrations/0001_initial.py deleted file mode 100644 index 711af1d..0000000 --- a/app/photos/migrations/0001_initial.py +++ /dev/null @@ -1,137 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2015-12-11 19:33 -from __future__ import unicode_literals - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import photos.models -import taggit.managers - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('taggit', '0002_auto_20150616_2121'), - #('locations', '__first__'), - ] - - operations = [ - migrations.CreateModel( - name='LuxGallery', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(blank=True, max_length=300)), - ('description', models.TextField(blank=True, null=True)), - ('slug', models.CharField(blank=True, max_length=300)), - ('thumb', models.CharField(blank=True, max_length=300)), - ('pub_date', models.DateTimeField(null=True)), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('is_public', models.BooleanField(default=True)), - ], - options={ - 'verbose_name_plural': 'Galleries', - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date', 'id'), - }, - ), - migrations.CreateModel( - name='LuxImage', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('image', models.FileField(blank=True, null=True, upload_to=photos.models.get_upload_path)), - ('title', models.CharField(blank=True, max_length=300, null=True)), - ('caption', models.TextField(blank=True, null=True)), - ('pub_date', models.DateTimeField()), - ('exif_raw', models.TextField(blank=True, null=True)), - ('exif_aperture', models.CharField(blank=True, max_length=50, null=True)), - ('exif_make', models.CharField(blank=True, max_length=50, null=True)), - ('exif_model', models.CharField(blank=True, max_length=50, null=True)), - ('exif_exposure', models.CharField(blank=True, max_length=50, null=True)), - ('exif_iso', models.CharField(blank=True, max_length=50, null=True)), - ('exif_focal_length', models.CharField(blank=True, max_length=50, null=True)), - ('exif_lens', models.CharField(blank=True, max_length=50, null=True)), - ('exif_date', models.DateTimeField(blank=True, null=True)), - ('height', models.CharField(blank=True, max_length=6, null=True)), - ('width', models.CharField(blank=True, max_length=6, null=True)), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('is_public', models.BooleanField(default=True)), - ('is_video', models.BooleanField(default=False)), - ('flickr_id', models.CharField(blank=True, max_length=80, null=True)), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ], - options={ - 'verbose_name_plural': 'Images', - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date', 'id'), - }, - ), - migrations.CreateModel( - name='Photo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('description', models.TextField(blank=True, null=True)), - ('title', models.CharField(blank=True, max_length=300)), - ('pub_date', models.DateTimeField()), - ('exif_aperture', models.CharField(blank=True, max_length=50, null=True)), - ('exif_make', models.CharField(blank=True, max_length=50, null=True)), - ('exif_model', models.CharField(blank=True, max_length=50, null=True)), - ('exif_exposure', models.CharField(blank=True, max_length=50, null=True)), - ('exif_iso', models.CharField(blank=True, max_length=50, null=True)), - ('exif_focal_length', models.CharField(blank=True, max_length=50, null=True)), - ('exif_lens', models.CharField(blank=True, max_length=50, null=True)), - ('exif_date', models.DateTimeField()), - ('flickr_id', models.CharField(max_length=300)), - ('flickr_owner', models.CharField(max_length=20)), - ('flickr_server', models.IntegerField()), - ('flickr_farm', models.IntegerField()), - ('flickr_secret', models.CharField(max_length=50)), - ('flickr_originalsecret', models.CharField(max_length=50)), - ('lon', models.FloatField(help_text='Longitude of centerpoint', null=True, verbose_name='Longitude')), - ('lat', models.FloatField(help_text='Latitude of centerpoint', null=True, verbose_name='Latitude')), - ('slideshowimage_width', models.CharField(blank=True, max_length=4, null=True)), - ('slideshowimage_height', models.CharField(blank=True, max_length=4, null=True)), - ('slideshowimage_margintop', models.CharField(blank=True, max_length=4, null=True)), - ('slideshowimage_marginleft', models.CharField(blank=True, max_length=4, null=True)), - ('is_public', models.BooleanField(default=True)), - ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('region', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Region')), - ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), - ], - options={ - 'ordering': ('-pub_date',), - }, - ), - migrations.CreateModel( - name='PhotoGallery', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('set_id', models.CharField(blank=True, max_length=300)), - ('set_title', models.CharField(blank=True, max_length=300)), - ('set_desc', models.TextField(blank=True, null=True)), - ('set_slug', models.CharField(blank=True, max_length=300)), - ('primary', models.CharField(blank=True, max_length=300)), - ('pub_date', models.DateTimeField(null=True)), - ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('photos', models.ManyToManyField(to='photos.Photo')), - ('region', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Region')), - ], - options={ - 'verbose_name_plural': 'Photo Galleries', - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date', 'id'), - }, - ), - migrations.AddField( - model_name='luxgallery', - name='image', - field=models.ManyToManyField(to='photos.LuxImage'), - ), - migrations.AddField( - model_name='luxgallery', - name='location', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location'), - ), - ] diff --git a/app/photos/migrations/0002_auto_20151216_1958.py b/app/photos/migrations/0002_auto_20151216_1958.py deleted file mode 100644 index 2a2bffb..0000000 --- a/app/photos/migrations/0002_auto_20151216_1958.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2015-12-16 19:58 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0001_initial'), - ] - - operations = [ - migrations.RenameField( - model_name='luxgallery', - old_name='image', - new_name='images', - ), - migrations.AlterField( - model_name='luxgallery', - name='thumb', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gallery_thumb', to='photos.LuxImage'), - ), - ] diff --git a/app/photos/migrations/0003_luxgallery_caption_style.py b/app/photos/migrations/0003_luxgallery_caption_style.py deleted file mode 100644 index b46f970..0000000 --- a/app/photos/migrations/0003_luxgallery_caption_style.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2015-12-17 11:01 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0002_auto_20151216_1958'), - ] - - operations = [ - migrations.AddField( - model_name='luxgallery', - name='caption_style', - field=models.CharField(blank=True, max_length=400, null=True), - ), - ] diff --git a/app/photos/migrations/0004_luximage_alt.py b/app/photos/migrations/0004_luximage_alt.py deleted file mode 100644 index ecbaf56..0000000 --- a/app/photos/migrations/0004_luximage_alt.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-16 22:45 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0003_luxgallery_caption_style'), - ] - - operations = [ - migrations.AddField( - model_name='luximage', - name='alt', - field=models.CharField(blank=True, max_length=300, null=True), - ), - ] diff --git a/app/photos/migrations/0005_auto_20160318_1244.py b/app/photos/migrations/0005_auto_20160318_1244.py deleted file mode 100644 index 584714e..0000000 --- a/app/photos/migrations/0005_auto_20160318_1244.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-18 12:44 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0004_luximage_alt'), - ] - - operations = [ - migrations.AddField( - model_name='luximage', - name='photo_credit_source', - field=models.CharField(blank=True, max_length=300, null=True), - ), - migrations.AddField( - model_name='luximage', - name='photo_credit_url', - field=models.CharField(blank=True, max_length=300, null=True), - ), - ] diff --git a/app/photos/migrations/0006_auto_20160318_2047.py b/app/photos/migrations/0006_auto_20160318_2047.py deleted file mode 100644 index 7cf0a4f..0000000 --- a/app/photos/migrations/0006_auto_20160318_2047.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-18 20:47 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0005_auto_20160318_1244'), - ] - - operations = [ - migrations.CreateModel( - name='LuxImageSize', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('size', models.IntegerField(max_length=5)), - ], - options={ - 'verbose_name_plural': 'Image Sizes', - }, - ), - migrations.AddField( - model_name='luximage', - name='sizes', - field=models.ManyToManyField(to='photos.LuxImageSize'), - ), - ] diff --git a/app/photos/migrations/0007_auto_20160320_0802.py b/app/photos/migrations/0007_auto_20160320_0802.py deleted file mode 100644 index 474bd42..0000000 --- a/app/photos/migrations/0007_auto_20160320_0802.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-20 08:02 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0006_auto_20160318_2047'), - ] - - operations = [ - migrations.AlterField( - model_name='luximagesize', - name='size', - field=models.IntegerField(), - ), - ] diff --git a/app/photos/migrations/0008_luximagesize_quality.py b/app/photos/migrations/0008_luximagesize_quality.py deleted file mode 100644 index 06dc0cc..0000000 --- a/app/photos/migrations/0008_luximagesize_quality.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-20 08:47 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0007_auto_20160320_0802'), - ] - - operations = [ - migrations.AddField( - model_name='luximagesize', - name='quality', - field=models.IntegerField(default=65), - preserve_default=False, - ), - ] diff --git a/app/photos/migrations/0009_auto_20160320_0907.py b/app/photos/migrations/0009_auto_20160320_0907.py deleted file mode 100644 index ccfebf5..0000000 --- a/app/photos/migrations/0009_auto_20160320_0907.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-20 09:07 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0008_luximagesize_quality'), - ] - - operations = [ - migrations.RenameField( - model_name='luximagesize', - old_name='size', - new_name='width', - ), - ] diff --git a/app/photos/migrations/0010_auto_20160517_0906.py b/app/photos/migrations/0010_auto_20160517_0906.py deleted file mode 100644 index 0adf4ff..0000000 --- a/app/photos/migrations/0010_auto_20160517_0906.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-05-17 09:06 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0009_auto_20160320_0907'), - ] - - operations = [ - migrations.AddField( - model_name='luximage', - name='facebook_link', - field=models.CharField(blank=True, max_length=300, null=True), - ), - migrations.AddField( - model_name='luximage', - name='twitter_link', - field=models.CharField(blank=True, max_length=300, null=True), - ), - migrations.AlterField( - model_name='luximage', - name='sizes', - field=models.ManyToManyField(blank=True, to='photos.LuxImageSize'), - ), - ] diff --git a/app/photos/migrations/0011_luximagesize_name.py b/app/photos/migrations/0011_luximagesize_name.py deleted file mode 100644 index 49d046b..0000000 --- a/app/photos/migrations/0011_luximagesize_name.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-21 08:46 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0010_auto_20160517_0906'), - ] - - operations = [ - migrations.AddField( - model_name='luximagesize', - name='name', - field=models.CharField(blank=True, max_length=30, null=True), - ), - ] diff --git a/app/photos/migrations/0012_luximagesize_is_portrait.py b/app/photos/migrations/0012_luximagesize_is_portrait.py deleted file mode 100644 index a2c2e3a..0000000 --- a/app/photos/migrations/0012_luximagesize_is_portrait.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-22 13:46 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0011_luximagesize_name'), - ] - - operations = [ - migrations.AddField( - model_name='luximagesize', - name='is_portrait', - field=models.BooleanField(default=False), - ), - ] diff --git a/app/photos/migrations/0013_auto_20161022_1348.py b/app/photos/migrations/0013_auto_20161022_1348.py deleted file mode 100644 index 8dfbf98..0000000 --- a/app/photos/migrations/0013_auto_20161022_1348.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-22 13:48 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0012_luximagesize_is_portrait'), - ] - - operations = [ - migrations.RenameField( - model_name='luximagesize', - old_name='width', - new_name='long_edge', - ), - ] diff --git a/app/photos/migrations/0014_remove_luximagesize_is_portrait.py b/app/photos/migrations/0014_remove_luximagesize_is_portrait.py deleted file mode 100644 index b8e0aa8..0000000 --- a/app/photos/migrations/0014_remove_luximagesize_is_portrait.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-22 14:11 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0013_auto_20161022_1348'), - ] - - operations = [ - migrations.RemoveField( - model_name='luximagesize', - name='is_portrait', - ), - ] diff --git a/app/photos/migrations/0015_auto_20161022_1411.py b/app/photos/migrations/0015_auto_20161022_1411.py deleted file mode 100644 index d380b52..0000000 --- a/app/photos/migrations/0015_auto_20161022_1411.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-22 14:11 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0014_remove_luximagesize_is_portrait'), - ] - - operations = [ - migrations.RenameField( - model_name='luximagesize', - old_name='long_edge', - new_name='width', - ), - ] diff --git a/app/photos/migrations/0016_auto_20161022_1411.py b/app/photos/migrations/0016_auto_20161022_1411.py deleted file mode 100644 index 54b84d7..0000000 --- a/app/photos/migrations/0016_auto_20161022_1411.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-22 14:11 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0015_auto_20161022_1411'), - ] - - operations = [ - migrations.AddField( - model_name='luximagesize', - name='height', - field=models.IntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='luximagesize', - name='width', - field=models.IntegerField(blank=True, null=True), - ), - ] diff --git a/app/photos/migrations/0017_auto_20161130_1218.py b/app/photos/migrations/0017_auto_20161130_1218.py deleted file mode 100644 index 8d5a496..0000000 --- a/app/photos/migrations/0017_auto_20161130_1218.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-11-30 12:18 -from __future__ import unicode_literals - -import datetime -from django.db import migrations, models -import photos.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0016_auto_20161022_1411'), - ] - - operations = [ - migrations.CreateModel( - name='LuxVideo', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('video_mp4', models.FileField(blank=True, null=True, upload_to=photos.models.get_vid_upload_path)), - ('video_webm', models.FileField(blank=True, null=True, upload_to=photos.models.get_vid_upload_path)), - ('video_poster', models.FileField(blank=True, null=True, upload_to=photos.models.get_vid_upload_path)), - ('title', models.CharField(blank=True, max_length=300, null=True)), - ('pub_date', models.DateTimeField(default=datetime.datetime.now)), - ], - options={ - 'verbose_name_plural': 'Videos', - 'ordering': ('-pub_date', 'id'), - 'get_latest_by': 'pub_date', - }, - ), - migrations.AlterField( - model_name='luximage', - name='pub_date', - field=models.DateTimeField(default=datetime.datetime.now), - ), - ] diff --git a/app/photos/migrations/0018_auto_20161130_1218.py b/app/photos/migrations/0018_auto_20161130_1218.py deleted file mode 100644 index 784175a..0000000 --- a/app/photos/migrations/0018_auto_20161130_1218.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-11-30 12:18 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0017_auto_20161130_1218'), - ] - - operations = [ - migrations.RemoveField( - model_name='luximage', - name='is_video', - ), - migrations.AddField( - model_name='luxvideo', - name='vimeo_url', - field=models.CharField(blank=True, max_length=300, null=True), - ), - migrations.AddField( - model_name='luxvideo', - name='youtube_url', - field=models.CharField(blank=True, max_length=80, null=True), - ), - ] diff --git a/app/photos/migrations/0019_auto_20190704_0903.py b/app/photos/migrations/0019_auto_20190704_0903.py deleted file mode 100644 index 833ee69..0000000 --- a/app/photos/migrations/0019_auto_20190704_0903.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.7 on 2019-07-04 09:03 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ] - - operations = [ - migrations.AlterModelOptions( - name='luximagesize', - options={'ordering': ('-name', 'id'), 'verbose_name_plural': 'Image Sizes'}, - ), - ] diff --git a/app/photos/migrations/0020_auto_20201201_2116.py b/app/photos/migrations/0020_auto_20201201_2116.py deleted file mode 100644 index 39d4fd9..0000000 --- a/app/photos/migrations/0020_auto_20201201_2116.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 3.1 on 2020-12-01 21:16 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('locations', '0028_auto_20200308_1152'), - ('photos', '0019_auto_20190704_0903'), - ] - - operations = [ - migrations.AlterField( - model_name='luximage', - name='location', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='locations.location'), - ), - ] diff --git a/app/photos/migrations/0021_auto_20201201_2118.py b/app/photos/migrations/0021_auto_20201201_2118.py deleted file mode 100644 index 25e4f8f..0000000 --- a/app/photos/migrations/0021_auto_20201201_2118.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1 on 2020-12-01 21:18 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0020_auto_20201201_2116'), - ] - - operations = [ - migrations.AlterField( - model_name='luximage', - name='sizes', - field=models.ManyToManyField(blank=True, related_name='_luximage_sizes_+', to='photos.LuxImageSize'), - ), - ] diff --git a/app/photos/migrations/__init__.py b/app/photos/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/photos/models.py b/app/photos/models.py deleted file mode 100644 index 24a218f..0000000 --- a/app/photos/models.py +++ /dev/null @@ -1,555 +0,0 @@ -import os.path -import io -import datetime -from PIL import Image - -from django.core.exceptions import ValidationError -from django.contrib.gis.db import models -from django.contrib.sitemaps import Sitemap -from django.utils.encoding import force_text -from django.utils.functional import cached_property -from django.urls import reverse -from django.apps import apps -from django.utils.html import format_html -from django.utils.text import slugify -from django.conf import settings -from django import forms - -from taggit.managers import TaggableManager - -from resizeimage.imageexceptions import ImageSizeError - -from .utils import resize_image -from .readexif import readexif -from django.db.models.signals import post_save -from django.dispatch import receiver -from django.db.models.signals import m2m_changed - - -def get_upload_path(self, filename): - return "images/original/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - -def get_vid_upload_path(self, filename): - return "images/videos/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - -class LuxImageSize(models.Model): - name = models.CharField(null=True, blank=True, max_length=30) - width = models.IntegerField(null=True, blank=True) - height = models.IntegerField(null=True, blank=True) - quality = models.IntegerField() - - class Meta: - ordering = ('-name', 'id') - verbose_name_plural = 'Image Sizes' - - def __str__(self): - if self.width: - size = self.width - if self.height: - size = self.height - return "%s - %s" %(self.name, str(size)) - - -class LuxImage(models.Model): - image = models.FileField(blank=True, null=True, upload_to=get_upload_path) - title = models.CharField(null=True, blank=True, max_length=300) - alt = models.CharField(null=True, blank=True, max_length=300) - photo_credit_source = models.CharField(null=True, blank=True, max_length=300) - photo_credit_url = models.CharField(null=True, blank=True, max_length=300) - caption = models.TextField(blank=True, null=True) - pub_date = models.DateTimeField(default=datetime.datetime.now) - exif_raw = models.TextField(blank=True, null=True) - exif_aperture = models.CharField(max_length=50, blank=True, null=True) - exif_make = models.CharField(max_length=50, blank=True, null=True) - exif_model = models.CharField(max_length=50, blank=True, null=True) - exif_exposure = models.CharField(max_length=50, blank=True, null=True) - exif_iso = models.CharField(max_length=50, blank=True, null=True) - exif_focal_length = models.CharField(max_length=50, blank=True, null=True) - exif_lens = models.CharField(max_length=50, blank=True, null=True) - exif_date = models.DateTimeField(blank=True, null=True) - height = models.CharField(max_length=6, blank=True, null=True) - width = models.CharField(max_length=6, blank=True, null=True) - point = models.PointField(null=True, blank=True) - location = models.ForeignKey("locations.Location", on_delete=models.CASCADE, null=True, blank=True, related_name="+") - is_public = models.BooleanField(default=True) - sizes = models.ManyToManyField(LuxImageSize, blank=True, related_name="+") - flickr_id = models.CharField(null=True, blank=True, max_length=80) - twitter_link = models.CharField(null=True, blank=True, max_length=300) - facebook_link = models.CharField(null=True, blank=True, max_length=300) - - class Meta: - ordering = ('-pub_date', 'id') - verbose_name_plural = 'Images' - get_latest_by = 'pub_date' - - def __str__(self): - if self.title: - return "%s" % self.title - else: - return "%s" % self.pk - - def get_type(self): - return str(self.__class__.__name__) - - def get_admin_image(self): - for size in self.sizes.all(): - if size.width and size.width <= 820 or size.height and size.height <= 800: - return self.get_image_by_size(size.name) - - def get_admin_insert(self): - return "/media/images/%s/%s_tn.%s" % (self.pub_date.strftime("%Y"), self.get_image_name(), self.get_image_ext()) - - def get_largest_image(self): - t = [] - for size in self.sizes.all(): - t.append(size.width) - t.sort(key=float) - t.reverse() - return self.get_image_path_by_size(t[0]) - - def get_image_name(self): - return self.image.url.split("original/")[1][5:-4] - - def get_image_name_new(self): - return os.path.basename(self.image.path)[:-4] - - def get_image_ext(self): - return self.image.url[-3:] - - @cached_property - def get_featured_jrnl(self): - ''' cached version of getting the primary image for archive page''' - return "%s%s/%s_%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.get_image_name(), 'featured_jrnl', self.get_image_ext()) - - @cached_property - def get_picwide_sm(self): - ''' cached version of getting the second image for archive page''' - return "%s%s/%s_%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.get_image_name(), 'picwide-sm', self.get_image_ext()) - - @cached_property - def get_srcset(self): - srcset = "" - length = len(self.sizes.all()) - print(length) - loopnum = 1 - for size in self.sizes.all(): - srcset += "%s%s/%s_%s.%s %sw" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.get_image_name(), size.name, self.get_image_ext(), size.width) - if loopnum < length: - srcset += ", " - loopnum = loopnum+1 - return srcset - - @cached_property - def get_src(self): - src = "" - if self.sizes.all().count() > 1: - src += "%s%s/%s_%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.get_image_name(), 'picwide-med', self.get_image_ext()) - else: - src += "%s%s/%s_%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.get_image_name(), [size.name for size in self.sizes.all()], self.get_image_ext()) - return src - - def get_image_by_size(self, size="original"): - base = self.get_image_name() - if size == "admin_insert": - return "images/%s/%s.%s" % (self.pub_date.strftime("%Y"), base, self.get_image_ext()) - if size == "original": - return "%soriginal/%s/%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), base, self.get_image_ext()) - else: - if size != 'tn': - try: - self.sizes.filter(name=size) - except DoesNotExist: - print("new size is "+s.name) - self.sizes.add(s) - return "%s%s/%s_%s.%s" % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), base, size, self.get_image_ext()) - - def get_image_path_by_size(self, size="original"): - base = self.get_image_name() - if size == "original": - return "%s/original/%s/%s.%s" % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), base, self.get_image_ext()) - else: - return "%s/%s/%s_%s.%s" % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), base, size, self.get_image_ext()) - - def get_thumbnail_url(self): - return self.get_image_by_size("tn") - - def admin_thumbnail(self): - return format_html('' % (self.get_image_by_size(), self.get_image_by_size("tn"))) - admin_thumbnail.short_description = 'Thumbnail' - - def get_sizes(self): - return self.sizes.all() - - @property - def latitude(self): - return self.point.y - - @property - def longitude(self): - return self.point.x - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date() - - @property - def get_next_published(self): - return self.get_next_by_pub_date() - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - @property - def is_portait(self): - if int(self.height) > int(self.width): - return True - else: - return False - - def save(self, *args, **kwargs): - if not self.point: - self.point = LuxImage.objects.latest().point - try: - self.location = apps.get_model('locations', 'Location').objects.filter( - geometry__contains=self.point - ).get() - except apps.get_model('locations', 'Location').DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - super(LuxImage, self).save() - - -@receiver(post_save, sender=LuxImage) -def post_save_events(sender, update_fields, created, instance, **kwargs): - if instance.exif_raw == '': - filename, file_extension = os.path.splitext(instance.image.path) - if file_extension != ".mp4": - img = Image.open(instance.image.path) - instance.height = img.height - instance.width = img.width - instance = readexif(instance) - post_save.disconnect(post_save_events, sender=LuxImage) - instance.save() - post_save.connect(post_save_events, sender=LuxImage) - - -@receiver(m2m_changed, sender=LuxImage.sizes.through) -def update_photo_sizes(sender, instance, **kwargs): - base_path = "%s/%s/" % (settings.IMAGES_ROOT, instance.pub_date.strftime("%Y")) - filename, file_extension = os.path.splitext(instance.image.path) - if file_extension != ".mp4": - img = Image.open(instance.image.path) - resize_image(img, 160, None, 78, base_path, "%s_tn.%s" % (instance.get_image_name(), instance.get_image_ext())) - for size in instance.sizes.all(): - if size.width: - print("Image width is:"+str(img.width)) - try: - if size.width <= img.width: - resize_image(img, size.width, None, size.quality, base_path, "%s_%s.%s" % (instance.get_image_name(), slugify(size.name), instance.get_image_ext())) - else: - raise ValidationError({'items': ["Size is larger than source image"]}) - except ImageSizeError: - m2m_changed.disconnect(update_photo_sizes, sender=LuxImage.sizes.through) - instance.sizes.remove(size) - m2m_changed.connect(update_photo_sizes, sender=LuxImage.sizes.through) - if size.height: - try: - if size.height <= img.height: - resize_image(img, None, size.height, size.quality, base_path, "%s_%s.%s" % (instance.get_image_name(), slugify(size.name), instance.get_image_ext())) - - else: - pass - except ImageSizeError: - m2m_changed.disconnect(update_photo_sizes, sender=LuxImage.sizes.through) - instance.sizes.remove(size) - m2m_changed.connect(update_photo_sizes, sender=LuxImage.sizes.through) - - -class LuxGallery(models.Model): - title = models.CharField(blank=True, max_length=300) - description = models.TextField(blank=True, null=True) - slug = models.CharField(blank=True, max_length=300) - thumb = models.ForeignKey(LuxImage, on_delete=models.CASCADE, related_name="gallery_thumb", null=True, blank=True) - images = models.ManyToManyField(LuxImage) - pub_date = models.DateTimeField(null=True) - point = models.PointField(null=True, blank=True) - location = models.ForeignKey("locations.Location", on_delete=models.CASCADE, null=True, blank=True) - is_public = models.BooleanField(default=True) - caption_style = models.CharField(blank=True, null=True, max_length=400) - - class Meta: - ordering = ('-pub_date', 'id') - verbose_name_plural = 'Galleries' - get_latest_by = 'pub_date' - - def __str__(self): - return self.title - - def get_main_image(self): - return "%sgallery_thumbs/%s.jpg" % (settings.IMAGES_URL, self.id) - - def get_absolute_url(self): - if self.is_public: - return "/photos/galleries/%s" % (self.slug) - else: - return "/photos/galleries/private/%s" % (self.slug) - - def latitude(self): - if self.point: - return self.point.y - - def longitude(self): - if self.point: - return self.point.x - - def thumbs(self): - lst = [x.image.name for x in self.images.all()] - lst = ["%s" % (x, x.split('/')[-1]) for x in lst] - return ', '.join(item for item in lst if item) - thumbs.allow_tags = True - - -class LuxVideo(models.Model): - video_mp4 = models.FileField(blank=True, null=True, upload_to=get_vid_upload_path) - video_webm = models.FileField(blank=True, null=True, upload_to=get_vid_upload_path) - video_poster = models.FileField(blank=True, null=True, upload_to=get_vid_upload_path) - title = models.CharField(null=True, blank=True, max_length=300) - pub_date = models.DateTimeField(default=datetime.datetime.now) - youtube_url = models.CharField(null=True, blank=True, max_length=80) - vimeo_url = models.CharField(null=True, blank=True, max_length=300) - - def __str__(self): - if self.title: - return self.title - else: - return str(self.pk) - - def get_type(self): - return str(self.__class__.__name__) - - class Meta: - ordering = ('-pub_date', 'id') - verbose_name_plural = 'Videos' - get_latest_by = 'pub_date' - -class Photo(models.Model): - description = models.TextField(blank=True, null=True) - title = models.CharField(blank=True, max_length=300) - pub_date = models.DateTimeField() - tags = TaggableManager(blank=True) - exif_aperture = models.CharField(max_length=50, blank=True, null=True) - exif_make = models.CharField(max_length=50, blank=True, null=True) - exif_model = models.CharField(max_length=50, blank=True, null=True) - exif_exposure = models.CharField(max_length=50, blank=True, null=True) - exif_iso = models.CharField(max_length=50, blank=True, null=True) - exif_focal_length = models.CharField(max_length=50, blank=True, null=True) - exif_lens = models.CharField(max_length=50, blank=True, null=True) - exif_date = models.DateTimeField() - """Flickr Specific Stuff""" - # Vlickr id is varchar since Flickr ids are larger than than integerfield can handle and BigIntegerField gets weird in Postgres. - flickr_id = models.CharField(max_length=300) - flickr_owner = models.CharField(max_length=20) - flickr_server = models.IntegerField() - flickr_farm = models.IntegerField() - flickr_secret = models.CharField(max_length=50) - flickr_originalsecret = models.CharField(max_length=50) - lon = models.FloatField('Longitude', help_text="Longitude of centerpoint", null=True) - lat = models.FloatField('Latitude', help_text="Latitude of centerpoint", null=True) - location = models.ForeignKey("locations.Location", on_delete=models.CASCADE, null=True) - region = models.ForeignKey("locations.Region", on_delete=models.CASCADE, null=True) - slideshowimage_width = models.CharField(max_length=4, blank=True, null=True) - slideshowimage_height = models.CharField(max_length=4, blank=True, null=True) - slideshowimage_margintop = models.CharField(max_length=4, blank=True, null=True) - slideshowimage_marginleft = models.CharField(max_length=4, blank=True, null=True) - is_public = models.BooleanField(default=True) - - class Meta: - ordering = ('-pub_date',) - - def admin_thumbnail(self): - return force_text('' % (self.get_absolute_url(), self.get_small_square_url())) - admin_thumbnail.allow_tags = True - admin_thumbnail.short_description = 'Thumbnail' - - def get_local_medium_url(self): - return '%sflickr/med/%s/%s.jpg' % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.flickr_id) - - def get_local_orig_url(self): - return '%s/flickr/full/%s/%s.jpg' % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), self.flickr_id) - - def get_local_slideshow_url(self): - return '%sslideshow/%s/%s.jpg' % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.flickr_id) - - def __str__(self): - return self.title - - def get_absolute_url(self): - return "/photo/%s/" % (self.id) - - def get_model_name(self): - return 'photo' - - def get_small_square_url(self): - return self.get_pic_url(size="small_square") - - def get_large_url(self): - return self.get_pic_url(size="large") - - def get_small_url(self): - return self.get_pic_url(size="small") - - def get_medium_url(self): - return self.get_pic_url(size="medium") - - def get_original_url(self): - # return self.get_pic_url(size="original") - return "http://farm%s.static.flickr.com/%s/%s_%s_o.jpg" % (self.flickr_farm, self.flickr_server, self.flickr_id, self.flickr_originalsecret) - - def get_retina_slideshow_url(self): - return '%sslideshow/%s/%sx2.jpg' % (settings.IMAGES_URL, self.pub_date.strftime("%Y"), self.flickr_id) - - def has_retina(self): - return os.path.isfile('%s/slideshow/%s/%sx2.jpg' % (settings.IMAGES_ROOT, self.pub_date.strftime("%Y"), self.flickr_id)) - - @property - def get_height(self): - im = Image.open('%s/slideshow/%s/%s.jpg' % (settings.IMAGES_ROOT, - self.pub_date.strftime("%Y"), self.flickr_id)) - xsize, ysize = im.size - return ysize - - @property - def get_width(self): - im = Image.open('%s/slideshow/%s/%s.jpg' % (settings.IMAGES_ROOT, - self.pub_date.strftime("%Y"), self.flickr_id)) - xsize, ysize = im.size - return xsize - - @property - def get_margin_top(self): - im = Image.open('%s/slideshow/%s/%s.jpg' % (settings.IMAGES_ROOT, - self.pub_date.strftime("%Y"), self.flickr_id)) - xsize, ysize = im.size - mtop = 340 - (ysize / 2) - return mtop - - @property - def get_margin_left(self): - im = Image.open('%s/slideshow/%s/%s.jpg' % (settings.IMAGES_ROOT, - self.pub_date.strftime("%Y"), self.flickr_id)) - xsize, ysize = im.size - mtop = 500 - (xsize / 2) - return mtop - - @property - def flickr_link(self): - return '%s%s/' % ('http://www.flickr.com/photos/luxagraf/', self.flickr_id) - - @property - def is_portait(self): - if int(self.slideshowimage_height) > int(self.slideshowimage_width): - return True - else: - return False - - def get_pic_url(self, size='small'): - # small_square=75x75 - # thumb=100 on longest side - # small=240 on longest side - # medium=500 on longest side - # large=1024 on longest side - # original=duh - base_url = "http://static.flickr.com" - size_char = 's' # default to small_square - if size == 'small_square': - size_char = '_s' - elif size == 'thumb': - size_char = '_t' - elif size == 'small': - size_char = '_m' - elif size == 'medium': - size_char = '' - elif size == 'large': - size_char = '_b' - elif size == 'original': - size_char = '_o' - - return "http://farm%s.static.flickr.com/%s/%s_%s%s.jpg" % (self.flickr_farm, self.flickr_server, self.flickr_id, self.flickr_secret, size_char) - - def get_tumble_image(self): - return "%s/crops/%s/%s.jpg" % (settings.IMAGES_URL, self.pub_date.strftime("%Y/%b").lower(), self.id) - - def get_previous_published(self): - return self.get_previous_by_pub_date() - - def get_next_published(self): - return self.get_next_by_pub_date() - - def comment_period_open(self): - return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date - - def save(self, *args, **kwargs): - super(Photo, self).save() - - -class PhotoGallery(models.Model): - set_id = models.CharField(blank=True, max_length=300) - set_title = models.CharField(blank=True, max_length=300) - set_desc = models.TextField(blank=True, null=True) - set_slug = models.CharField(blank=True, max_length=300) - primary = models.CharField(blank=True, max_length=300) - photos = models.ManyToManyField(Photo) - location = models.ForeignKey("locations.Location", on_delete=models.CASCADE, null=True) - region = models.ForeignKey("locations.Region", on_delete=models.CASCADE, null=True) - pub_date = models.DateTimeField(null=True) - - class Meta: - ordering = ('-pub_date', 'id') - verbose_name_plural = 'Photo Galleries' - get_latest_by = 'pub_date' - - def __str__(self): - return self.set_title - - def get_main_image(self): - return "%sgallery_thumbs/%s.jpg" % (settings.IMAGES_URL, self.id) - - def get_absolute_url(self): - return "/photos/galleries/%s/" % (self.set_slug) - - -class PhotoGallerySitemap(Sitemap): - changefreq = "never" - priority = 0.7 - protocol = "https" - - def items(self): - return PhotoGallery.objects.all() - - def lastmod(self, obj): - return obj.pub_date - - -def resize_luximage(self, image): - image.save() - img = Image.open(image.image.path) - base_path = "%s/galleries/" % settings.IMAGES_ROOT - if img.size[0] > img.size[1]: - resize_image(img, 2280, None, 65, base_path+'large/', image.get_image_name()) - resize_image(img, 1140, None, 72, base_path+'medium/', image.get_image_name()) - resize_image(img, 720, None, 68, base_path+'small/', image.get_image_name()) - if img.size[1] > img.size[0]: - resize_image(img, None, 1600, 65, base_path+'large/', image.get_image_name()) - resize_image(img, None, 800, 72, base_path+'medium/', image.get_image_name()) - resize_image(img, None, 460, 60, base_path+'small/', image.get_image_name()) - - resize_image(img, 160, None, 68, base_path+'thumb/', image.get_image_name()) diff --git a/app/photos/photos.js b/app/photos/photos.js deleted file mode 100644 index b93467a..0000000 --- a/app/photos/photos.js +++ /dev/null @@ -1,71 +0,0 @@ -//Utility functions for map info window -function mapit(obj) { - lat = parseFloat(obj.attr('data-latitude')); - lon = parseFloat(obj.attr('data-longitude')); - elid= obj.attr('data-imgid'); - map = L.map(document.getElementById("mw-"+elid)); - centerCoord = new L.LatLng(lat, lon); - zoom = 8; - L.tileLayer.provider('Esri.WorldTopoMap', {maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Tiles © Esri and the GIS User Community'}).addTo(map); - map.setView(centerCoord, zoom); - L.marker([lat, lon]).addTo(map); -} - //########## utility functions to create/remove map container ############ -function create_map(obj) { - //find id of this image caption: - var imgid = obj.attr('data-imgid'); - //create container divs - $('
').insertBefore($(obj).parent().parent()); - //$(obj).parent().parent().parent().prepend('
'); - $('#mc-'+imgid).append('
'); - //deal with the variable height of div.legend - $('#mc-'+imgid).css({ - bottom: function(index, value) { - return parseFloat($(obj).parent().parent().height())+20; - } - }); - - mapit(obj); -} -function remove_map(imgid) { - $('#mc-'+imgid).remove(); -} - -//############ Document.ready events ############## -$(document).ready(function(){ - - //set up click events for map button - $('.map-link').click( function() { - imgid = $(this).attr('data-imgid'); - if ($('#mc-'+imgid).is(":visible")) { - remove_map(imgid); - } else { - create_map($(this)); - } - return false; - - }); - var $ele = $('#slides').children(); - var $curr = 0; - $(document).bind('keydown', function (e) { - var code = e.which; - switch (code) { - case 39: - if ($curr <= $ele.size()) { - $.scrollTo($ele[$curr], 800 ); - $curr++; - } - break; - case 37: - if ($curr > 0) { - $curr--; - var $now = $curr; - $now--; - $.scrollTo($ele[$now], 800 ); - } - break; - } - return; - }); -}); - diff --git a/app/photos/readexif.py b/app/photos/readexif.py deleted file mode 100644 index 70a6987..0000000 --- a/app/photos/readexif.py +++ /dev/null @@ -1,78 +0,0 @@ -import time -from fractions import Fraction - -from django.contrib.gis.geos import Point - -import exiftool - -from locations.models import Location - - -def readexif(image): - """ - takes an image and fills in all the exif data tracked in the image model - - """ - with exiftool.ExifTool() as et: - meta = et.get_metadata(image.image.path) - et.terminate() - image.exif_raw = meta - try: - image.title = meta["EXIF:ImageDescription"] - except: - try: - image.title = meta["XMP:Title"] - except: - pass - try: - image.caption = meta["EXIF:UserComment"] - except: - pass - try: - image.exif_lens = meta["MakerNotes:LensType"] - except: - try: - image.exif_lens = meta["XMP:Lens"] - except: - pass - try: - image.exif_aperture = meta["EXIF:FNumber"] - except: - pass - try: - image.exif_make = meta["EXIF:Make"] - except: - pass - try: - image.exif_model = meta["EXIF:Model"] - except: - pass - try: - image.exif_exposure = str(Fraction(float(meta["EXIF:ExposureTime"])).limit_denominator()) - except: - pass - try: - image.exif_iso = meta["EXIF:ISO"] - except: - pass - try: - image.exif_focal_length = meta["EXIF:FocalLength"] - except: - pass - try: - fmt_date = time.strptime(meta["EXIF:DateTimeOriginal"], "%Y:%m:%d %H:%M:%S") - except: - pass - try: - image.exif_date = time.strftime("%Y-%m-%d %H:%M:%S", fmt_date) - except: - pass - try: - image.height = meta["File:ImageHeight"] - except: - pass - try: - image.width = meta["File:ImageWidth"] - except: - pass - return image diff --git a/app/photos/resize.py b/app/photos/resize.py deleted file mode 100644 index 13c0151..0000000 --- a/app/photos/resize.py +++ /dev/null @@ -1,53 +0,0 @@ -import os -import io - -from django.conf import settings - -try: - import Image - import ImageFile -except ImportError: - try: - from PIL import Image - from PIL import ImageFile - except ImportError: - raise ImportError("Could not import the Python Imaging Library.") - -ImageFile.MAXBLOCK = 1000000 - - -def make_local_copies(self,photo): - orig_dir = settings.IMAGES_ROOT + '/flickr/full/' + photo.pub_date.strftime("%Y") - if not os.path.isdir(orig_dir): - os.makedirs(orig_dir) - im = io.StringIO(fname.read().decode('UTF-8')) # constructs a StringIO holding the image - img = Image.open(im) - local_full = '%s/%s.jpg' % (orig_dir, photo.flickr_id) - img.save(local_full) - - #calculate crop: - cur_width, cur_height = img.size - new_width, new_height = 291, 350 - ratio = max(float(new_width) / cur_width, float(new_height) / cur_height) - x = (cur_width * ratio) - y = (cur_height * ratio) - xd = abs(new_width - x) - yd = abs(new_height - y) - x_diff = int(xd / 2) - y_diff = int(yd / 2) - box = (int(x_diff), int(y_diff), int(x_diff + new_width), int(y_diff + new_height)) - - # create resized file - resized = img.resize((int(x), int(y)), Image.ANTIALIAS).crop(box) - # save resized file - resized_filename = '%s/%s.jpg' % (crop_dir, set.id) - try: - if img.format == 'JPEG': - resized.save(resized_filename, 'JPEG', quality=95, optimize=True) - else: - resized.save(resized_filename) - except IOError as e: - if os.path.isfile(resized_filename): - os.unlink(resized_filename) - raise e - os.unlink(img) diff --git a/app/photos/retriever.py b/app/photos/retriever.py deleted file mode 100644 index f5cae68..0000000 --- a/app/photos/retriever.py +++ /dev/null @@ -1,323 +0,0 @@ -import json -import datetime -import os -import io -import urllib.request -import urllib.parse -import urllib.error - -from django.template.defaultfilters import slugify -from django.core.exceptions import ObjectDoesNotExist -from django.utils.encoding import force_text -from django.conf import settings - -from photos.models import Photo, PhotoGallery - -# from https://github.com/alexis-mignon/python-flickr-api -# terribly documented, but offers a good clean OOP approach if you're willing to figure it out... -import flickr_api -import flickrapi - -# Required PIL classes may or may not be available from the root namespace depending on the installation -try: - import Image - import ImageFile -except ImportError: - try: - from PIL import Image - from PIL import ImageFile - except ImportError: - raise ImportError("Could not import the Python Imaging Library.") - -ImageFile.MAXBLOCK = 1000000 - -EXIF_PARAMS = { - "FNumber": 'f/2.8', - "Make": 'Apple', - "Model": 'iPhone', - "ExposureTime": '', - "ISO": '', - "FocalLength": '', - "LensModel": '', - 'DateTimeOriginal': '2013:09:03 22:44:25' -} - -class SyncFlickr(): - - def __init__(self): - self.flickr = flickrapi.FlickrAPI(settings.FLICKR_API_KEY, settings.FLICKR_API_SECRET,format='parsed-json') - - - def sync_sets(self, *args, **kwargs): - p = self.flickr.photosets.getList(user_id='85322932@N00') - disregard = [ - 'POTD 2008', - 'Snow Day', - 'Wedding', - 'Some random stuff', - 'Lilah & Olivia', - '6 months+', - '6-9 months', - '9-18 months', - ] - for photoset in p['photosets']['photoset']: - if photoset['title']['_content'] in disregard: - pass - else: - try: - row = PhotoGallery.objects.get(set_id__exact=photoset['id']) - print(('%s %s %s' % ('already have', row.set_title, 'moving on...'))) - # okay it already exists, but is it up-to-date? - self.get_photos_in_set(photoset['id'],row) - except ObjectDoesNotExist: - s = PhotoGallery.objects.get_or_create( - set_id=force_text(photoset['id']), - set_title=force_text(photoset['title']['_content']), - set_desc=force_text(photoset['description']['_content']), - set_slug=slugify(force_text(photoset['title']['_content'])[:40]), - primary=force_text(photoset['primary']), - pub_date=datetime.datetime.fromtimestamp(float(photoset['date_create'])) - ) - - #get_photos_in_set(photoset, s) - #create the gallery thumbnail image: - #photo = Photo.objects.get(flickr_id__exact=str(photoset['primary'])) - #make_gallery_thumb(photo, s) - - - - def get_photos_in_set(self, flickr_id, photoset): - photos = self.flickr.photosets.getPhotos(photoset_id=flickr_id) - for photo in photos['photoset']['photo']: - try: - p = Photo.objects.get(flickr_id__exact=str(photo['id'])) - except ObjectDoesNotExist: - p = self.get_photo(photo['id']) - if p.is_public: - pass #photoset.photos.add(p) - #slideshow_image(p, 1000, 800, 95) - print(p) - - def get_photo(self, photo_id): - photo = self.flickr.photos.getInfo(photo_id=photo_id) - info = photo['photo'] - try: - geo = self.flickr.photos.geo.getLocation(photo_id=photo_id) - location, region = self.get_geo(float(geo['photo']['location']['latitude']), float(geo['photo']['location']['longitude'])) - except KeyError: - print("no effing geodata asshat") - exif = self.exif_handler(self.flickr.photos.getExif(photo_id=photo_id)['photo']['exif']) - p, created = Photo.objects.get_or_create( - title=info['title']['_content'], - flickr_id=info['id'], - flickr_owner=info['owner']['nsid'], - flickr_server=info['server'], - flickr_secret=info['secret'], - flickr_originalsecret=info['originalsecret'], - flickr_farm=info['farm'], - pub_date=self.flickr_datetime_to_datetime(exif["DateTimeOriginal"].replace(':', '-', 2)), - description=info['description']['_content'], - exif_aperture=exif['FNumber'], - exif_make=exif['Make'], - exif_model=exif['Model'], - exif_exposure=exif['ExposureTime'], - exif_iso=exif['ISO'], - exif_lens=exif['LensModel'], - exif_focal_length=exif['FocalLength'], - exif_date=self.flickr_datetime_to_datetime(exif["DateTimeOriginal"].replace(':', '-', 2)), - lat=float(geo['photo']['location']['latitude']), - lon=float(geo['photo']['location']['longitude']), - region=region, - location=location, - ) - if created: - for tag in info['tags']['tag']: - p.tags.add(tag['raw']) - p.save() - - local = FlickrImage() - local.make_local_copies(p) - #retina image: - #slideshow_image(p, 2000, 1600, 75) - #normal image - print("grabbing... "+p.title) - return p - - - def sync_flickr_photos(self, *args, **kwargs): - photos = self.flickr.people.getPhotos(user_id="85322932@N00", extras="date_upload,date_taken,geo") - for photo in photos['photos']['photo']: - try: - row = Photo.objects.get(flickr_id=photo['id'], flickr_secret=photo['secret']) - print('already have ' + photo['id'] + ' moving on') - except ObjectDoesNotExist: - p = self.get_photo(photo['id']) - - - - """ - ################################################ - ## Various meta data and geo helper functions ## - ################################################ - """ - - def exif_handler(self, data): - converted = {} - try: - for t in data: - converted[t['tag']] = t['raw']['_content'] - except: - pass - for k, v in list(EXIF_PARAMS.items()): - if k not in converted: - converted[k] = v - return converted - - - def flickr_datetime_to_datetime(self, fdt): - from datetime import datetime - from time import strptime - date_parts = strptime(fdt, '%Y-%m-%d %H:%M:%S') - return datetime(*date_parts[0:6]) - - - def get_geo(self, lat, lon): - from locations.models import Location, Region - from django.contrib.gis.geos import Point - pnt_wkt = Point(lon, lat) - try: - location = Location.objects.get(geometry__contains=pnt_wkt) - except Location.DoesNotExist: - location = None - try: - region = Region.objects.get(geometry__contains=pnt_wkt) - except Region.DoesNotExist: - region = None - return location, region - - - - - - -class FlickrImage(): - """ - ## Photo retrieval functions to pull down images from Flickr servers ## - """ - - def slideshow_image(self, photo, max_width, max_height, quality): - slide_dir = settings.IMAGES_ROOT + '/slideshow/' + photo.pub_date.strftime("%Y") - if not os.path.isdir(slide_dir): - os.makedirs(slide_dir) - - # Is it a retina image or not? - if max_width >= 1001 or max_height >= 801: - filename = '%s/%sx2.jpg' % (slide_dir, photo.flickr_id) - else: - filename = '%s/%s.jpg' % (slide_dir, photo.flickr_id) - - flickr_photo = photo.get_original_url() - fname = urllib.request.urlopen(flickr_photo) - im = io.StringIO(fname.read().decode('UTF-8')) # constructs a StringIO holding the image - img = Image.open(im) - cur_width, cur_height = img.size - #if image landscape - if cur_width > cur_height: - new_width = max_width - #check to make sure we aren't upsizing - if cur_width > new_width: - ratio = float(new_width) / cur_width - x = (cur_width * ratio) - y = (cur_height * ratio) - resized = img.resize((int(x), int(y)), Image.ANTIALIAS) - resized.save(filename, 'JPEG', quality=quality, optimize=True) - else: - img.save(filename) - else: - #image portrait - new_height = max_height - #check to make sure we aren't upsizing - if cur_height > new_height: - ratio = float(new_height) / cur_height - x = (cur_width * ratio) - y = (cur_height * ratio) - resized = img.resize((int(x), int(y)), Image.ANTIALIAS) - resized.save(filename, 'JPEG', quality=quality, optimize=True) - else: - img.save(filename) - photo.slideshowimage_width = photo.get_width - photo.slideshowimage_height = photo.get_height - photo.slideshowimage_margintop = photo.get_margin_top - photo.slideshowimage_marginleft = photo.get_margin_left - photo.save() - #now resize the local copy - - - def make_local_copies(self,photo): - orig_dir = settings.IMAGES_ROOT + '/flickr/full/' + photo.pub_date.strftime("%Y") - if not os.path.isdir(orig_dir): - os.makedirs(orig_dir) - full = photo.get_original_url() - fname = urllib.request.urlopen(full) - im = io.StringIO(fname.read().decode('UTF-8')) # constructs a StringIO holding the image - img = Image.open(im) - local_full = '%s/%s.jpg' % (orig_dir, photo.flickr_id) - img.save(local_full) - #save large size - large_dir = settings.IMAGES_ROOT + '/flickr/large/' + photo.pub_date.strftime("%Y") - if not os.path.isdir(large_dir): - os.makedirs(large_dir) - large = photo.get_large_url() - fname = urllib.request.urlopen(large) - im = io.StringIO(fname.read().decode('UTF-8')) # constructs a StringIO holding the image - img = Image.open(im) - local_large = '%s/%s.jpg' % (large_dir, photo.flickr_id) - if img.format == 'JPEG': - img.save(local_large) - #save medium size - med_dir = settings.IMAGES_ROOT + '/flickr/med/' + photo.pub_date.strftime("%Y") - if not os.path.isdir(med_dir): - os.makedirs(med_dir) - med = photo.get_medium_url() - fname = urllib.request.urlopen(med) - im = io.StringIO(fname.read().decode('UTF-8')) # constructs a StringIO holding the image - img = Image.open(im) - local_med = '%s/%s.jpg' % (med_dir, photo.flickr_id) - img.save(local_med) - - - def make_gallery_thumb(self, photo, set): - crop_dir = settings.IMAGES_ROOT + '/gallery_thumbs/' - if not os.path.isdir(crop_dir): - os.makedirs(crop_dir) - remote = photo.get_original_url() - print(remote) - fname = urllib.request.urlopen(remote) - im = io.StringIO(fname.read().decode('UTF-8')) # constructs a StringIO holding the image - img = Image.open(im) - #calculate crop: - cur_width, cur_height = img.size - new_width, new_height = 291, 350 - ratio = max(float(new_width) / cur_width, float(new_height) / cur_height) - x = (cur_width * ratio) - y = (cur_height * ratio) - xd = abs(new_width - x) - yd = abs(new_height - y) - x_diff = int(xd / 2) - y_diff = int(yd / 2) - box = (int(x_diff), int(y_diff), int(x_diff + new_width), int(y_diff + new_height)) - - # create resized file - resized = img.resize((int(x), int(y)), Image.ANTIALIAS).crop(box) - # save resized file - resized_filename = '%s/%s.jpg' % (crop_dir, set.id) - try: - if img.format == 'JPEG': - resized.save(resized_filename, 'JPEG', quality=95, optimize=True) - else: - resized.save(resized_filename) - except IOError as e: - if os.path.isfile(resized_filename): - os.unlink(resized_filename) - raise e - os.unlink(img) diff --git a/app/photos/retriever.py.bak b/app/photos/retriever.py.bak deleted file mode 100644 index d3c572a..0000000 --- a/app/photos/retriever.py.bak +++ /dev/null @@ -1,314 +0,0 @@ -from __future__ import division -import datetime -import os -import cStringIO -import urllib - -from django.template.defaultfilters import slugify -from django.core.exceptions import ObjectDoesNotExist -from django.utils.encoding import force_unicode -from django.conf import settings - -# Required PIL classes may or may not be available from the root namespace -# depending on the installation -try: - import Image - import ImageFile -except ImportError: - try: - from PIL import Image - from PIL import ImageFile - except ImportError: - raise ImportError("Could not import the Python Imaging Library.") - -ImageFile.MAXBLOCK = 1000000 - -from photos.models import Photo, PhotoGallery - -# from https://github.com/alexis-mignon/python-flickr-api -# terribly documented, but offers a good clean OOP approach if you're willing to figure it out... -import flickr_api - -EXIF_PARAMS = { - "FNumber": 'f/2.8', - "Make": 'Apple', - "Model": 'iPhone', - "ExposureTime": '', - "ISO": '', - "FocalLength": '', - "LensModel": '', - 'DateTimeOriginal': '2013:09:03 22:44:25' -} - - -def sync_flickr_photos(*args, **kwargs): - flickr_api.set_keys(api_key=settings.FLICKR_API_KEY, api_secret=settings.FLICKR_API_SECRET) - flickr_api.set_auth_handler("app/photos/flickrauth") - user = flickr_api.test.login() - photos = user.getPhotos(extras="date_upload,date_taken,geo") - # reverse! reverse! - photos.reverse() - for photo in photos: - info = photo.getInfo() - try: - row = Photo.objects.get(flickr_id=info['id'], flickr_secret=info['secret']) - print('already have ' + info['id'] + ' moving on') - except ObjectDoesNotExist: - get_photo(photo) - - -def get_photo(photo): - info = photo.getInfo() - geo = photo.getLocation() - location, region = get_geo(float(geo['latitude']), float(geo['longitude'])) - exif = exif_handler(photo.getExif()) - p, created = Photo.objects.get_or_create( - title=info['title'], - flickr_id=info['id'], - flickr_owner=info['owner']['id'], - flickr_server=info['server'], - flickr_secret=info['secret'], - flickr_originalsecret=info['originalsecret'], - flickr_farm=info['farm'], - pub_date=flickr_datetime_to_datetime(info['taken']), - description=info['description'], - exif_aperture=exif['FNumber'], - exif_make=exif['Make'], - exif_model=exif['Model'], - exif_exposure=exif['ExposureTime'], - exif_iso=exif['ISO'], - exif_lens=exif['LensModel'], - exif_focal_length=exif['FocalLength'], - exif_date=flickr_datetime_to_datetime(exif["DateTimeOriginal"].replace(':', '-', 2)), - lat=float(geo['latitude']), - lon=float(geo['longitude']), - region=region, - location=location, - ) - if created: - for tag in info['tags']: - p.tags.add(tag['raw']) - p.save() - make_local_copies(p) - #retina image: - #slideshow_image(p, 2000, 1600, 75) - #normal image - print(p.title) - return p - - -def sync_sets(*args, **kwargs): - flickr_api.set_keys(api_key=settings.FLICKR_API_KEY, api_secret=settings.FLICKR_API_SECRET) - flickr_api.set_auth_handler("app/photos/flickrauth") - user = flickr_api.test.login() - photosets = user.getPhotosets() - # reverse! reverse! - photosets.reverse() - disregard = [ - 'POTD 2008', - 'Snow Day', - 'Wedding', - 'Some random stuff', - 'Lilah & Olivia', - '6 months+', - '6-9 months', - '9-18 months', - ] - for photoset in photosets: - if photoset['title'] in disregard: - pass - else: - try: - row = PhotoGallery.objects.get(set_id__exact=photoset['id']) - print('%s %s %s' % ('already have', row.set_title, 'moving on...')) - # okay it already exists, but is it up-to-date? - #get_photos_in_set(row,set.id) - except ObjectDoesNotExist: - s = PhotoGallery.objects.create( - set_id=force_unicode(photoset['id']), - set_title=force_unicode(photoset['title']), - set_desc=force_unicode(photoset['description']), - set_slug=slugify(force_unicode(photoset['title'])), - primary=force_unicode(photoset['primary']), - pub_date=datetime.datetime.fromtimestamp(float(photoset['date_create'])) - ) - - get_photos_in_set(photoset, s) - #create the gallery thumbnail image: - photo = Photo.objects.get(flickr_id__exact=str(photoset['primary'])) - make_gallery_thumb(photo, s) - - -def get_photos_in_set(flickr_photoset, photoset): - for photo in flickr_photoset.getPhotos(): - try: - p = Photo.objects.get(flickr_id__exact=str(photo['id'])) - except ObjectDoesNotExist: - p = get_photo(photo) - if p.is_public: - photoset.photos.add(p) - slideshow_image(p, 1000, 800, 95) - - -################################################ -## Various meta data and geo helper functions ## -################################################ - - -def exif_handler(data): - converted = {} - try: - for t in data: - converted[t['tag']] = t['raw'] - except: - pass - for k, v in EXIF_PARAMS.items(): - if not converted.has_key(k): - converted[k] = v - return converted - - -def flickr_datetime_to_datetime(fdt): - from datetime import datetime - from time import strptime - date_parts = strptime(fdt, '%Y-%m-%d %H:%M:%S') - return datetime(*date_parts[0:6]) - -def get_geo(lat,lon): - from locations.models import Location, Region - from django.contrib.gis.geos import Point - pnt_wkt = Point(lon, lat) - try: - location = Location.objects.get(geometry__contains=pnt_wkt) - except Location.DoesNotExist: - location = None - try: - region = Region.objects.get(geometry__contains=pnt_wkt) - except Region.DoesNotExist: - region = None - return location, region - -####################################################################### -## Photo retrieval functions to pull down images from Flickr servers ## -####################################################################### - -def slideshow_image(photo,max_width, max_height, quality): - slide_dir = settings.IMAGES_ROOT + '/slideshow/'+ photo.pub_date.strftime("%Y") - if not os.path.isdir(slide_dir): - os.makedirs(slide_dir) - - # Is it a retina image or not? - if max_width >= 1001 or max_height >= 801: - filename = '%s/%sx2.jpg' %(slide_dir, photo.flickr_id) - else: - filename = '%s/%s.jpg' %(slide_dir, photo.flickr_id) - - flickr_photo = photo.get_original_url() - fname = urllib.urlopen(flickr_photo) - im = cStringIO.StringIO(fname.read()) # constructs a StringIO holding the image - img = Image.open(im) - cur_width, cur_height = img.size - #if image landscape - if cur_width > cur_height: - new_width = max_width - #check to make sure we aren't upsizing - if cur_width > new_width: - ratio = float(new_width)/cur_width - x = (cur_width * ratio) - y = (cur_height * ratio) - resized = img.resize((int(x), int(y)), Image.ANTIALIAS) - resized.save(filename, 'JPEG', quality=quality, optimize=True) - else: - img.save(filename) - else: - #image portrait - new_height = max_height - #check to make sure we aren't upsizing - if cur_height > new_height: - ratio = float(new_height)/cur_height - x = (cur_width * ratio) - y = (cur_height * ratio) - resized = img.resize((int(x), int(y)), Image.ANTIALIAS) - resized.save(filename, 'JPEG', quality=quality, optimize=True) - else: - img.save(filename) - photo.slideshowimage_width = photo.get_width - photo.slideshowimage_height = photo.get_height - photo.slideshowimage_margintop = photo.get_margin_top - photo.slideshowimage_marginleft = photo.get_margin_left - photo.save() - #now resize the local copy - - - -def make_local_copies(photo): - orig_dir = settings.IMAGES_ROOT + '/flickr/full/'+ photo.pub_date.strftime("%Y") - if not os.path.isdir(orig_dir): - os.makedirs(orig_dir) - full = photo.get_original_url() - fname = urllib.urlopen(full) - im = cStringIO.StringIO(fname.read()) # constructs a StringIO holding the image - img = Image.open(im) - local_full = '%s/%s.jpg' %(orig_dir, photo.flickr_id) - img.save(local_full) - #save large size - large_dir = settings.IMAGES_ROOT + '/flickr/large/'+ photo.pub_date.strftime("%Y") - if not os.path.isdir(large_dir): - os.makedirs(large_dir) - large = photo.get_large_url() - fname = urllib.urlopen(large) - im = cStringIO.StringIO(fname.read()) # constructs a StringIO holding the image - img = Image.open(im) - local_large = '%s/%s.jpg' %(large_dir, photo.flickr_id) - if img.format == 'JPEG': - img.save(local_large) - #save medium size - med_dir = settings.IMAGES_ROOT + '/flickr/med/'+ photo.pub_date.strftime("%Y") - if not os.path.isdir(med_dir): - os.makedirs(med_dir) - med = photo.get_medium_url() - fname = urllib.urlopen(med) - im = cStringIO.StringIO(fname.read()) # constructs a StringIO holding the image - img = Image.open(im) - local_med = '%s/%s.jpg' %(med_dir, photo.flickr_id) - img.save(local_med) - -def make_gallery_thumb(photo,set): - crop_dir = settings.IMAGES_ROOT + '/gallery_thumbs/' - if not os.path.isdir(crop_dir): - os.makedirs(crop_dir) - remote = photo.get_original_url() - print(remote) - fname = urllib.urlopen(remote) - im = cStringIO.StringIO(fname.read()) # constructs a StringIO holding the image - img = Image.open(im) - - #calculate crop: - cur_width, cur_height = img.size - new_width, new_height = 291, 350 - ratio = max(float(new_width)/cur_width,float(new_height)/cur_height) - x = (cur_width * ratio) - y = (cur_height * ratio) - xd = abs(new_width - x) - yd = abs(new_height - y) - x_diff = int(xd / 2) - y_diff = int(yd / 2) - box = (int(x_diff), int(y_diff), int(x_diff+new_width), int(y_diff+new_height)) - - #create resized file - resized = img.resize((int(x), int(y)), Image.ANTIALIAS).crop(box) - # save resized file - resized_filename = '%s/%s.jpg' %(crop_dir, set.id) - try: - if img.format == 'JPEG': - resized.save(resized_filename, 'JPEG', quality=95, optimize=True) - else: - resized.save(resized_filename) - except IOError, e: - if os.path.isfile(resized_filename): - os.unlink(resized_filename) - raise e - #os.unlink(img) - - - diff --git a/app/photos/static/image-preview.js b/app/photos/static/image-preview.js deleted file mode 100644 index b8fead5..0000000 --- a/app/photos/static/image-preview.js +++ /dev/null @@ -1,42 +0,0 @@ -function build_image_preview () { - var url = window.location.href - var cur = url.split('/')[6]; - if (cur) { - var container = document.createElement("div"); - container.className = "form-row field-image"; - var wrapper = document.createElement("div"); - var label = document.createElement("label"); - label.textContent = "Image:"; - var pwrap = document.createElement("p"); - var img = document.createElement("img"); - - var request = new XMLHttpRequest(); - request.open('GET', '/photos/luximage/data/admin/preview/'+cur+'/', true); - request.onload = function() { - if (request.status >= 200 && request.status < 400) { - var data = JSON.parse(request.responseText); - //console.log(data); - img.src = data['url']; - } else { - console.log("server error"); - } - }; - request.onerror = function() { - console.log("error on request"); - }; - request.send(); - pwrap.appendChild(img); - wrapper.appendChild(label); - wrapper.appendChild(pwrap); - container.appendChild(wrapper); - parent = document.getElementById("luximage_form"); - node = parent.children[1].children[0]; - node.parentNode.insertBefore(container, node.previousSibling); - } else { - return; - } -} - -document.addEventListener("DOMContentLoaded", function(event) { - build_image_preview(); -}); diff --git a/app/photos/static/my_styles.css b/app/photos/static/my_styles.css deleted file mode 100644 index d13c8e4..0000000 --- a/app/photos/static/my_styles.css +++ /dev/null @@ -1,40 +0,0 @@ - -/*o.v.*/ - -#id_featured_image { - /*style the "box" in its minimzed state*/ - border:1px solid black; width:230px; overflow:hidden; - height:300px; overflow-y:scroll; - /*animate collapsing the dropdown from open to closed state (v. fast)*/ -} -#id_featured_image input { - /*hide the nasty default radio buttons. like, completely!*/ - position:absolute;top:0;left:0;opacity:0; -} - - -#id_featured_image label { - /*style the labels to look like dropdown options, kinda*/ - color: #000; - display:block; - margin: 2px 2px 2px 10px; - height:102px; - opacity:.6; - background-repeat: no-repeat; -} -#id_featured_image:hover label{ - /*this is how labels render in the "expanded" state. we want to see only the selected radio button in the collapsed menu, and all of them when expanded*/ -} -#id_featured_image label:hover { - opacity:.8; -} -#id_featured_image input:checked + label { - /*tricky! labels immediately following a checked radio button (with our markup they are semantically related) should be fully opaque regardless of hover, and they should always be visible (i.e. even in the collapsed menu*/ - opacity:1 !important; - display:block; - background: #333; -} - -/*pfft, nothing as cool here, just the value trace*/ -#trace {margin:0 0 20px;} -#id_featured_image li:first-child { display: none;} diff --git a/app/photos/sync_photo_sets.py b/app/photos/sync_photo_sets.py deleted file mode 100644 index e31d6e4..0000000 --- a/app/photos/sync_photo_sets.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys -import os -from os.path import dirname, abspath -PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/' -# PROJECT_ROOT = abspath(dirname(dirname(__file__))) -print PROJECT_ROOT -sys.path.append(PROJECT_ROOT) -sys.path.append(PROJECT_ROOT + '/app') -sys.path.append(PROJECT_ROOT + '/app/lib') -sys.path.append(PROJECT_ROOT + '/config') -sys.path.append('/home/luxagraf/apps/venv/bin/python2.7/') -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.settings' -from photos import retriever -retriever.sync_sets() diff --git a/app/photos/sync_photos.py b/app/photos/sync_photos.py deleted file mode 100644 index 886d221..0000000 --- a/app/photos/sync_photos.py +++ /dev/null @@ -1,13 +0,0 @@ -import sys -import os -from os.path import dirname, abspath -PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/' -# PROJECT_ROOT = abspath(dirname(dirname(__file__))) -sys.path.append(PROJECT_ROOT) -sys.path.append(PROJECT_ROOT + '/app') -sys.path.append(PROJECT_ROOT + '/app/lib') -sys.path.append(PROJECT_ROOT + '/config') -sys.path.append('/home/luxagraf/apps/venv/bin/python2.7/') -os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.settings' -from photos import retriever -retriever.sync_flickr_photos() diff --git a/app/photos/templatetags/__init__.py b/app/photos/templatetags/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/photos/templatetags/get_image_by_size.py b/app/photos/templatetags/get_image_by_size.py deleted file mode 100644 index c56c44e..0000000 --- a/app/photos/templatetags/get_image_by_size.py +++ /dev/null @@ -1,8 +0,0 @@ -from django import template - -register = template.Library() - -@register.simple_tag -def get_image_by_size(obj, *args): - method = getattr(obj, "get_image_by_size") - return method(*args) diff --git a/app/photos/templatetags/get_image_width.py b/app/photos/templatetags/get_image_width.py deleted file mode 100644 index ac39184..0000000 --- a/app/photos/templatetags/get_image_width.py +++ /dev/null @@ -1,9 +0,0 @@ -from math import floor -from django import template - -register = template.Library() - -@register.simple_tag -def get_image_width(obj, size, *args): - ratio = floor(int(size)*100/int(obj.height))/100 - return floor(ratio*int(obj.height)) diff --git a/app/photos/templatetags/get_size_by_name.py b/app/photos/templatetags/get_size_by_name.py deleted file mode 100644 index fc64a61..0000000 --- a/app/photos/templatetags/get_size_by_name.py +++ /dev/null @@ -1,8 +0,0 @@ -from django import template - -register = template.Library() - -@register.simple_tag -def get_size_by_name(obj, *args): - method = getattr(obj, "get_size_by_name") - return method(*args) diff --git a/app/photos/urls.py b/app/photos/urls.py deleted file mode 100644 index 6673135..0000000 --- a/app/photos/urls.py +++ /dev/null @@ -1,74 +0,0 @@ -from django.urls import path, re_path -from django.views.generic.base import RedirectView - -from . import views - -app_name = "photos" - -urlpatterns = [ - path( - r'daily/', - views.DailyPhotoList.as_view(), - name="daily_photo_list" - ), - path( - r'daily/', - views.DailyPhotoList.as_view(), - {'page': 1}, - name="daily_photo_list" - ), - path( - r'data/(/', - views.photo_json - ), - re_path( - r'data/admin/preview/(?P\d+)/$', - views.photo_preview_json, - name="admin_image_preview" - ), - re_path( - r'data/admin/tn/(?P\d+)/$', - views.thumb_preview_json, - name="admin_thumb_preview" - ), - re_path( - r'galleries/private/(?P[-\w]+)$', - views.PrivateGallery.as_view(), - name="private" - ), - re_path( - r'galleries/private/(?P\d+)/$', - views.PrivateGalleryList.as_view(), - name="private_list" - ), - re_path( - r'galleries/private/$', - RedirectView.as_view(url="/photos/galleries/private/1/", permanent=False) - ), - re_path( - r'galleries/(?P[-\w]+)$', - views.Gallery.as_view(), - name="private" - ), - re_path( - r'galleries/(?P\d+)/$', - views.GalleryList.as_view(), - name="private_list" - ), - re_path( - r'galleries/$', - RedirectView.as_view(url="/photos/galleries/1/", permanent=False) - ), - re_path( - r'(?P\d+)/$', - views.gallery_list, - ), - re_path( - r'(?P[-\w]+)/$', - RedirectView.as_view(url="/photos/%(slug)s/1/", permanent=False) - ), - re_path( - r'', - RedirectView.as_view(url="/photos/1/", permanent=False) - ), -] diff --git a/app/photos/utils.py b/app/photos/utils.py deleted file mode 100644 index 84e72f5..0000000 --- a/app/photos/utils.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import re -import subprocess - -from django.apps import apps -from django.conf import settings - -from PIL import ImageFile -from bs4 import BeautifulSoup -# pip install python-resize-image -from resizeimage import resizeimage - - -def resize_image(img, width=None, height=None, quality=72, base_path="", filename=""): - if width and height: - newimg = resizeimage.resize_cover(img, [width, height]) - if width and not height: - newimg = resizeimage.resize_width(img, width) - if height and not width: - newimg = resizeimage.resize_height(img, height) - if not os.path.isdir(base_path): - os.makedirs(base_path) - path = "%s%s" % (base_path, filename) - ImageFile.MAXBLOCK = img.size[0] * img.size[1] * 4 - newimg.save(path, newimg.format, quality=quality) - subprocess.call(["jpegoptim", "%s" % path]) - - diff --git a/app/photos/views.py b/app/photos/views.py deleted file mode 100644 index 070b40d..0000000 --- a/app/photos/views.py +++ /dev/null @@ -1,137 +0,0 @@ -import json -from django.shortcuts import render -from django.template import RequestContext -from django.http import Http404, HttpResponse -from django.core import serializers - -from .models import Photo, PhotoGallery, LuxGallery, LuxImage -from locations.models import Country, Region - -from utils.views import PaginatedListView -from django.views.generic import ListView -from django.views.generic.detail import DetailView - - -class PrivateGallery(DetailView): - model = LuxGallery - slug_field = "slug" - template_name = "details/photo_gallery.html" - - -class PrivateGalleryList(PaginatedListView): - template_name = 'archives/gallery_list.html' - - def get_queryset(self): - return LuxGallery.objects.filter(is_public=False) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(PrivateGalleryList, self).get_context_data(**kwargs) - context['is_private'] = True - return context - - -class Gallery(DetailView): - model = LuxGallery - slug_field = "slug" - template_name = "details/photo_gallery.html" - - -class GalleryList(PaginatedListView): - template_name = 'archives/gallery_list.html' - - def get_queryset(self): - return LuxGallery.objects.filter(is_public=True) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(GalleryList, self).get_context_data(**kwargs) - context['is_private'] = False - return context - - -class OldGalleryList(PaginatedListView): - template_name = 'archives/gallery_list.html' - model = PhotoGallery - - def get_queryset(self): - return PhotoGallery.objects.filter(is_public=True) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(OldGalleryList, self).get_context_data(**kwargs) - return context - - -class DailyPhotoList(PaginatedListView): - model=LuxImage - template_name = 'archives/photo_daily_list.html' - - def get_queryset(self): - return LuxImage.objects.filter(is_public=True, title__startswith="daily_") - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(DailyPhotoList, self).get_context_data(**kwargs) - context['breadcrumbs'] = ['daily',] - return context - - -def gallery_list(request, page): - request.page_url = '/photos/%d/' - request.page = int(page) - context = { - 'object_list': PhotoGallery.objects.all(), - 'page': page, - } - return render(request, "archives/photos.html", context) - - -def gallery(request, slug): - context = { - 'object': PhotoGallery.objects.get(set_slug=slug) - } - return render(request, 'details/photo_galleries.html', context) - - -def photo_json(request, slug): - p = PhotoGallery.objects.filter(set_slug=slug) - return HttpResponse(serializers.serialize('json', p), mimetype='application/json') - - -def photo_preview_json(request, pk): - p = LuxImage.objects.get(pk=pk) - data = {} - data['url'] = p.get_admin_image() - data = json.dumps(data) - return HttpResponse(data) - - -def thumb_preview_json(request, pk): - p = LuxImage.objects.get(pk=pk) - data = {} - data['url'] = p.get_admin_insert() - data = json.dumps(data) - return HttpResponse(data) - - -def gallery_list_by_area(request, slug, page): - """Grabs entries by region or country""" - request.page_url = '/photos/' + slug + '/%d/' - request.page = int(page) - try: - region = Region.objects.get(slug__exact=slug) - qs = PhotoGallery.objects.filter(region=region).order_by('-id') - except: - region = Country.objects.get(slug__exact=slug) - qs = PhotoGallery.objects.filter(location__state__country=region).order_by('-id') - if not region: - raise Http404 - context = { - 'object_list': qs, - 'country_list': Country.objects.filter(visited=True), - 'region_list': Region.objects.all(), - 'region': region, - 'page': page - } - return render(request, "archives/photos.html", context) diff --git a/app/unused_apps/bird.html b/app/unused_apps/bird.html deleted file mode 100644 index 43877fe..0000000 --- a/app/unused_apps/bird.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends 'base.html' %} -{% load get_image_by_size %} -{% block extrahead %} - -{% endblock %} -{% block bodyid %}class="birds"{%endblock%} -{% block primary %} -
-
-

{{object.common_name}}

-

{{object.scientific_name}}

-

Family {{object.bird_class.scientific_name}} ({{object.bird_class}})

-{% load get_image_by_size %} -{% load get_image_width %} -
-
-{{sighting.image.alt}} photographed by {% if sighting.image.photo_credit_source %}{{sighting.image.photo_credit_source}}{%else%}luxagraf{%endif%} -{% if sighting.image.photo_credit_source %}
photo by {{sighting.image.photo_credit_source}}
{%endif%} -
-
-{%if recording %} -
- -Audio recorded by {{recording.recorder}} on {{recording.pub_date|date:"F j, Y"}} in {{recording.location}}. © {{recording.copyright}} -
-{%endif%} -

Seen at {{sighting.location}}, {{sighting.location.comma_name}} in {{sighting.date|date:"M Y"}} by {% for person in sighting.seen_by.all %}{% if person.username == "luxagraf"%}Scott{%else%}{{person.username|capfirst}}{%endif%}{%if forloop.last %}{%else%}{% if forloop.revcounter == 2 %}, and {%else%}, {%endif%}{%endif%}{%endfor%}

-{% if recording.audio %} -{%endif%} -
-
-{% endblock %} - -{% block js %} - - - -{% endblock %} diff --git a/app/unused_apps/birds/__init__.py b/app/unused_apps/birds/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/birds/aba_importer.py b/app/unused_apps/birds/aba_importer.py deleted file mode 100644 index 93f5bef..0000000 --- a/app/unused_apps/birds/aba_importer.py +++ /dev/null @@ -1,16 +0,0 @@ -for row_index in range(sheet.nrows): - if sheet.cell(row_index, 0).value != '': - sci = sheet.cell(row_index, 0).value.split("(")[1].split(")")[0] - bc = BirdClass.objects.get(scientific_name__exact=sci) - common_name = sheet.cell(row_index, 1).value - sci_name = sheet.cell(row_index, 2).value - code = int(sheet.cell(row_index, 3).value) - bclass = bc - # create bird here - b, created = Bird.objects.get_or_create( - common_name=common_name, - scientific_name=sci_name, - code=code, - bird_class=bc - ) - print(b) diff --git a/app/unused_apps/birds/admin.py b/app/unused_apps/birds/admin.py deleted file mode 100644 index df0951a..0000000 --- a/app/unused_apps/birds/admin.py +++ /dev/null @@ -1,101 +0,0 @@ -from django.contrib import admin -from django.contrib.gis.admin import OSMGeoAdmin -from birds.models import BirdSighting, BirdAudio, BirdClass, Bird, APClass, AP, Sighting - -from photos.forms import GalleryForm -from utils.util import get_latlon -from utils.widgets import CustomSelectMultiple - - -class GalleryFormPlus(GalleryForm): - def __init__(self, *args, **kwargs): - super(GalleryFormPlus, self).__init__(*args, **kwargs) - self.base_fields['seen_by'].widget = CustomSelectMultiple() - - class Meta: - model = Sighting - fields = '__all__' - - -@admin.register(APClass) -class APClassAdmin(admin.ModelAdmin): - list_display = ('common_name', 'scientific_name', 'kind') - list_filter = ('kind',) - - -@admin.register(AP) -class APAdmin(admin.ModelAdmin): - list_display = ('pk', 'common_name', 'scientific_name', 'kind', 'code', 'apclass') - list_filter = ('apclass__kind','apclass') - - -@admin.register(Sighting) -class SightingAdmin(OSMGeoAdmin): - form = GalleryFormPlus - list_filter = ('seen_by',('location', admin.RelatedOnlyFieldListFilter),) - list_display = ('ap', 'location') - # options for OSM map Using custom ESRI topo map - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 13 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - - -class BirdClassAdmin(admin.ModelAdmin): - list_display = ('common_name', 'scientific_name',) - - -class BirdAudioAdmin(admin.ModelAdmin): - list_display = ('bird', 'recorder',) - - -class BirdAdmin(admin.ModelAdmin): - list_display = ('pk', 'common_name', 'scientific_name', 'code', 'bird_class') - list_filter = ('bird_class',) - -class BirdSightingAdmin(OSMGeoAdmin): - form = GalleryFormPlus - list_filter = ( - ) - list_display = ('bird', 'location') - list_filter = ('seen_by',('location', admin.RelatedOnlyFieldListFilter),) - fieldsets = ( - ('Sighting', { - 'fields': ( - 'bird', - 'point', - 'date', - 'seen_by', - 'images', - 'audio', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - # options for OSM map Using custom ESRI topo map - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 13 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - -admin.site.register(BirdSighting, BirdSightingAdmin) -admin.site.register(BirdClass, BirdClassAdmin) -admin.site.register(BirdAudio, BirdAudioAdmin) -admin.site.register(Bird, BirdAdmin) diff --git a/app/unused_apps/birds/autocomplete_light_registry.py b/app/unused_apps/birds/autocomplete_light_registry.py deleted file mode 100644 index 1cfa881..0000000 --- a/app/unused_apps/birds/autocomplete_light_registry.py +++ /dev/null @@ -1,24 +0,0 @@ -import autocomplete_light.shortcuts as al -from .models import Bird - -# This will generate a PersonAutocomplete class -al.register(Bird, - # Just like in ModelAdmin.search_fields - search_fields=['common_name','scientific_name'], - attrs={ - # This will set the input placeholder attribute: - 'placeholder': 'Tags...', - # This will set the yourlabs.Autocomplete.minimumCharacters - # options, the naming conversion is handled by jQuery - 'data-autocomplete-minimum-characters': 1, -}, - # This will set the data-widget-maximum-values attribute on the - # widget container element, and will be set to - # yourlabs.Widget.maximumValues (jQuery handles the naming - # conversion). - widget_attrs={ - 'data-widget-maximum-values': 4, - # Enable modern-style widget ! - 'class': 'modern-style', - }, -) diff --git a/app/unused_apps/birds/birds.json b/app/unused_apps/birds/birds.json deleted file mode 100644 index f140300..0000000 --- a/app/unused_apps/birds/birds.json +++ /dev/null @@ -1 +0,0 @@ -[{"fields": {"scientific_name": "Anatidae", "common_name": "Ducks, Geese, and Swans "}, "pk": 1, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Cracidae", "common_name": "Curassows and Guans "}, "pk": 2, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Odontophoridae", "common_name": "New World Quail "}, "pk": 3, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Phasianidae", "common_name": "Partridges, Grouse, Turkeys, and Old World Quail "}, "pk": 4, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Gaviidae", "common_name": "Loons "}, "pk": 5, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Podicipedidae", "common_name": "Grebes "}, "pk": 6, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Phoenicopteridae", "common_name": "Flamingos "}, "pk": 7, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Diomedeidae", "common_name": "Albatrosses "}, "pk": 8, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Procellariidae", "common_name": "Shearwaters and Petrels "}, "pk": 9, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Hydrobatidae", "common_name": "Storm-Petrels "}, "pk": 10, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Phaethontidae", "common_name": "Tropicbirds "}, "pk": 11, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Ciconiidae", "common_name": "Storks "}, "pk": 12, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Fregatidae", "common_name": "Frigatebirds "}, "pk": 13, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Sulidae", "common_name": "Boobies and Gannets "}, "pk": 14, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Phalacrocoracidae", "common_name": "Cormorants "}, "pk": 15, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Anhingidae", "common_name": "Darters "}, "pk": 16, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Pelecanidae", "common_name": "Pelicans "}, "pk": 17, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Ardeidae", "common_name": "Bitterns, Herons, and Allies "}, "pk": 18, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Threskiornithidae", "common_name": "Ibises and Spoonbills "}, "pk": 19, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Cathartidae", "common_name": "New World Vultures "}, "pk": 20, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Pandionidae", "common_name": "Ospreys "}, "pk": 21, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Accipitridae", "common_name": "Hawks, Kites, Eagles, and Allies "}, "pk": 22, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Rallidae", "common_name": "Rails, Gallinules, and Coots "}, "pk": 23, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Heliornithidae", "common_name": "Sungrebes "}, "pk": 24, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Aramidae", "common_name": "Limpkins "}, "pk": 25, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Gruidae", "common_name": "Cranes "}, "pk": 26, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Burhinidae", "common_name": "Thick-knees "}, "pk": 27, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Charadriidae", "common_name": "Lapwings and Plovers "}, "pk": 28, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Haematopodidae", "common_name": "Oystercatchers "}, "pk": 29, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Recurvirostridae", "common_name": "Stilts and Avocets "}, "pk": 30, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Jacanidae", "common_name": "Jacanas "}, "pk": 31, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Scolopacidae", "common_name": "Sandpipers, Phalaropes, and Allies "}, "pk": 32, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Glareolidae", "common_name": "Pratincoles "}, "pk": 33, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Laridae", "common_name": "Gulls, Terns, and Skimmers "}, "pk": 34, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Stercorariidae", "common_name": "Skuas and Jaegers "}, "pk": 35, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Alcidae", "common_name": "Auks, Murres, and Puffins "}, "pk": 36, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Columbidae", "common_name": "Pigeons and Doves "}, "pk": 37, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Cuculidae", "common_name": "Cuckoos, Roadrunners, and Anis "}, "pk": 38, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Tytonidae", "common_name": "Barn Owls "}, "pk": 39, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Strigidae", "common_name": "Typical Owls "}, "pk": 40, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Caprimulgidae", "common_name": "Goatsuckers "}, "pk": 41, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Apodidae", "common_name": "Swifts "}, "pk": 42, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Trochilidae", "common_name": "Hummingbirds "}, "pk": 43, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Trogonidae", "common_name": "Trogons "}, "pk": 44, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Upupidae", "common_name": "Hoopoes "}, "pk": 45, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Alcedinidae", "common_name": "Kingfishers "}, "pk": 46, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Picidae", "common_name": "Woodpeckers and Allies "}, "pk": 47, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Falconidae", "common_name": "Caracaras and Falcons "}, "pk": 48, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Psittacidae", "common_name": "Lories, Parakeets, Macaws, and Parrots "}, "pk": 49, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Tyrannidae", "common_name": "Tyrant Flycatchers "}, "pk": 50, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Tityridae", "common_name": "Becards, Tityras, and Allies "}, "pk": 51, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Laniidae", "common_name": "Shrikes "}, "pk": 52, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Vireonidae", "common_name": "Vireos "}, "pk": 53, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Corvidae", "common_name": "Jays and Crows "}, "pk": 54, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Alaudidae", "common_name": "Larks "}, "pk": 55, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Hirundinidae", "common_name": "Swallows "}, "pk": 56, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Paridae", "common_name": "Chickadees and Titmice "}, "pk": 57, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Remizidae", "common_name": "Verdin "}, "pk": 58, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Aegithalidae", "common_name": "Bushtits "}, "pk": 59, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Sittidae", "common_name": "Nuthatches "}, "pk": 60, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Certhiidae", "common_name": "Creepers "}, "pk": 61, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Troglodytidae", "common_name": "Wrens "}, "pk": 62, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Polioptilidae", "common_name": "Gnatcatchers and Gnatwrens "}, "pk": 63, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Cinclidae", "common_name": "Dippers "}, "pk": 64, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Pycnonotidae", "common_name": "Bulbuls "}, "pk": 65, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Regulidae", "common_name": "Kinglets "}, "pk": 66, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Phylloscopidae", "common_name": "Leaf Warblers "}, "pk": 67, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Sylviidae", "common_name": "Sylviid Warblers "}, "pk": 68, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Acrocephalidae", "common_name": "Reed Warblers "}, "pk": 69, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Megaluridae", "common_name": "Grassbirds "}, "pk": 70, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Muscicapidae", "common_name": "Old World Flycatchers "}, "pk": 71, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Turdidae", "common_name": "Thrushes "}, "pk": 72, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Mimidae", "common_name": "Mockingbirds and Thrashers "}, "pk": 73, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Sturnidae", "common_name": "Starlings "}, "pk": 74, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Prunellidae", "common_name": "Accentors "}, "pk": 75, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Motacillidae", "common_name": "Wagtails and Pipits "}, "pk": 76, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Bombycillidae", "common_name": "Waxwings "}, "pk": 77, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Ptilogonatidae", "common_name": "Silky-flycatchers "}, "pk": 78, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Peucedramidae", "common_name": "Olive Warblers "}, "pk": 79, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Calcariidae", "common_name": "Longspurs and Snow Buntings "}, "pk": 80, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Parulidae", "common_name": "Wood-Warblers "}, "pk": 81, "model": "birds.birdclass"}, {"fields": {"scientific_name": "incertae sedis", "common_name": "Bananaquits "}, "pk": 82, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Thraupidae", "common_name": "Tanagers "}, "pk": 83, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Emberizidae", "common_name": "Emberizids "}, "pk": 84, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Cardinalidae", "common_name": "Cardinals, Piranga Tanagers and Allies "}, "pk": 85, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Icteridae", "common_name": "Blackbirds "}, "pk": 86, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Fringillidae", "common_name": "Fringilline and Cardueline Finches and Allies "}, "pk": 87, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Passeridae", "common_name": "Old World Sparrows "}, "pk": 88, "model": "birds.birdclass"}, {"fields": {"scientific_name": "Dendrocygna autumnalis", "bird_class": 1, "common_name": "Black-bellied Whistling-Duck", "code": 1}, "pk": 1, "model": "birds.bird"}, {"fields": {"scientific_name": "Dendrocygna bicolor", "bird_class": 1, "common_name": "Fulvous Whistling-Duck", "code": 1}, "pk": 2, "model": "birds.bird"}, {"fields": {"scientific_name": "Anser fabalis", "bird_class": 1, "common_name": "Taiga Bean-Goose", "code": 3}, "pk": 3, "model": "birds.bird"}, {"fields": {"scientific_name": "Anser serrirostris", "bird_class": 1, "common_name": "Tundra Bean-Goose", "code": 3}, "pk": 4, "model": "birds.bird"}, {"fields": {"scientific_name": "Anser brachyrhynchus", "bird_class": 1, "common_name": "Pink-footed Goose", "code": 4}, "pk": 5, "model": "birds.bird"}, {"fields": {"scientific_name": "Anser albifrons", "bird_class": 1, "common_name": "Greater White-fronted Goose", "code": 1}, "pk": 6, "model": "birds.bird"}, {"fields": {"scientific_name": "Anser erythropus", "bird_class": 1, "common_name": "Lesser White-fronted Goose", "code": 5}, "pk": 7, "model": "birds.bird"}, {"fields": {"scientific_name": "Anser anser", "bird_class": 1, "common_name": "Graylag Goose", "code": 5}, "pk": 8, "model": "birds.bird"}, {"fields": {"scientific_name": "Chen canagica", "bird_class": 1, "common_name": "Emperor Goose", "code": 2}, "pk": 9, "model": "birds.bird"}, {"fields": {"scientific_name": "Chen caerulescens", "bird_class": 1, "common_name": "Snow Goose", "code": 1}, "pk": 10, "model": "birds.bird"}, {"fields": {"scientific_name": "Chen rossii", "bird_class": 1, "common_name": "Ross's Goose", "code": 1}, "pk": 11, "model": "birds.bird"}, {"fields": {"scientific_name": "Branta bernicla", "bird_class": 1, "common_name": "Brant", "code": 1}, "pk": 12, "model": "birds.bird"}, {"fields": {"scientific_name": "Branta leucopsis", "bird_class": 1, "common_name": "Barnacle Goose", "code": 4}, "pk": 13, "model": "birds.bird"}, {"fields": {"scientific_name": "Branta hutchinsii", "bird_class": 1, "common_name": "Cackling Goose", "code": 1}, "pk": 14, "model": "birds.bird"}, {"fields": {"scientific_name": "Branta canadensis", "bird_class": 1, "common_name": "Canada Goose", "code": 1}, "pk": 15, "model": "birds.bird"}, {"fields": {"scientific_name": "Cygnus olor", "bird_class": 1, "common_name": "Mute Swan", "code": 1}, "pk": 16, "model": "birds.bird"}, {"fields": {"scientific_name": "Cygnus buccinator", "bird_class": 1, "common_name": "Trumpeter Swan", "code": 1}, "pk": 17, "model": "birds.bird"}, {"fields": {"scientific_name": "Cygnus columbianus", "bird_class": 1, "common_name": "Tundra Swan", "code": 1}, "pk": 18, "model": "birds.bird"}, {"fields": {"scientific_name": "Cygnus cygnus", "bird_class": 1, "common_name": "Whooper Swan", "code": 3}, "pk": 19, "model": "birds.bird"}, {"fields": {"scientific_name": "Cairina moschata", "bird_class": 1, "common_name": "Muscovy Duck", "code": 2}, "pk": 20, "model": "birds.bird"}, {"fields": {"scientific_name": "Aix sponsa", "bird_class": 1, "common_name": "Wood Duck", "code": 1}, "pk": 21, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas strepera", "bird_class": 1, "common_name": "Gadwall", "code": 1}, "pk": 22, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas falcata", "bird_class": 1, "common_name": "Falcated Duck", "code": 4}, "pk": 23, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas penelope", "bird_class": 1, "common_name": "Eurasian Wigeon", "code": 2}, "pk": 24, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas americana", "bird_class": 1, "common_name": "American Wigeon", "code": 1}, "pk": 25, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas rubripes", "bird_class": 1, "common_name": "American Black Duck", "code": 1}, "pk": 26, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas platyrhynchos", "bird_class": 1, "common_name": "Mallard", "code": 1}, "pk": 27, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas fulvigula", "bird_class": 1, "common_name": "Mottled Duck", "code": 1}, "pk": 28, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas zonorhyncha", "bird_class": 1, "common_name": "Eastern Spot-billed Duck", "code": 4}, "pk": 29, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas discors", "bird_class": 1, "common_name": "Blue-winged Teal", "code": 1}, "pk": 30, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas cyanoptera", "bird_class": 1, "common_name": "Cinnamon Teal", "code": 1}, "pk": 31, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas clypeata", "bird_class": 1, "common_name": "Northern Shoveler", "code": 1}, "pk": 32, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas bahamensis", "bird_class": 1, "common_name": "White-cheeked Pintail", "code": 4}, "pk": 33, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas acuta", "bird_class": 1, "common_name": "Northern Pintail", "code": 1}, "pk": 34, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas querquedula", "bird_class": 1, "common_name": "Garganey", "code": 4}, "pk": 35, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas formosa", "bird_class": 1, "common_name": "Baikal Teal", "code": 4}, "pk": 36, "model": "birds.bird"}, {"fields": {"scientific_name": "Anas crecca", "bird_class": 1, "common_name": "Green-winged Teal", "code": 1}, "pk": 37, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya valisineria", "bird_class": 1, "common_name": "Canvasback", "code": 1}, "pk": 38, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya americana", "bird_class": 1, "common_name": "Redhead", "code": 1}, "pk": 39, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya ferina", "bird_class": 1, "common_name": "Common Pochard", "code": 3}, "pk": 40, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya collaris", "bird_class": 1, "common_name": "Ring-necked Duck", "code": 1}, "pk": 41, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya fuligula", "bird_class": 1, "common_name": "Tufted Duck", "code": 3}, "pk": 42, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya marila", "bird_class": 1, "common_name": "Greater Scaup", "code": 1}, "pk": 43, "model": "birds.bird"}, {"fields": {"scientific_name": "Aythya affinis", "bird_class": 1, "common_name": "Lesser Scaup", "code": 1}, "pk": 44, "model": "birds.bird"}, {"fields": {"scientific_name": "Polysticta stelleri", "bird_class": 1, "common_name": "Steller's Eider", "code": 3}, "pk": 45, "model": "birds.bird"}, {"fields": {"scientific_name": "Somateria fischeri", "bird_class": 1, "common_name": "Spectacled Eider", "code": 3}, "pk": 46, "model": "birds.bird"}, {"fields": {"scientific_name": "Somateria spectabilis", "bird_class": 1, "common_name": "King Eider", "code": 2}, "pk": 47, "model": "birds.bird"}, {"fields": {"scientific_name": "Somateria mollissima", "bird_class": 1, "common_name": "Common Eider", "code": 1}, "pk": 48, "model": "birds.bird"}, {"fields": {"scientific_name": "Histrionicus histrionicus", "bird_class": 1, "common_name": "Harlequin Duck", "code": 1}, "pk": 49, "model": "birds.bird"}, {"fields": {"scientific_name": "Camptorhynchus labradorius", "bird_class": 1, "common_name": "Labrador Duck", "code": 6}, "pk": 50, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanitta perspicillata", "bird_class": 1, "common_name": "Surf Scoter", "code": 1}, "pk": 51, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanitta fusca", "bird_class": 1, "common_name": "White-winged Scoter", "code": 1}, "pk": 52, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanitta americana", "bird_class": 1, "common_name": "Black Scoter", "code": 1}, "pk": 53, "model": "birds.bird"}, {"fields": {"scientific_name": "Clangula hyemalis", "bird_class": 1, "common_name": "Long-tailed Duck", "code": 1}, "pk": 54, "model": "birds.bird"}, {"fields": {"scientific_name": "Bucephala albeola", "bird_class": 1, "common_name": "Bufflehead", "code": 1}, "pk": 55, "model": "birds.bird"}, {"fields": {"scientific_name": "Bucephala clangula", "bird_class": 1, "common_name": "Common Goldeneye", "code": 1}, "pk": 56, "model": "birds.bird"}, {"fields": {"scientific_name": "Bucephala islandica", "bird_class": 1, "common_name": "Barrow's Goldeneye", "code": 1}, "pk": 57, "model": "birds.bird"}, {"fields": {"scientific_name": "Mergellus albellus", "bird_class": 1, "common_name": "Smew", "code": 3}, "pk": 58, "model": "birds.bird"}, {"fields": {"scientific_name": "Lophodytes cucullatus", "bird_class": 1, "common_name": "Hooded Merganser", "code": 1}, "pk": 59, "model": "birds.bird"}, {"fields": {"scientific_name": "Mergus merganser", "bird_class": 1, "common_name": "Common Merganser", "code": 1}, "pk": 60, "model": "birds.bird"}, {"fields": {"scientific_name": "Mergus serrator", "bird_class": 1, "common_name": "Red-breasted Merganser", "code": 1}, "pk": 61, "model": "birds.bird"}, {"fields": {"scientific_name": "Nomonyx dominicus", "bird_class": 1, "common_name": "Masked Duck", "code": 3}, "pk": 62, "model": "birds.bird"}, {"fields": {"scientific_name": "Oxyura jamaicensis", "bird_class": 1, "common_name": "Ruddy Duck", "code": 1}, "pk": 63, "model": "birds.bird"}, {"fields": {"scientific_name": "Ortalis vetula", "bird_class": 2, "common_name": "Plain Chachalaca", "code": 2}, "pk": 64, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreortyx pictus", "bird_class": 3, "common_name": "Mountain Quail", "code": 1}, "pk": 65, "model": "birds.bird"}, {"fields": {"scientific_name": "Callipepla squamata", "bird_class": 3, "common_name": "Scaled Quail", "code": 1}, "pk": 66, "model": "birds.bird"}, {"fields": {"scientific_name": "Callipepla californica", "bird_class": 3, "common_name": "California Quail", "code": 1}, "pk": 67, "model": "birds.bird"}, {"fields": {"scientific_name": "Callipepla gambelii", "bird_class": 3, "common_name": "Gambel's Quail", "code": 1}, "pk": 68, "model": "birds.bird"}, {"fields": {"scientific_name": "Colinus virginianus", "bird_class": 3, "common_name": "Northern Bobwhite", "code": 1}, "pk": 69, "model": "birds.bird"}, {"fields": {"scientific_name": "Cyrtonyx montezumae", "bird_class": 3, "common_name": "Montezuma Quail", "code": 2}, "pk": 70, "model": "birds.bird"}, {"fields": {"scientific_name": "Alectoris chukar", "bird_class": 4, "common_name": "Chukar", "code": 2}, "pk": 71, "model": "birds.bird"}, {"fields": {"scientific_name": "Tetraogallus himalayensis", "bird_class": 4, "common_name": "Himalayan Snowcock", "code": 2}, "pk": 72, "model": "birds.bird"}, {"fields": {"scientific_name": "Perdix perdix", "bird_class": 4, "common_name": "Gray Partridge", "code": 2}, "pk": 73, "model": "birds.bird"}, {"fields": {"scientific_name": "Phasianus colchicus", "bird_class": 4, "common_name": "Ring-necked Pheasant", "code": 1}, "pk": 74, "model": "birds.bird"}, {"fields": {"scientific_name": "Bonasa umbellus", "bird_class": 4, "common_name": "Ruffed Grouse", "code": 1}, "pk": 75, "model": "birds.bird"}, {"fields": {"scientific_name": "Centrocercus urophasianus", "bird_class": 4, "common_name": "Greater Sage-Grouse", "code": 1}, "pk": 76, "model": "birds.bird"}, {"fields": {"scientific_name": "Centrocercus minimus", "bird_class": 4, "common_name": "Gunnison Sage-Grouse", "code": 2}, "pk": 77, "model": "birds.bird"}, {"fields": {"scientific_name": "Falcipennis canadensis", "bird_class": 4, "common_name": "Spruce Grouse", "code": 2}, "pk": 78, "model": "birds.bird"}, {"fields": {"scientific_name": "Lagopus lagopus", "bird_class": 4, "common_name": "Willow Ptarmigan", "code": 1}, "pk": 79, "model": "birds.bird"}, {"fields": {"scientific_name": "Lagopus muta", "bird_class": 4, "common_name": "Rock Ptarmigan", "code": 1}, "pk": 80, "model": "birds.bird"}, {"fields": {"scientific_name": "Lagopus leucura", "bird_class": 4, "common_name": "White-tailed Ptarmigan", "code": 2}, "pk": 81, "model": "birds.bird"}, {"fields": {"scientific_name": "Dendragapus obscurus", "bird_class": 4, "common_name": "Dusky Grouse", "code": 2}, "pk": 82, "model": "birds.bird"}, {"fields": {"scientific_name": "Dendragapus fuliginosus", "bird_class": 4, "common_name": "Sooty Grouse", "code": 2}, "pk": 83, "model": "birds.bird"}, {"fields": {"scientific_name": "Tympanuchus phasianellus", "bird_class": 4, "common_name": "Sharp-tailed Grouse", "code": 2}, "pk": 84, "model": "birds.bird"}, {"fields": {"scientific_name": "Tympanuchus cupido", "bird_class": 4, "common_name": "Greater Prairie-Chicken", "code": 2}, "pk": 85, "model": "birds.bird"}, {"fields": {"scientific_name": "Tympanuchus pallidicinctus", "bird_class": 4, "common_name": "Lesser Prairie-Chicken", "code": 2}, "pk": 86, "model": "birds.bird"}, {"fields": {"scientific_name": "Meleagris gallopavo", "bird_class": 4, "common_name": "Wild Turkey", "code": 1}, "pk": 87, "model": "birds.bird"}, {"fields": {"scientific_name": "Gavia stellata", "bird_class": 5, "common_name": "Red-throated Loon", "code": 1}, "pk": 88, "model": "birds.bird"}, {"fields": {"scientific_name": "Gavia arctica", "bird_class": 5, "common_name": "Arctic Loon", "code": 2}, "pk": 89, "model": "birds.bird"}, {"fields": {"scientific_name": "Gavia pacifica", "bird_class": 5, "common_name": "Pacific Loon", "code": 1}, "pk": 90, "model": "birds.bird"}, {"fields": {"scientific_name": "Gavia immer", "bird_class": 5, "common_name": "Common Loon", "code": 1}, "pk": 91, "model": "birds.bird"}, {"fields": {"scientific_name": "Gavia adamsii", "bird_class": 5, "common_name": "Yellow-billed Loon", "code": 2}, "pk": 92, "model": "birds.bird"}, {"fields": {"scientific_name": "Tachybaptus dominicus", "bird_class": 6, "common_name": "Least Grebe", "code": 2}, "pk": 93, "model": "birds.bird"}, {"fields": {"scientific_name": "Podilymbus podiceps", "bird_class": 6, "common_name": "Pied-billed Grebe", "code": 1}, "pk": 94, "model": "birds.bird"}, {"fields": {"scientific_name": "Podiceps auritus", "bird_class": 6, "common_name": "Horned Grebe", "code": 1}, "pk": 95, "model": "birds.bird"}, {"fields": {"scientific_name": "Podiceps grisegena", "bird_class": 6, "common_name": "Red-necked Grebe", "code": 1}, "pk": 96, "model": "birds.bird"}, {"fields": {"scientific_name": "Podiceps nigricollis", "bird_class": 6, "common_name": "Eared Grebe", "code": 1}, "pk": 97, "model": "birds.bird"}, {"fields": {"scientific_name": "Aechmophorus occidentalis", "bird_class": 6, "common_name": "Western Grebe", "code": 1}, "pk": 98, "model": "birds.bird"}, {"fields": {"scientific_name": "Aechmophorus clarkii", "bird_class": 6, "common_name": "Clark's Grebe", "code": 1}, "pk": 99, "model": "birds.bird"}, {"fields": {"scientific_name": "Phoenicopterus ruber", "bird_class": 7, "common_name": "American Flamingo", "code": 3}, "pk": 100, "model": "birds.bird"}, {"fields": {"scientific_name": "Thalassarche chlororhynchos", "bird_class": 8, "common_name": "Yellow-nosed Albatross", "code": 4}, "pk": 101, "model": "birds.bird"}, {"fields": {"scientific_name": "Thalassarche cauta", "bird_class": 8, "common_name": "Shy Albatross", "code": 4}, "pk": 102, "model": "birds.bird"}, {"fields": {"scientific_name": "Thalassarche melanophris", "bird_class": 8, "common_name": "Black-browed Albatross", "code": 5}, "pk": 103, "model": "birds.bird"}, {"fields": {"scientific_name": "Phoebetria palpebrata", "bird_class": 8, "common_name": "Light-mantled Albatross", "code": 5}, "pk": 104, "model": "birds.bird"}, {"fields": {"scientific_name": "Diomedea exulans", "bird_class": 8, "common_name": "Wandering Albatross", "code": 5}, "pk": 105, "model": "birds.bird"}, {"fields": {"scientific_name": "Phoebastria immutabilis", "bird_class": 8, "common_name": "Laysan Albatross", "code": 2}, "pk": 106, "model": "birds.bird"}, {"fields": {"scientific_name": "Phoebastria nigripes", "bird_class": 8, "common_name": "Black-footed Albatross", "code": 1}, "pk": 107, "model": "birds.bird"}, {"fields": {"scientific_name": "Phoebastria albatrus", "bird_class": 8, "common_name": "Short-tailed Albatross", "code": 3}, "pk": 108, "model": "birds.bird"}, {"fields": {"scientific_name": "Fulmarus glacialis", "bird_class": 9, "common_name": "Northern Fulmar", "code": 1}, "pk": 109, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma macroptera", "bird_class": 9, "common_name": "Great-winged Petrel", "code": 5}, "pk": 110, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma solandri", "bird_class": 9, "common_name": "Providence Petrel", "code": 4}, "pk": 111, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma arminjoniana", "bird_class": 9, "common_name": "Herald Petrel", "code": 3}, "pk": 112, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma ultima", "bird_class": 9, "common_name": "Murphy's Petrel", "code": 3}, "pk": 113, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma inexpectata", "bird_class": 9, "common_name": "Mottled Petrel", "code": 2}, "pk": 114, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma cahow", "bird_class": 9, "common_name": "Bermuda Petrel", "code": 3}, "pk": 115, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma hasitata", "bird_class": 9, "common_name": "Black-capped Petrel", "code": 2}, "pk": 116, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma phaeopygia/sandwichensis", "bird_class": 9, "common_name": "Galapagos/Hawaiian Petrel", "code": 4}, "pk": 117, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma feae", "bird_class": 9, "common_name": "Fea's Petrel", "code": 3}, "pk": 118, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma cookii", "bird_class": 9, "common_name": "Cook's Petrel", "code": 3}, "pk": 119, "model": "birds.bird"}, {"fields": {"scientific_name": "Pterodroma longirostris", "bird_class": 9, "common_name": "Stejneger's Petrel", "code": 4}, "pk": 120, "model": "birds.bird"}, {"fields": {"scientific_name": "Bulweria bulwerii", "bird_class": 9, "common_name": "Bulwer's Petrel", "code": 5}, "pk": 121, "model": "birds.bird"}, {"fields": {"scientific_name": "Procellaria aequinoctialis", "bird_class": 9, "common_name": "White-chinned Petrel", "code": 5}, "pk": 122, "model": "birds.bird"}, {"fields": {"scientific_name": "Procellaria parkinsoni", "bird_class": 9, "common_name": "Parkinson's Petrel", "code": 5}, "pk": 123, "model": "birds.bird"}, {"fields": {"scientific_name": "Calonectris leucomelas", "bird_class": 9, "common_name": "Streaked Shearwater", "code": 4}, "pk": 124, "model": "birds.bird"}, {"fields": {"scientific_name": "Calonectris diomedea", "bird_class": 9, "common_name": "Cory's Shearwater", "code": 1}, "pk": 125, "model": "birds.bird"}, {"fields": {"scientific_name": "Calonectris edwardsii", "bird_class": 9, "common_name": "Cape Verde Shearwater", "code": 5}, "pk": 126, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus creatopus", "bird_class": 9, "common_name": "Pink-footed Shearwater", "code": 1}, "pk": 127, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus carneipes", "bird_class": 9, "common_name": "Flesh-footed Shearwater", "code": 3}, "pk": 128, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus gravis", "bird_class": 9, "common_name": "Great Shearwater", "code": 1}, "pk": 129, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus pacificus", "bird_class": 9, "common_name": "Wedge-tailed Shearwater", "code": 4}, "pk": 130, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus bulleri", "bird_class": 9, "common_name": "Buller's Shearwater", "code": 2}, "pk": 131, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus griseus", "bird_class": 9, "common_name": "Sooty Shearwater", "code": 1}, "pk": 132, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus tenuirostris", "bird_class": 9, "common_name": "Short-tailed Shearwater", "code": 2}, "pk": 133, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus puffinus", "bird_class": 9, "common_name": "Manx Shearwater", "code": 2}, "pk": 134, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus auricularis", "bird_class": 9, "common_name": "Townsend's Shearwater", "code": 5}, "pk": 135, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus opisthomelas", "bird_class": 9, "common_name": "Black-vented Shearwater", "code": 2}, "pk": 136, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus lherminieri", "bird_class": 9, "common_name": "Audubon's Shearwater", "code": 1}, "pk": 137, "model": "birds.bird"}, {"fields": {"scientific_name": "Puffinus assimilis", "bird_class": 9, "common_name": "Little Shearwater", "code": 5}, "pk": 138, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanites oceanicus", "bird_class": 10, "common_name": "Wilson's Storm-Petrel", "code": 1}, "pk": 139, "model": "birds.bird"}, {"fields": {"scientific_name": "Pelagodroma marina", "bird_class": 10, "common_name": "White-faced Storm-Petrel", "code": 3}, "pk": 140, "model": "birds.bird"}, {"fields": {"scientific_name": "Hydrobates pelagicus", "bird_class": 10, "common_name": "European Storm-Petrel", "code": 4}, "pk": 141, "model": "birds.bird"}, {"fields": {"scientific_name": "Fregetta tropica", "bird_class": 10, "common_name": "Black-bellied Storm-Petrel", "code": 5}, "pk": 142, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma furcata", "bird_class": 10, "common_name": "Fork-tailed Storm-Petrel", "code": 2}, "pk": 143, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma hornbyi", "bird_class": 10, "common_name": "Ringed Storm-Petrel", "code": 5}, "pk": 144, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma monorhis", "bird_class": 10, "common_name": "Swinhoe's Storm-Petrel", "code": 5}, "pk": 145, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma leucorhoa", "bird_class": 10, "common_name": "Leach's Storm-Petrel", "code": 1}, "pk": 146, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma homochroa", "bird_class": 10, "common_name": "Ashy Storm-Petrel", "code": 2}, "pk": 147, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma castro", "bird_class": 10, "common_name": "Band-rumped Storm-Petrel", "code": 2}, "pk": 148, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma tethys", "bird_class": 10, "common_name": "Wedge-rumped Storm-Petrel", "code": 4}, "pk": 149, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma melania", "bird_class": 10, "common_name": "Black Storm-Petrel", "code": 2}, "pk": 150, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma tristrami", "bird_class": 10, "common_name": "Tristram's Storm-Petrel", "code": 5}, "pk": 151, "model": "birds.bird"}, {"fields": {"scientific_name": "Oceanodroma microsoma", "bird_class": 10, "common_name": "Least Storm-Petrel", "code": 3}, "pk": 152, "model": "birds.bird"}, {"fields": {"scientific_name": "Phaethon lepturus", "bird_class": 11, "common_name": "White-tailed Tropicbird", "code": 3}, "pk": 153, "model": "birds.bird"}, {"fields": {"scientific_name": "Phaethon aethereus", "bird_class": 11, "common_name": "Red-billed Tropicbird", "code": 3}, "pk": 154, "model": "birds.bird"}, {"fields": {"scientific_name": "Phaethon rubricauda", "bird_class": 11, "common_name": "Red-tailed Tropicbird", "code": 4}, "pk": 155, "model": "birds.bird"}, {"fields": {"scientific_name": "Jabiru mycteria", "bird_class": 12, "common_name": "Jabiru", "code": 4}, "pk": 156, "model": "birds.bird"}, {"fields": {"scientific_name": "Mycteria americana", "bird_class": 12, "common_name": "Wood Stork", "code": 1}, "pk": 157, "model": "birds.bird"}, {"fields": {"scientific_name": "Fregata magnificens", "bird_class": 13, "common_name": "Magnificent Frigatebird", "code": 1}, "pk": 158, "model": "birds.bird"}, {"fields": {"scientific_name": "Fregata minor", "bird_class": 13, "common_name": "Great Frigatebird", "code": 5}, "pk": 159, "model": "birds.bird"}, {"fields": {"scientific_name": "Fregata ariel", "bird_class": 13, "common_name": "Lesser Frigatebird", "code": 5}, "pk": 160, "model": "birds.bird"}, {"fields": {"scientific_name": "Sula dactylatra", "bird_class": 14, "common_name": "Masked Booby", "code": 3}, "pk": 161, "model": "birds.bird"}, {"fields": {"scientific_name": "Sula nebouxii", "bird_class": 14, "common_name": "Blue-footed Booby", "code": 4}, "pk": 162, "model": "birds.bird"}, {"fields": {"scientific_name": "Sula leucogaster", "bird_class": 14, "common_name": "Brown Booby", "code": 3}, "pk": 163, "model": "birds.bird"}, {"fields": {"scientific_name": "Sula sula", "bird_class": 14, "common_name": "Red-footed Booby", "code": 4}, "pk": 164, "model": "birds.bird"}, {"fields": {"scientific_name": "Morus bassanus", "bird_class": 14, "common_name": "Northern Gannet", "code": 1}, "pk": 165, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalacrocorax penicillatus", "bird_class": 15, "common_name": "Brandt's Cormorant", "code": 1}, "pk": 166, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalacrocorax brasilianus", "bird_class": 15, "common_name": "Neotropic Cormorant", "code": 1}, "pk": 167, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalacrocorax auritus", "bird_class": 15, "common_name": "Double-crested Cormorant", "code": 1}, "pk": 168, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalacrocorax carbo", "bird_class": 15, "common_name": "Great Cormorant", "code": 1}, "pk": 169, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalacrocorax urile", "bird_class": 15, "common_name": "Red-faced Cormorant", "code": 2}, "pk": 170, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalacrocorax pelagicus", "bird_class": 15, "common_name": "Pelagic Cormorant", "code": 1}, "pk": 171, "model": "birds.bird"}, {"fields": {"scientific_name": "Anhinga anhinga", "bird_class": 16, "common_name": "Anhinga", "code": 1}, "pk": 172, "model": "birds.bird"}, {"fields": {"scientific_name": "Pelecanus erythrorhynchos", "bird_class": 17, "common_name": "American White Pelican", "code": 1}, "pk": 173, "model": "birds.bird"}, {"fields": {"scientific_name": "Pelecanus occidentalis", "bird_class": 17, "common_name": "Brown Pelican", "code": 1}, "pk": 174, "model": "birds.bird"}, {"fields": {"scientific_name": "Botaurus lentiginosus", "bird_class": 18, "common_name": "American Bittern", "code": 1}, "pk": 175, "model": "birds.bird"}, {"fields": {"scientific_name": "Ixobrychus sinensis", "bird_class": 18, "common_name": "Yellow Bittern", "code": 5}, "pk": 176, "model": "birds.bird"}, {"fields": {"scientific_name": "Ixobrychus exilis", "bird_class": 18, "common_name": "Least Bittern", "code": 1}, "pk": 177, "model": "birds.bird"}, {"fields": {"scientific_name": "Tigrisoma mexicanum", "bird_class": 18, "common_name": "Bare-throated Tiger-Heron", "code": 5}, "pk": 178, "model": "birds.bird"}, {"fields": {"scientific_name": "Ardea herodias", "bird_class": 18, "common_name": "Great Blue Heron", "code": 1}, "pk": 179, "model": "birds.bird"}, {"fields": {"scientific_name": "Ardea cinerea", "bird_class": 18, "common_name": "Gray Heron", "code": 5}, "pk": 180, "model": "birds.bird"}, {"fields": {"scientific_name": "Ardea alba", "bird_class": 18, "common_name": "Great Egret", "code": 1}, "pk": 181, "model": "birds.bird"}, {"fields": {"scientific_name": "Mesophoyx intermedia", "bird_class": 18, "common_name": "Intermediate Egret", "code": 5}, "pk": 182, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta eulophotes", "bird_class": 18, "common_name": "Chinese Egret", "code": 5}, "pk": 183, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta garzetta", "bird_class": 18, "common_name": "Little Egret", "code": 4}, "pk": 184, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta gularis", "bird_class": 18, "common_name": "Western Reef-Heron", "code": 5}, "pk": 185, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta thula", "bird_class": 18, "common_name": "Snowy Egret", "code": 1}, "pk": 186, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta caerulea", "bird_class": 18, "common_name": "Little Blue Heron", "code": 1}, "pk": 187, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta tricolor", "bird_class": 18, "common_name": "Tricolored Heron", "code": 1}, "pk": 188, "model": "birds.bird"}, {"fields": {"scientific_name": "Egretta rufescens", "bird_class": 18, "common_name": "Reddish Egret", "code": 1}, "pk": 189, "model": "birds.bird"}, {"fields": {"scientific_name": "Bubulcus ibis", "bird_class": 18, "common_name": "Cattle Egret", "code": 1}, "pk": 190, "model": "birds.bird"}, {"fields": {"scientific_name": "Ardeola bacchus", "bird_class": 18, "common_name": "Chinese Pond-Heron", "code": 5}, "pk": 191, "model": "birds.bird"}, {"fields": {"scientific_name": "Butorides virescens", "bird_class": 18, "common_name": "Green Heron", "code": 1}, "pk": 192, "model": "birds.bird"}, {"fields": {"scientific_name": "Nycticorax nycticorax", "bird_class": 18, "common_name": "Black-crowned Night-Heron", "code": 1}, "pk": 193, "model": "birds.bird"}, {"fields": {"scientific_name": "Nyctanassa violacea", "bird_class": 18, "common_name": "Yellow-crowned Night-Heron", "code": 1}, "pk": 194, "model": "birds.bird"}, {"fields": {"scientific_name": "Eudocimus albus", "bird_class": 19, "common_name": "White Ibis", "code": 1}, "pk": 195, "model": "birds.bird"}, {"fields": {"scientific_name": "Eudocimus ruber", "bird_class": 19, "common_name": "Scarlet Ibis", "code": 5}, "pk": 196, "model": "birds.bird"}, {"fields": {"scientific_name": "Plegadis falcinellus", "bird_class": 19, "common_name": "Glossy Ibis", "code": 1}, "pk": 197, "model": "birds.bird"}, {"fields": {"scientific_name": "Plegadis chihi", "bird_class": 19, "common_name": "White-faced Ibis", "code": 1}, "pk": 198, "model": "birds.bird"}, {"fields": {"scientific_name": "Platalea ajaja", "bird_class": 19, "common_name": "Roseate Spoonbill", "code": 1}, "pk": 199, "model": "birds.bird"}, {"fields": {"scientific_name": "Coragyps atratus", "bird_class": 20, "common_name": "Black Vulture", "code": 1}, "pk": 200, "model": "birds.bird"}, {"fields": {"scientific_name": "Cathartes aura", "bird_class": 20, "common_name": "Turkey Vulture", "code": 1}, "pk": 201, "model": "birds.bird"}, {"fields": {"scientific_name": "Gymnogyps californianus", "bird_class": 20, "common_name": "California Condor", "code": 6}, "pk": 202, "model": "birds.bird"}, {"fields": {"scientific_name": "Pandion haliaetus", "bird_class": 21, "common_name": "Osprey", "code": 1}, "pk": 203, "model": "birds.bird"}, {"fields": {"scientific_name": "Chondrohierax uncinatus", "bird_class": 22, "common_name": "Hook-billed Kite", "code": 3}, "pk": 204, "model": "birds.bird"}, {"fields": {"scientific_name": "Elanoides forficatus", "bird_class": 22, "common_name": "Swallow-tailed Kite", "code": 1}, "pk": 205, "model": "birds.bird"}, {"fields": {"scientific_name": "Elanus leucurus", "bird_class": 22, "common_name": "White-tailed Kite", "code": 1}, "pk": 206, "model": "birds.bird"}, {"fields": {"scientific_name": "Rostrhamus sociabilis", "bird_class": 22, "common_name": "Snail Kite", "code": 2}, "pk": 207, "model": "birds.bird"}, {"fields": {"scientific_name": "Harpagus bidentatus", "bird_class": 22, "common_name": "Double-toothed Kite", "code": 5}, "pk": 208, "model": "birds.bird"}, {"fields": {"scientific_name": "Ictinia mississippiensis", "bird_class": 22, "common_name": "Mississippi Kite", "code": 1}, "pk": 209, "model": "birds.bird"}, {"fields": {"scientific_name": "Haliaeetus leucocephalus", "bird_class": 22, "common_name": "Bald Eagle", "code": 1}, "pk": 210, "model": "birds.bird"}, {"fields": {"scientific_name": "Haliaeetus albicilla", "bird_class": 22, "common_name": "White-tailed Eagle", "code": 4}, "pk": 211, "model": "birds.bird"}, {"fields": {"scientific_name": "Haliaeetus pelagicus", "bird_class": 22, "common_name": "Steller's Sea-Eagle", "code": 4}, "pk": 212, "model": "birds.bird"}, {"fields": {"scientific_name": "Circus cyaneus", "bird_class": 22, "common_name": "Northern Harrier", "code": 1}, "pk": 213, "model": "birds.bird"}, {"fields": {"scientific_name": "Accipiter striatus", "bird_class": 22, "common_name": "Sharp-shinned Hawk", "code": 1}, "pk": 214, "model": "birds.bird"}, {"fields": {"scientific_name": "Accipiter cooperii", "bird_class": 22, "common_name": "Cooper's Hawk", "code": 1}, "pk": 215, "model": "birds.bird"}, {"fields": {"scientific_name": "Accipiter gentilis", "bird_class": 22, "common_name": "Northern Goshawk", "code": 1}, "pk": 216, "model": "birds.bird"}, {"fields": {"scientific_name": "Geranospiza caerulescens", "bird_class": 22, "common_name": "Crane Hawk", "code": 5}, "pk": 217, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteogallus anthracinus", "bird_class": 22, "common_name": "Common Black-Hawk", "code": 2}, "pk": 218, "model": "birds.bird"}, {"fields": {"scientific_name": "Parabuteo unicinctus", "bird_class": 22, "common_name": "Harris's Hawk", "code": 1}, "pk": 219, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo magnirostris", "bird_class": 22, "common_name": "Roadside Hawk", "code": 4}, "pk": 220, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo lineatus", "bird_class": 22, "common_name": "Red-shouldered Hawk", "code": 1}, "pk": 221, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo platypterus", "bird_class": 22, "common_name": "Broad-winged Hawk", "code": 1}, "pk": 222, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo plagiatus", "bird_class": 22, "common_name": "Gray Hawk", "code": 2}, "pk": 223, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo brachyurus", "bird_class": 22, "common_name": "Short-tailed Hawk", "code": 2}, "pk": 224, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo swainsoni", "bird_class": 22, "common_name": "Swainson's Hawk", "code": 1}, "pk": 225, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo albicaudatus", "bird_class": 22, "common_name": "White-tailed Hawk", "code": 2}, "pk": 226, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo albonotatus", "bird_class": 22, "common_name": "Zone-tailed Hawk", "code": 2}, "pk": 227, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo jamaicensis", "bird_class": 22, "common_name": "Red-tailed Hawk", "code": 1}, "pk": 228, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo regalis", "bird_class": 22, "common_name": "Ferruginous Hawk", "code": 1}, "pk": 229, "model": "birds.bird"}, {"fields": {"scientific_name": "Buteo lagopus", "bird_class": 22, "common_name": "Rough-legged Hawk", "code": 1}, "pk": 230, "model": "birds.bird"}, {"fields": {"scientific_name": "Aquila chrysaetos", "bird_class": 22, "common_name": "Golden Eagle", "code": 1}, "pk": 231, "model": "birds.bird"}, {"fields": {"scientific_name": "Coturnicops noveboracensis", "bird_class": 23, "common_name": "Yellow Rail", "code": 2}, "pk": 232, "model": "birds.bird"}, {"fields": {"scientific_name": "Laterallus jamaicensis", "bird_class": 23, "common_name": "Black Rail", "code": 2}, "pk": 233, "model": "birds.bird"}, {"fields": {"scientific_name": "Crex crex", "bird_class": 23, "common_name": "Corn Crake", "code": 4}, "pk": 234, "model": "birds.bird"}, {"fields": {"scientific_name": "Rallus longirostris", "bird_class": 23, "common_name": "Clapper Rail", "code": 1}, "pk": 235, "model": "birds.bird"}, {"fields": {"scientific_name": "Rallus elegans", "bird_class": 23, "common_name": "King Rail", "code": 1}, "pk": 236, "model": "birds.bird"}, {"fields": {"scientific_name": "Rallus limicola", "bird_class": 23, "common_name": "Virginia Rail", "code": 1}, "pk": 237, "model": "birds.bird"}, {"fields": {"scientific_name": "Porzana carolina", "bird_class": 23, "common_name": "Sora", "code": 1}, "pk": 238, "model": "birds.bird"}, {"fields": {"scientific_name": "Neocrex erythrops", "bird_class": 23, "common_name": "Paint-billed Crake", "code": 5}, "pk": 239, "model": "birds.bird"}, {"fields": {"scientific_name": "Pardirallus maculatus", "bird_class": 23, "common_name": "Spotted Rail", "code": 5}, "pk": 240, "model": "birds.bird"}, {"fields": {"scientific_name": "Porphyrio martinicus", "bird_class": 23, "common_name": "Purple Gallinule", "code": 1}, "pk": 241, "model": "birds.bird"}, {"fields": {"scientific_name": "Gallinula galeata", "bird_class": 23, "common_name": "Common Gallinule", "code": 1}, "pk": 242, "model": "birds.bird"}, {"fields": {"scientific_name": "Fulica atra", "bird_class": 23, "common_name": "Eurasian Coot", "code": 5}, "pk": 243, "model": "birds.bird"}, {"fields": {"scientific_name": "Fulica americana", "bird_class": 23, "common_name": "American Coot", "code": 1}, "pk": 244, "model": "birds.bird"}, {"fields": {"scientific_name": "Heliornis fulica", "bird_class": 24, "common_name": "Sungrebe", "code": 5}, "pk": 245, "model": "birds.bird"}, {"fields": {"scientific_name": "Aramus guarauna", "bird_class": 25, "common_name": "Limpkin", "code": 2}, "pk": 246, "model": "birds.bird"}, {"fields": {"scientific_name": "Grus canadensis", "bird_class": 26, "common_name": "Sandhill Crane", "code": 1}, "pk": 247, "model": "birds.bird"}, {"fields": {"scientific_name": "Grus grus", "bird_class": 26, "common_name": "Common Crane", "code": 4}, "pk": 248, "model": "birds.bird"}, {"fields": {"scientific_name": "Grus americana", "bird_class": 26, "common_name": "Whooping Crane", "code": 2}, "pk": 249, "model": "birds.bird"}, {"fields": {"scientific_name": "Burhinus bistriatus", "bird_class": 27, "common_name": "Double-striped Thick-knee", "code": 5}, "pk": 250, "model": "birds.bird"}, {"fields": {"scientific_name": "Vanellus vanellus", "bird_class": 28, "common_name": "Northern Lapwing", "code": 4}, "pk": 251, "model": "birds.bird"}, {"fields": {"scientific_name": "Pluvialis squatarola", "bird_class": 28, "common_name": "Black-bellied Plover", "code": 1}, "pk": 252, "model": "birds.bird"}, {"fields": {"scientific_name": "Pluvialis apricaria", "bird_class": 28, "common_name": "European Golden-Plover", "code": 4}, "pk": 253, "model": "birds.bird"}, {"fields": {"scientific_name": "Pluvialis dominica", "bird_class": 28, "common_name": "American Golden-Plover", "code": 1}, "pk": 254, "model": "birds.bird"}, {"fields": {"scientific_name": "Pluvialis fulva", "bird_class": 28, "common_name": "Pacific Golden-Plover", "code": 2}, "pk": 255, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius mongolus", "bird_class": 28, "common_name": "Lesser Sand-Plover", "code": 3}, "pk": 256, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius leschenaultii", "bird_class": 28, "common_name": "Greater Sand-Plover", "code": 5}, "pk": 257, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius collaris", "bird_class": 28, "common_name": "Collared Plover", "code": 5}, "pk": 258, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius nivosus", "bird_class": 28, "common_name": "Snowy Plover", "code": 1}, "pk": 259, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius wilsonia", "bird_class": 28, "common_name": "Wilson's Plover", "code": 1}, "pk": 260, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius hiaticula", "bird_class": 28, "common_name": "Common Ringed Plover", "code": 2}, "pk": 261, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius semipalmatus", "bird_class": 28, "common_name": "Semipalmated Plover", "code": 1}, "pk": 262, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius melodus", "bird_class": 28, "common_name": "Piping Plover", "code": 2}, "pk": 263, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius dubius", "bird_class": 28, "common_name": "Little Ringed Plover", "code": 5}, "pk": 264, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius vociferus", "bird_class": 28, "common_name": "Killdeer", "code": 1}, "pk": 265, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius montanus", "bird_class": 28, "common_name": "Mountain Plover", "code": 2}, "pk": 266, "model": "birds.bird"}, {"fields": {"scientific_name": "Charadrius morinellus", "bird_class": 28, "common_name": "Eurasian Dotterel", "code": 4}, "pk": 267, "model": "birds.bird"}, {"fields": {"scientific_name": "Haematopus ostralegus", "bird_class": 29, "common_name": "Eurasian Oystercatcher", "code": 5}, "pk": 268, "model": "birds.bird"}, {"fields": {"scientific_name": "Haematopus palliatus", "bird_class": 29, "common_name": "American Oystercatcher", "code": 1}, "pk": 269, "model": "birds.bird"}, {"fields": {"scientific_name": "Haematopus bachmani", "bird_class": 29, "common_name": "Black Oystercatcher", "code": 1}, "pk": 270, "model": "birds.bird"}, {"fields": {"scientific_name": "Himantopus himantopus", "bird_class": 30, "common_name": "Black-winged Stilt", "code": 5}, "pk": 271, "model": "birds.bird"}, {"fields": {"scientific_name": "Himantopus mexicanus", "bird_class": 30, "common_name": "Black-necked Stilt", "code": 1}, "pk": 272, "model": "birds.bird"}, {"fields": {"scientific_name": "Recurvirostra americana", "bird_class": 30, "common_name": "American Avocet", "code": 1}, "pk": 273, "model": "birds.bird"}, {"fields": {"scientific_name": "Jacana spinosa", "bird_class": 31, "common_name": "Northern Jacana", "code": 4}, "pk": 274, "model": "birds.bird"}, {"fields": {"scientific_name": "Xenus cinereus", "bird_class": 32, "common_name": "Terek Sandpiper", "code": 3}, "pk": 275, "model": "birds.bird"}, {"fields": {"scientific_name": "Actitis hypoleucos", "bird_class": 32, "common_name": "Common Sandpiper", "code": 3}, "pk": 276, "model": "birds.bird"}, {"fields": {"scientific_name": "Actitis macularius", "bird_class": 32, "common_name": "Spotted Sandpiper", "code": 1}, "pk": 277, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa ochropus", "bird_class": 32, "common_name": "Green Sandpiper", "code": 4}, "pk": 278, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa solitaria", "bird_class": 32, "common_name": "Solitary Sandpiper", "code": 1}, "pk": 279, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa brevipes", "bird_class": 32, "common_name": "Gray-tailed Tattler", "code": 3}, "pk": 280, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa incana", "bird_class": 32, "common_name": "Wandering Tattler", "code": 1}, "pk": 281, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa erythropus", "bird_class": 32, "common_name": "Spotted Redshank", "code": 4}, "pk": 282, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa melanoleuca", "bird_class": 32, "common_name": "Greater Yellowlegs", "code": 1}, "pk": 283, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa nebularia", "bird_class": 32, "common_name": "Common Greenshank", "code": 3}, "pk": 284, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa semipalmata", "bird_class": 32, "common_name": "Willet", "code": 1}, "pk": 285, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa flavipes", "bird_class": 32, "common_name": "Lesser Yellowlegs", "code": 1}, "pk": 286, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa stagnatilis", "bird_class": 32, "common_name": "Marsh Sandpiper", "code": 5}, "pk": 287, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa glareola", "bird_class": 32, "common_name": "Wood Sandpiper", "code": 2}, "pk": 288, "model": "birds.bird"}, {"fields": {"scientific_name": "Tringa totanus", "bird_class": 32, "common_name": "Common Redshank", "code": 5}, "pk": 289, "model": "birds.bird"}, {"fields": {"scientific_name": "Bartramia longicauda", "bird_class": 32, "common_name": "Upland Sandpiper", "code": 1}, "pk": 290, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius minutus", "bird_class": 32, "common_name": "Little Curlew", "code": 5}, "pk": 291, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius borealis", "bird_class": 32, "common_name": "Eskimo Curlew", "code": 6}, "pk": 292, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius phaeopus", "bird_class": 32, "common_name": "Whimbrel", "code": 1}, "pk": 293, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius tahitiensis", "bird_class": 32, "common_name": "Bristle-thighed Curlew", "code": 2}, "pk": 294, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius madagascariensis", "bird_class": 32, "common_name": "Far Eastern Curlew", "code": 4}, "pk": 295, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius tenuirostris", "bird_class": 32, "common_name": "Slender-billed Curlew", "code": 6}, "pk": 296, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius arquata", "bird_class": 32, "common_name": "Eurasian Curlew", "code": 4}, "pk": 297, "model": "birds.bird"}, {"fields": {"scientific_name": "Numenius americanus", "bird_class": 32, "common_name": "Long-billed Curlew", "code": 1}, "pk": 298, "model": "birds.bird"}, {"fields": {"scientific_name": "Limosa limosa", "bird_class": 32, "common_name": "Black-tailed Godwit", "code": 3}, "pk": 299, "model": "birds.bird"}, {"fields": {"scientific_name": "Limosa haemastica", "bird_class": 32, "common_name": "Hudsonian Godwit", "code": 1}, "pk": 300, "model": "birds.bird"}, {"fields": {"scientific_name": "Limosa lapponica", "bird_class": 32, "common_name": "Bar-tailed Godwit", "code": 2}, "pk": 301, "model": "birds.bird"}, {"fields": {"scientific_name": "Limosa fedoa", "bird_class": 32, "common_name": "Marbled Godwit", "code": 1}, "pk": 302, "model": "birds.bird"}, {"fields": {"scientific_name": "Arenaria interpres", "bird_class": 32, "common_name": "Ruddy Turnstone", "code": 1}, "pk": 303, "model": "birds.bird"}, {"fields": {"scientific_name": "Arenaria melanocephala", "bird_class": 32, "common_name": "Black Turnstone", "code": 1}, "pk": 304, "model": "birds.bird"}, {"fields": {"scientific_name": "Aphriza virgata", "bird_class": 32, "common_name": "Surfbird", "code": 1}, "pk": 305, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris tenuirostris", "bird_class": 32, "common_name": "Great Knot", "code": 4}, "pk": 306, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris canutus", "bird_class": 32, "common_name": "Red Knot", "code": 1}, "pk": 307, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris alba", "bird_class": 32, "common_name": "Sanderling", "code": 1}, "pk": 308, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris pusilla", "bird_class": 32, "common_name": "Semipalmated Sandpiper", "code": 1}, "pk": 309, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris mauri", "bird_class": 32, "common_name": "Western Sandpiper", "code": 1}, "pk": 310, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris ruficollis", "bird_class": 32, "common_name": "Red-necked Stint", "code": 3}, "pk": 311, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris minuta", "bird_class": 32, "common_name": "Little Stint", "code": 4}, "pk": 312, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris temminckii", "bird_class": 32, "common_name": "Temminck's Stint", "code": 3}, "pk": 313, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris subminuta", "bird_class": 32, "common_name": "Long-toed Stint", "code": 3}, "pk": 314, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris minutilla", "bird_class": 32, "common_name": "Least Sandpiper", "code": 1}, "pk": 315, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris fuscicollis", "bird_class": 32, "common_name": "White-rumped Sandpiper", "code": 1}, "pk": 316, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris bairdii", "bird_class": 32, "common_name": "Baird's Sandpiper", "code": 1}, "pk": 317, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris melanotos", "bird_class": 32, "common_name": "Pectoral Sandpiper", "code": 1}, "pk": 318, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris acuminata", "bird_class": 32, "common_name": "Sharp-tailed Sandpiper", "code": 3}, "pk": 319, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris maritima", "bird_class": 32, "common_name": "Purple Sandpiper", "code": 1}, "pk": 320, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris ptilocnemis", "bird_class": 32, "common_name": "Rock Sandpiper", "code": 2}, "pk": 321, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris alpina", "bird_class": 32, "common_name": "Dunlin", "code": 1}, "pk": 322, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris ferruginea", "bird_class": 32, "common_name": "Curlew Sandpiper", "code": 3}, "pk": 323, "model": "birds.bird"}, {"fields": {"scientific_name": "Calidris himantopus", "bird_class": 32, "common_name": "Stilt Sandpiper", "code": 1}, "pk": 324, "model": "birds.bird"}, {"fields": {"scientific_name": "Eurynorhynchus pygmeus", "bird_class": 32, "common_name": "Spoon-billed Sandpiper", "code": 4}, "pk": 325, "model": "birds.bird"}, {"fields": {"scientific_name": "Limicola falcinellus", "bird_class": 32, "common_name": "Broad-billed Sandpiper", "code": 4}, "pk": 326, "model": "birds.bird"}, {"fields": {"scientific_name": "Tryngites subruficollis", "bird_class": 32, "common_name": "Buff-breasted Sandpiper", "code": 1}, "pk": 327, "model": "birds.bird"}, {"fields": {"scientific_name": "Philomachus pugnax", "bird_class": 32, "common_name": "Ruff", "code": 3}, "pk": 328, "model": "birds.bird"}, {"fields": {"scientific_name": "Limnodromus griseus", "bird_class": 32, "common_name": "Short-billed Dowitcher", "code": 1}, "pk": 329, "model": "birds.bird"}, {"fields": {"scientific_name": "Limnodromus scolopaceus", "bird_class": 32, "common_name": "Long-billed Dowitcher", "code": 1}, "pk": 330, "model": "birds.bird"}, {"fields": {"scientific_name": "Lymnocryptes minimus", "bird_class": 32, "common_name": "Jack Snipe", "code": 4}, "pk": 331, "model": "birds.bird"}, {"fields": {"scientific_name": "Gallinago delicata", "bird_class": 32, "common_name": "Wilson's Snipe", "code": 1}, "pk": 332, "model": "birds.bird"}, {"fields": {"scientific_name": "Gallinago gallinago", "bird_class": 32, "common_name": "Common Snipe", "code": 3}, "pk": 333, "model": "birds.bird"}, {"fields": {"scientific_name": "Gallinago stenura", "bird_class": 32, "common_name": "Pin-tailed Snipe", "code": 5}, "pk": 334, "model": "birds.bird"}, {"fields": {"scientific_name": "Gallinago solitaria", "bird_class": 32, "common_name": "Solitary Snipe", "code": 5}, "pk": 335, "model": "birds.bird"}, {"fields": {"scientific_name": "Scolopax rusticola", "bird_class": 32, "common_name": "Eurasian Woodcock", "code": 5}, "pk": 336, "model": "birds.bird"}, {"fields": {"scientific_name": "Scolopax minor", "bird_class": 32, "common_name": "American Woodcock", "code": 1}, "pk": 337, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalaropus tricolor", "bird_class": 32, "common_name": "Wilson's Phalarope", "code": 1}, "pk": 338, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalaropus lobatus", "bird_class": 32, "common_name": "Red-necked Phalarope", "code": 1}, "pk": 339, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalaropus fulicarius", "bird_class": 32, "common_name": "Red Phalarope", "code": 1}, "pk": 340, "model": "birds.bird"}, {"fields": {"scientific_name": "Glareola maldivarum", "bird_class": 33, "common_name": "Oriental Pratincole", "code": 5}, "pk": 341, "model": "birds.bird"}, {"fields": {"scientific_name": "Creagrus furcatus", "bird_class": 34, "common_name": "Swallow-tailed Gull", "code": 5}, "pk": 342, "model": "birds.bird"}, {"fields": {"scientific_name": "Rissa tridactyla", "bird_class": 34, "common_name": "Black-legged Kittiwake", "code": 1}, "pk": 343, "model": "birds.bird"}, {"fields": {"scientific_name": "Rissa brevirostris", "bird_class": 34, "common_name": "Red-legged Kittiwake", "code": 2}, "pk": 344, "model": "birds.bird"}, {"fields": {"scientific_name": "Pagophila eburnea", "bird_class": 34, "common_name": "Ivory Gull", "code": 3}, "pk": 345, "model": "birds.bird"}, {"fields": {"scientific_name": "Xema sabini", "bird_class": 34, "common_name": "Sabine's Gull", "code": 1}, "pk": 346, "model": "birds.bird"}, {"fields": {"scientific_name": "Chroicocephalus philadelphia", "bird_class": 34, "common_name": "Bonaparte's Gull", "code": 1}, "pk": 347, "model": "birds.bird"}, {"fields": {"scientific_name": "Chroicocephalus cirrocephalus", "bird_class": 34, "common_name": "Gray-hooded Gull", "code": 5}, "pk": 348, "model": "birds.bird"}, {"fields": {"scientific_name": "Chroicocephalus ridibundus", "bird_class": 34, "common_name": "Black-headed Gull", "code": 3}, "pk": 349, "model": "birds.bird"}, {"fields": {"scientific_name": "Hydrocoloeus minutus", "bird_class": 34, "common_name": "Little Gull", "code": 3}, "pk": 350, "model": "birds.bird"}, {"fields": {"scientific_name": "Rhodostethia rosea", "bird_class": 34, "common_name": "Ross's Gull", "code": 3}, "pk": 351, "model": "birds.bird"}, {"fields": {"scientific_name": "Leucophaeus atricilla", "bird_class": 34, "common_name": "Laughing Gull", "code": 1}, "pk": 352, "model": "birds.bird"}, {"fields": {"scientific_name": "Leucophaeus pipixcan", "bird_class": 34, "common_name": "Franklin's Gull", "code": 1}, "pk": 353, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus belcheri", "bird_class": 34, "common_name": "Belcher's Gull", "code": 5}, "pk": 354, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus crassirostris", "bird_class": 34, "common_name": "Black-tailed Gull", "code": 4}, "pk": 355, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus heermanni", "bird_class": 34, "common_name": "Heermann's Gull", "code": 1}, "pk": 356, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus canus", "bird_class": 34, "common_name": "Mew Gull", "code": 1}, "pk": 357, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus delawarensis", "bird_class": 34, "common_name": "Ring-billed Gull", "code": 1}, "pk": 358, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus occidentalis", "bird_class": 34, "common_name": "Western Gull", "code": 1}, "pk": 359, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus livens", "bird_class": 34, "common_name": "Yellow-footed Gull", "code": 2}, "pk": 360, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus californicus", "bird_class": 34, "common_name": "California Gull", "code": 1}, "pk": 361, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus argentatus", "bird_class": 34, "common_name": "Herring Gull", "code": 1}, "pk": 362, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus michahellis", "bird_class": 34, "common_name": "Yellow-legged Gull", "code": 4}, "pk": 363, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus thayeri", "bird_class": 34, "common_name": "Thayer's Gull", "code": 2}, "pk": 364, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus glaucoides", "bird_class": 34, "common_name": "Iceland Gull", "code": 2}, "pk": 365, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus fuscus", "bird_class": 34, "common_name": "Lesser Black-backed Gull", "code": 2}, "pk": 366, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus schistisagus", "bird_class": 34, "common_name": "Slaty-backed Gull", "code": 3}, "pk": 367, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus glaucescens", "bird_class": 34, "common_name": "Glaucous-winged Gull", "code": 1}, "pk": 368, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus hyperboreus", "bird_class": 34, "common_name": "Glaucous Gull", "code": 1}, "pk": 369, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus marinus", "bird_class": 34, "common_name": "Great Black-backed Gull", "code": 1}, "pk": 370, "model": "birds.bird"}, {"fields": {"scientific_name": "Larus dominicanus", "bird_class": 34, "common_name": "Kelp Gull", "code": 4}, "pk": 371, "model": "birds.bird"}, {"fields": {"scientific_name": "Anous stolidus", "bird_class": 34, "common_name": "Brown Noddy", "code": 2}, "pk": 372, "model": "birds.bird"}, {"fields": {"scientific_name": "Anous minutus", "bird_class": 34, "common_name": "Black Noddy", "code": 3}, "pk": 373, "model": "birds.bird"}, {"fields": {"scientific_name": "Onychoprion fuscatus", "bird_class": 34, "common_name": "Sooty Tern", "code": 2}, "pk": 374, "model": "birds.bird"}, {"fields": {"scientific_name": "Onychoprion anaethetus", "bird_class": 34, "common_name": "Bridled Tern", "code": 2}, "pk": 375, "model": "birds.bird"}, {"fields": {"scientific_name": "Onychoprion aleuticus", "bird_class": 34, "common_name": "Aleutian Tern", "code": 2}, "pk": 376, "model": "birds.bird"}, {"fields": {"scientific_name": "Sternula antillarum", "bird_class": 34, "common_name": "Least Tern", "code": 1}, "pk": 377, "model": "birds.bird"}, {"fields": {"scientific_name": "Phaetusa simplex", "bird_class": 34, "common_name": "Large-billed Tern", "code": 5}, "pk": 378, "model": "birds.bird"}, {"fields": {"scientific_name": "Gelochelidon nilotica", "bird_class": 34, "common_name": "Gull-billed Tern", "code": 1}, "pk": 379, "model": "birds.bird"}, {"fields": {"scientific_name": "Hydroprogne caspia", "bird_class": 34, "common_name": "Caspian Tern", "code": 1}, "pk": 380, "model": "birds.bird"}, {"fields": {"scientific_name": "Chlidonias niger", "bird_class": 34, "common_name": "Black Tern", "code": 1}, "pk": 381, "model": "birds.bird"}, {"fields": {"scientific_name": "Chlidonias leucopterus", "bird_class": 34, "common_name": "White-winged Tern", "code": 4}, "pk": 382, "model": "birds.bird"}, {"fields": {"scientific_name": "Chlidonias hybrida", "bird_class": 34, "common_name": "Whiskered Tern", "code": 5}, "pk": 383, "model": "birds.bird"}, {"fields": {"scientific_name": "Sterna dougallii", "bird_class": 34, "common_name": "Roseate Tern", "code": 2}, "pk": 384, "model": "birds.bird"}, {"fields": {"scientific_name": "Sterna hirundo", "bird_class": 34, "common_name": "Common Tern", "code": 1}, "pk": 385, "model": "birds.bird"}, {"fields": {"scientific_name": "Sterna paradisaea", "bird_class": 34, "common_name": "Arctic Tern", "code": 1}, "pk": 386, "model": "birds.bird"}, {"fields": {"scientific_name": "Sterna forsteri", "bird_class": 34, "common_name": "Forster's Tern", "code": 1}, "pk": 387, "model": "birds.bird"}, {"fields": {"scientific_name": "Thalasseus maximus", "bird_class": 34, "common_name": "Royal Tern", "code": 1}, "pk": 388, "model": "birds.bird"}, {"fields": {"scientific_name": "Thalasseus sandvicensis", "bird_class": 34, "common_name": "Sandwich Tern", "code": 1}, "pk": 389, "model": "birds.bird"}, {"fields": {"scientific_name": "Thalasseus elegans", "bird_class": 34, "common_name": "Elegant Tern", "code": 1}, "pk": 390, "model": "birds.bird"}, {"fields": {"scientific_name": "Rynchops niger", "bird_class": 34, "common_name": "Black Skimmer", "code": 1}, "pk": 391, "model": "birds.bird"}, {"fields": {"scientific_name": "Stercorarius skua", "bird_class": 35, "common_name": "Great Skua", "code": 3}, "pk": 392, "model": "birds.bird"}, {"fields": {"scientific_name": "Stercorarius maccormicki", "bird_class": 35, "common_name": "South Polar Skua", "code": 2}, "pk": 393, "model": "birds.bird"}, {"fields": {"scientific_name": "Stercorarius pomarinus", "bird_class": 35, "common_name": "Pomarine Jaeger", "code": 1}, "pk": 394, "model": "birds.bird"}, {"fields": {"scientific_name": "Stercorarius parasiticus", "bird_class": 35, "common_name": "Parasitic Jaeger", "code": 1}, "pk": 395, "model": "birds.bird"}, {"fields": {"scientific_name": "Stercorarius longicaudus", "bird_class": 35, "common_name": "Long-tailed Jaeger", "code": 1}, "pk": 396, "model": "birds.bird"}, {"fields": {"scientific_name": "Alle alle", "bird_class": 36, "common_name": "Dovekie", "code": 2}, "pk": 397, "model": "birds.bird"}, {"fields": {"scientific_name": "Uria aalge", "bird_class": 36, "common_name": "Common Murre", "code": 1}, "pk": 398, "model": "birds.bird"}, {"fields": {"scientific_name": "Uria lomvia", "bird_class": 36, "common_name": "Thick-billed Murre", "code": 1}, "pk": 399, "model": "birds.bird"}, {"fields": {"scientific_name": "Alca torda", "bird_class": 36, "common_name": "Razorbill", "code": 1}, "pk": 400, "model": "birds.bird"}, {"fields": {"scientific_name": "Pinguinus impennis", "bird_class": 36, "common_name": "Great Auk", "code": 6}, "pk": 401, "model": "birds.bird"}, {"fields": {"scientific_name": "Cepphus grylle", "bird_class": 36, "common_name": "Black Guillemot", "code": 1}, "pk": 402, "model": "birds.bird"}, {"fields": {"scientific_name": "Cepphus columba", "bird_class": 36, "common_name": "Pigeon Guillemot", "code": 1}, "pk": 403, "model": "birds.bird"}, {"fields": {"scientific_name": "Brachyramphus perdix", "bird_class": 36, "common_name": "Long-billed Murrelet", "code": 3}, "pk": 404, "model": "birds.bird"}, {"fields": {"scientific_name": "Brachyramphus marmoratus", "bird_class": 36, "common_name": "Marbled Murrelet", "code": 1}, "pk": 405, "model": "birds.bird"}, {"fields": {"scientific_name": "Brachyramphus brevirostris", "bird_class": 36, "common_name": "Kittlitz's Murrelet", "code": 2}, "pk": 406, "model": "birds.bird"}, {"fields": {"scientific_name": "Synthliboramphus scrippsi", "bird_class": 36, "common_name": "Scripps\u2019s Murrelet", "code": 2}, "pk": 407, "model": "birds.bird"}, {"fields": {"scientific_name": "Synthliboramphus hypoleucus", "bird_class": 36, "common_name": "Guadalupe Murrelet", "code": 3}, "pk": 408, "model": "birds.bird"}, {"fields": {"scientific_name": "Synthliboramphus craveri", "bird_class": 36, "common_name": "Craveri's Murrelet", "code": 3}, "pk": 409, "model": "birds.bird"}, {"fields": {"scientific_name": "Synthliboramphus antiquus", "bird_class": 36, "common_name": "Ancient Murrelet", "code": 2}, "pk": 410, "model": "birds.bird"}, {"fields": {"scientific_name": "Ptychoramphus aleuticus", "bird_class": 36, "common_name": "Cassin's Auklet", "code": 1}, "pk": 411, "model": "birds.bird"}, {"fields": {"scientific_name": "Aethia psittacula", "bird_class": 36, "common_name": "Parakeet Auklet", "code": 2}, "pk": 412, "model": "birds.bird"}, {"fields": {"scientific_name": "Aethia pusilla", "bird_class": 36, "common_name": "Least Auklet", "code": 2}, "pk": 413, "model": "birds.bird"}, {"fields": {"scientific_name": "Aethia pygmaea", "bird_class": 36, "common_name": "Whiskered Auklet", "code": 2}, "pk": 414, "model": "birds.bird"}, {"fields": {"scientific_name": "Aethia cristatella", "bird_class": 36, "common_name": "Crested Auklet", "code": 2}, "pk": 415, "model": "birds.bird"}, {"fields": {"scientific_name": "Cerorhinca monocerata", "bird_class": 36, "common_name": "Rhinoceros Auklet", "code": 1}, "pk": 416, "model": "birds.bird"}, {"fields": {"scientific_name": "Fratercula arctica", "bird_class": 36, "common_name": "Atlantic Puffin", "code": 1}, "pk": 417, "model": "birds.bird"}, {"fields": {"scientific_name": "Fratercula corniculata", "bird_class": 36, "common_name": "Horned Puffin", "code": 1}, "pk": 418, "model": "birds.bird"}, {"fields": {"scientific_name": "Fratercula cirrhata", "bird_class": 36, "common_name": "Tufted Puffin", "code": 1}, "pk": 419, "model": "birds.bird"}, {"fields": {"scientific_name": "Columba livia", "bird_class": 37, "common_name": "Rock Pigeon", "code": 1}, "pk": 420, "model": "birds.bird"}, {"fields": {"scientific_name": "Patagioenas squamosa", "bird_class": 37, "common_name": "Scaly-naped Pigeon", "code": 5}, "pk": 421, "model": "birds.bird"}, {"fields": {"scientific_name": "Patagioenas leucocephala", "bird_class": 37, "common_name": "White-crowned Pigeon", "code": 2}, "pk": 422, "model": "birds.bird"}, {"fields": {"scientific_name": "Patagioenas flavirostris", "bird_class": 37, "common_name": "Red-billed Pigeon", "code": 2}, "pk": 423, "model": "birds.bird"}, {"fields": {"scientific_name": "Patagioenas fasciata", "bird_class": 37, "common_name": "Band-tailed Pigeon", "code": 1}, "pk": 424, "model": "birds.bird"}, {"fields": {"scientific_name": "Streptopelia orientalis", "bird_class": 37, "common_name": "Oriental Turtle-Dove", "code": 4}, "pk": 425, "model": "birds.bird"}, {"fields": {"scientific_name": "Streptopelia turtur", "bird_class": 37, "common_name": "European Turtle-Dove", "code": 5}, "pk": 426, "model": "birds.bird"}, {"fields": {"scientific_name": "Streptopelia decaocto", "bird_class": 37, "common_name": "Eurasian Collared-Dove", "code": 1}, "pk": 427, "model": "birds.bird"}, {"fields": {"scientific_name": "Streptopelia chinensis", "bird_class": 37, "common_name": "Spotted Dove", "code": 2}, "pk": 428, "model": "birds.bird"}, {"fields": {"scientific_name": "Zenaida asiatica", "bird_class": 37, "common_name": "White-winged Dove", "code": 1}, "pk": 429, "model": "birds.bird"}, {"fields": {"scientific_name": "Zenaida aurita", "bird_class": 37, "common_name": "Zenaida Dove", "code": 5}, "pk": 430, "model": "birds.bird"}, {"fields": {"scientific_name": "Zenaida macroura", "bird_class": 37, "common_name": "Mourning Dove", "code": 1}, "pk": 431, "model": "birds.bird"}, {"fields": {"scientific_name": "Ectopistes migratorius", "bird_class": 37, "common_name": "Passenger Pigeon", "code": 6}, "pk": 432, "model": "birds.bird"}, {"fields": {"scientific_name": "Columbina inca", "bird_class": 37, "common_name": "Inca Dove", "code": 1}, "pk": 433, "model": "birds.bird"}, {"fields": {"scientific_name": "Columbina passerina", "bird_class": 37, "common_name": "Common Ground-Dove", "code": 1}, "pk": 434, "model": "birds.bird"}, {"fields": {"scientific_name": "Columbina talpacoti", "bird_class": 37, "common_name": "Ruddy Ground-Dove", "code": 3}, "pk": 435, "model": "birds.bird"}, {"fields": {"scientific_name": "Leptotila verreauxi", "bird_class": 37, "common_name": "White-tipped Dove", "code": 2}, "pk": 436, "model": "birds.bird"}, {"fields": {"scientific_name": "Geotrygon chrysia", "bird_class": 37, "common_name": "Key West Quail-Dove", "code": 4}, "pk": 437, "model": "birds.bird"}, {"fields": {"scientific_name": "Geotrygon montana", "bird_class": 37, "common_name": "Ruddy Quail-Dove", "code": 5}, "pk": 438, "model": "birds.bird"}, {"fields": {"scientific_name": "Cuculus canorus", "bird_class": 38, "common_name": "Common Cuckoo", "code": 3}, "pk": 439, "model": "birds.bird"}, {"fields": {"scientific_name": "Cuculus optatus", "bird_class": 38, "common_name": "Oriental Cuckoo", "code": 4}, "pk": 440, "model": "birds.bird"}, {"fields": {"scientific_name": "Coccyzus americanus", "bird_class": 38, "common_name": "Yellow-billed Cuckoo", "code": 1}, "pk": 441, "model": "birds.bird"}, {"fields": {"scientific_name": "Coccyzus minor", "bird_class": 38, "common_name": "Mangrove Cuckoo", "code": 2}, "pk": 442, "model": "birds.bird"}, {"fields": {"scientific_name": "Coccyzus erythropthalmus", "bird_class": 38, "common_name": "Black-billed Cuckoo", "code": 1}, "pk": 443, "model": "birds.bird"}, {"fields": {"scientific_name": "Geococcyx californianus", "bird_class": 38, "common_name": "Greater Roadrunner", "code": 1}, "pk": 444, "model": "birds.bird"}, {"fields": {"scientific_name": "Crotophaga ani", "bird_class": 38, "common_name": "Smooth-billed Ani", "code": 3}, "pk": 445, "model": "birds.bird"}, {"fields": {"scientific_name": "Crotophaga sulcirostris", "bird_class": 38, "common_name": "Groove-billed Ani", "code": 2}, "pk": 446, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyto alba", "bird_class": 39, "common_name": "Barn Owl", "code": 1}, "pk": 447, "model": "birds.bird"}, {"fields": {"scientific_name": "Otus flammeolus", "bird_class": 40, "common_name": "Flammulated Owl", "code": 2}, "pk": 448, "model": "birds.bird"}, {"fields": {"scientific_name": "Otus sunia", "bird_class": 40, "common_name": "Oriental Scops-Owl", "code": 5}, "pk": 449, "model": "birds.bird"}, {"fields": {"scientific_name": "Megascops kennicottii", "bird_class": 40, "common_name": "Western Screech-Owl", "code": 1}, "pk": 450, "model": "birds.bird"}, {"fields": {"scientific_name": "Megascops asio", "bird_class": 40, "common_name": "Eastern Screech-Owl", "code": 1}, "pk": 451, "model": "birds.bird"}, {"fields": {"scientific_name": "Megascops trichopsis", "bird_class": 40, "common_name": "Whiskered Screech-Owl", "code": 2}, "pk": 452, "model": "birds.bird"}, {"fields": {"scientific_name": "Bubo virginianus", "bird_class": 40, "common_name": "Great Horned Owl", "code": 1}, "pk": 453, "model": "birds.bird"}, {"fields": {"scientific_name": "Bubo scandiacus", "bird_class": 40, "common_name": "Snowy Owl", "code": 2}, "pk": 454, "model": "birds.bird"}, {"fields": {"scientific_name": "Surnia ulula", "bird_class": 40, "common_name": "Northern Hawk Owl", "code": 2}, "pk": 455, "model": "birds.bird"}, {"fields": {"scientific_name": "Glaucidium gnoma", "bird_class": 40, "common_name": "Northern Pygmy-Owl", "code": 2}, "pk": 456, "model": "birds.bird"}, {"fields": {"scientific_name": "Glaucidium brasilianum", "bird_class": 40, "common_name": "Ferruginous Pygmy-Owl", "code": 3}, "pk": 457, "model": "birds.bird"}, {"fields": {"scientific_name": "Micrathene whitneyi", "bird_class": 40, "common_name": "Elf Owl", "code": 2}, "pk": 458, "model": "birds.bird"}, {"fields": {"scientific_name": "Athene cunicularia", "bird_class": 40, "common_name": "Burrowing Owl", "code": 1}, "pk": 459, "model": "birds.bird"}, {"fields": {"scientific_name": "Ciccaba virgata", "bird_class": 40, "common_name": "Mottled Owl", "code": 5}, "pk": 460, "model": "birds.bird"}, {"fields": {"scientific_name": "Strix occidentalis", "bird_class": 40, "common_name": "Spotted Owl", "code": 2}, "pk": 461, "model": "birds.bird"}, {"fields": {"scientific_name": "Strix varia", "bird_class": 40, "common_name": "Barred Owl", "code": 1}, "pk": 462, "model": "birds.bird"}, {"fields": {"scientific_name": "Strix nebulosa", "bird_class": 40, "common_name": "Great Gray Owl", "code": 2}, "pk": 463, "model": "birds.bird"}, {"fields": {"scientific_name": "Asio otus", "bird_class": 40, "common_name": "Long-eared Owl", "code": 2}, "pk": 464, "model": "birds.bird"}, {"fields": {"scientific_name": "Asio stygius", "bird_class": 40, "common_name": "Stygian Owl", "code": 5}, "pk": 465, "model": "birds.bird"}, {"fields": {"scientific_name": "Asio flammeus", "bird_class": 40, "common_name": "Short-eared Owl", "code": 1}, "pk": 466, "model": "birds.bird"}, {"fields": {"scientific_name": "Aegolius funereus", "bird_class": 40, "common_name": "Boreal Owl", "code": 2}, "pk": 467, "model": "birds.bird"}, {"fields": {"scientific_name": "Aegolius acadicus", "bird_class": 40, "common_name": "Northern Saw-whet Owl", "code": 2}, "pk": 468, "model": "birds.bird"}, {"fields": {"scientific_name": "Ninox scutulata", "bird_class": 40, "common_name": "Brown Hawk-Owl", "code": 5}, "pk": 469, "model": "birds.bird"}, {"fields": {"scientific_name": "Chordeiles acutipennis", "bird_class": 41, "common_name": "Lesser Nighthawk", "code": 1}, "pk": 470, "model": "birds.bird"}, {"fields": {"scientific_name": "Chordeiles minor", "bird_class": 41, "common_name": "Common Nighthawk", "code": 1}, "pk": 471, "model": "birds.bird"}, {"fields": {"scientific_name": "Chordeiles gundlachii", "bird_class": 41, "common_name": "Antillean Nighthawk", "code": 2}, "pk": 472, "model": "birds.bird"}, {"fields": {"scientific_name": "Nyctidromus albicollis", "bird_class": 41, "common_name": "Common Pauraque", "code": 2}, "pk": 473, "model": "birds.bird"}, {"fields": {"scientific_name": "Phalaenoptilus nuttallii", "bird_class": 41, "common_name": "Common Poorwill", "code": 1}, "pk": 474, "model": "birds.bird"}, {"fields": {"scientific_name": "Antrostomus carolinensis", "bird_class": 41, "common_name": "Chuck-will's-widow", "code": 1}, "pk": 475, "model": "birds.bird"}, {"fields": {"scientific_name": "Antrostomus ridgwayi", "bird_class": 41, "common_name": "Buff-collared Nightjar", "code": 3}, "pk": 476, "model": "birds.bird"}, {"fields": {"scientific_name": "Antrostomus vociferus", "bird_class": 41, "common_name": "Eastern Whip-poor-will", "code": 1}, "pk": 477, "model": "birds.bird"}, {"fields": {"scientific_name": "Antrostomus arizonae", "bird_class": 41, "common_name": "Mexican Whip-poor-will", "code": 1}, "pk": 478, "model": "birds.bird"}, {"fields": {"scientific_name": "Caprimulgus indicus", "bird_class": 41, "common_name": "Gray Nightjar", "code": 5}, "pk": 479, "model": "birds.bird"}, {"fields": {"scientific_name": "Cypseloides niger", "bird_class": 42, "common_name": "Black Swift", "code": 2}, "pk": 480, "model": "birds.bird"}, {"fields": {"scientific_name": "Streptoprocne zonaris", "bird_class": 42, "common_name": "White-collared Swift", "code": 4}, "pk": 481, "model": "birds.bird"}, {"fields": {"scientific_name": "Chaetura pelagica", "bird_class": 42, "common_name": "Chimney Swift", "code": 1}, "pk": 482, "model": "birds.bird"}, {"fields": {"scientific_name": "Chaetura vauxi", "bird_class": 42, "common_name": "Vaux's Swift", "code": 1}, "pk": 483, "model": "birds.bird"}, {"fields": {"scientific_name": "Hirundapus caudacutus", "bird_class": 42, "common_name": "White-throated Needletail", "code": 5}, "pk": 484, "model": "birds.bird"}, {"fields": {"scientific_name": "Apus apus", "bird_class": 42, "common_name": "Common Swift", "code": 5}, "pk": 485, "model": "birds.bird"}, {"fields": {"scientific_name": "Apus pacificus", "bird_class": 42, "common_name": "Fork-tailed Swift", "code": 4}, "pk": 486, "model": "birds.bird"}, {"fields": {"scientific_name": "Aeronautes saxatalis", "bird_class": 42, "common_name": "White-throated Swift", "code": 1}, "pk": 487, "model": "birds.bird"}, {"fields": {"scientific_name": "Tachornis phoenicobia", "bird_class": 42, "common_name": "Antillean Palm-Swift", "code": 5}, "pk": 488, "model": "birds.bird"}, {"fields": {"scientific_name": "Colibri thalassinus", "bird_class": 43, "common_name": "Green Violetear", "code": 3}, "pk": 489, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthracothorax prevostii", "bird_class": 43, "common_name": "Green-breasted Mango", "code": 4}, "pk": 490, "model": "birds.bird"}, {"fields": {"scientific_name": "Eugenes fulgens", "bird_class": 43, "common_name": "Magnificent Hummingbird", "code": 2}, "pk": 491, "model": "birds.bird"}, {"fields": {"scientific_name": "Heliomaster constantii", "bird_class": 43, "common_name": "Plain-capped Starthroat", "code": 4}, "pk": 492, "model": "birds.bird"}, {"fields": {"scientific_name": "Lampornis clemenciae", "bird_class": 43, "common_name": "Blue-throated Hummingbird", "code": 2}, "pk": 493, "model": "birds.bird"}, {"fields": {"scientific_name": "Calliphlox evelynae", "bird_class": 43, "common_name": "Bahama Woodstar", "code": 5}, "pk": 494, "model": "birds.bird"}, {"fields": {"scientific_name": "Calothorax lucifer", "bird_class": 43, "common_name": "Lucifer Hummingbird", "code": 2}, "pk": 495, "model": "birds.bird"}, {"fields": {"scientific_name": "Archilochus colubris", "bird_class": 43, "common_name": "Ruby-throated Hummingbird", "code": 1}, "pk": 496, "model": "birds.bird"}, {"fields": {"scientific_name": "Archilochus alexandri", "bird_class": 43, "common_name": "Black-chinned Hummingbird", "code": 1}, "pk": 497, "model": "birds.bird"}, {"fields": {"scientific_name": "Calypte anna", "bird_class": 43, "common_name": "Anna's Hummingbird", "code": 1}, "pk": 498, "model": "birds.bird"}, {"fields": {"scientific_name": "Calypte costae", "bird_class": 43, "common_name": "Costa's Hummingbird", "code": 1}, "pk": 499, "model": "birds.bird"}, {"fields": {"scientific_name": "Atthis heloisa", "bird_class": 43, "common_name": "Bumblebee Hummingbird", "code": 5}, "pk": 500, "model": "birds.bird"}, {"fields": {"scientific_name": "Selasphorus platycercus", "bird_class": 43, "common_name": "Broad-tailed Hummingbird", "code": 1}, "pk": 501, "model": "birds.bird"}, {"fields": {"scientific_name": "Selasphorus rufus", "bird_class": 43, "common_name": "Rufous Hummingbird", "code": 1}, "pk": 502, "model": "birds.bird"}, {"fields": {"scientific_name": "Selasphorus sasin", "bird_class": 43, "common_name": "Allen's Hummingbird", "code": 1}, "pk": 503, "model": "birds.bird"}, {"fields": {"scientific_name": "Selasphorus calliope", "bird_class": 43, "common_name": "Calliope Hummingbird", "code": 1}, "pk": 504, "model": "birds.bird"}, {"fields": {"scientific_name": "Cynanthus latirostris", "bird_class": 43, "common_name": "Broad-billed Hummingbird", "code": 2}, "pk": 505, "model": "birds.bird"}, {"fields": {"scientific_name": "Amazilia beryllina", "bird_class": 43, "common_name": "Berylline Hummingbird", "code": 3}, "pk": 506, "model": "birds.bird"}, {"fields": {"scientific_name": "Amazilia yucatanensis", "bird_class": 43, "common_name": "Buff-bellied Hummingbird", "code": 2}, "pk": 507, "model": "birds.bird"}, {"fields": {"scientific_name": "Amazilia rutila", "bird_class": 43, "common_name": "Cinnamon Hummingbird", "code": 5}, "pk": 508, "model": "birds.bird"}, {"fields": {"scientific_name": "Amazilia violiceps", "bird_class": 43, "common_name": "Violet-crowned Hummingbird", "code": 2}, "pk": 509, "model": "birds.bird"}, {"fields": {"scientific_name": "Hylocharis leucotis", "bird_class": 43, "common_name": "White-eared Hummingbird", "code": 3}, "pk": 510, "model": "birds.bird"}, {"fields": {"scientific_name": "Hylocharis xantusii", "bird_class": 43, "common_name": "Xantus's Hummingbird", "code": 5}, "pk": 511, "model": "birds.bird"}, {"fields": {"scientific_name": "Trogon elegans", "bird_class": 44, "common_name": "Elegant Trogon", "code": 2}, "pk": 512, "model": "birds.bird"}, {"fields": {"scientific_name": "Euptilotis neoxenus", "bird_class": 44, "common_name": "Eared Quetzal", "code": 4}, "pk": 513, "model": "birds.bird"}, {"fields": {"scientific_name": "Upupa epops", "bird_class": 45, "common_name": "Eurasian Hoopoe", "code": 5}, "pk": 514, "model": "birds.bird"}, {"fields": {"scientific_name": "Megaceryle torquata", "bird_class": 46, "common_name": "Ringed Kingfisher", "code": 2}, "pk": 515, "model": "birds.bird"}, {"fields": {"scientific_name": "Megaceryle alcyon", "bird_class": 46, "common_name": "Belted Kingfisher", "code": 1}, "pk": 516, "model": "birds.bird"}, {"fields": {"scientific_name": "Chloroceryle amazona", "bird_class": 46, "common_name": "Amazon Kingfisher", "code": 5}, "pk": 517, "model": "birds.bird"}, {"fields": {"scientific_name": "Chloroceryle americana", "bird_class": 46, "common_name": "Green Kingfisher", "code": 2}, "pk": 518, "model": "birds.bird"}, {"fields": {"scientific_name": "Jynx torquilla", "bird_class": 47, "common_name": "Eurasian Wryneck", "code": 5}, "pk": 519, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanerpes lewis", "bird_class": 47, "common_name": "Lewis's Woodpecker", "code": 1}, "pk": 520, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanerpes erythrocephalus", "bird_class": 47, "common_name": "Red-headed Woodpecker", "code": 1}, "pk": 521, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanerpes formicivorus", "bird_class": 47, "common_name": "Acorn Woodpecker", "code": 1}, "pk": 522, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanerpes uropygialis", "bird_class": 47, "common_name": "Gila Woodpecker", "code": 1}, "pk": 523, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanerpes aurifrons", "bird_class": 47, "common_name": "Golden-fronted Woodpecker", "code": 1}, "pk": 524, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanerpes carolinus", "bird_class": 47, "common_name": "Red-bellied Woodpecker", "code": 1}, "pk": 525, "model": "birds.bird"}, {"fields": {"scientific_name": "Sphyrapicus thyroideus", "bird_class": 47, "common_name": "Williamson's Sapsucker", "code": 1}, "pk": 526, "model": "birds.bird"}, {"fields": {"scientific_name": "Sphyrapicus varius", "bird_class": 47, "common_name": "Yellow-bellied Sapsucker", "code": 1}, "pk": 527, "model": "birds.bird"}, {"fields": {"scientific_name": "Sphyrapicus nuchalis", "bird_class": 47, "common_name": "Red-naped Sapsucker", "code": 1}, "pk": 528, "model": "birds.bird"}, {"fields": {"scientific_name": "Sphyrapicus ruber", "bird_class": 47, "common_name": "Red-breasted Sapsucker", "code": 1}, "pk": 529, "model": "birds.bird"}, {"fields": {"scientific_name": "Dendrocopos major", "bird_class": 47, "common_name": "Great Spotted Woodpecker", "code": 4}, "pk": 530, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides scalaris", "bird_class": 47, "common_name": "Ladder-backed Woodpecker", "code": 1}, "pk": 531, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides nuttallii", "bird_class": 47, "common_name": "Nuttall's Woodpecker", "code": 1}, "pk": 532, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides pubescens", "bird_class": 47, "common_name": "Downy Woodpecker", "code": 1}, "pk": 533, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides villosus", "bird_class": 47, "common_name": "Hairy Woodpecker", "code": 1}, "pk": 534, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides arizonae", "bird_class": 47, "common_name": "Arizona Woodpecker", "code": 2}, "pk": 535, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides borealis", "bird_class": 47, "common_name": "Red-cockaded Woodpecker", "code": 2}, "pk": 536, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides albolarvatus", "bird_class": 47, "common_name": "White-headed Woodpecker", "code": 1}, "pk": 537, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides dorsalis", "bird_class": 47, "common_name": "American Three-toed Woodpecker", "code": 2}, "pk": 538, "model": "birds.bird"}, {"fields": {"scientific_name": "Picoides arcticus", "bird_class": 47, "common_name": "Black-backed Woodpecker", "code": 2}, "pk": 539, "model": "birds.bird"}, {"fields": {"scientific_name": "Colaptes auratus", "bird_class": 47, "common_name": "Northern Flicker", "code": 1}, "pk": 540, "model": "birds.bird"}, {"fields": {"scientific_name": "Colaptes chrysoides", "bird_class": 47, "common_name": "Gilded Flicker", "code": 2}, "pk": 541, "model": "birds.bird"}, {"fields": {"scientific_name": "Dryocopus pileatus", "bird_class": 47, "common_name": "Pileated Woodpecker", "code": 1}, "pk": 542, "model": "birds.bird"}, {"fields": {"scientific_name": "Campephilus principalis", "bird_class": 47, "common_name": "Ivory-billed Woodpecker", "code": 6}, "pk": 543, "model": "birds.bird"}, {"fields": {"scientific_name": "Micrastur semitorquatus", "bird_class": 48, "common_name": "Collared Forest-Falcon", "code": 5}, "pk": 544, "model": "birds.bird"}, {"fields": {"scientific_name": "Caracara cheriway", "bird_class": 48, "common_name": "Crested Caracara", "code": 1}, "pk": 545, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco tinnunculus", "bird_class": 48, "common_name": "Eurasian Kestrel", "code": 4}, "pk": 546, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco sparverius", "bird_class": 48, "common_name": "American Kestrel", "code": 1}, "pk": 547, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco vespertinus", "bird_class": 48, "common_name": "Red-footed Falcon", "code": 5}, "pk": 548, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco columbarius", "bird_class": 48, "common_name": "Merlin", "code": 1}, "pk": 549, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco subbuteo", "bird_class": 48, "common_name": "Eurasian Hobby", "code": 4}, "pk": 550, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco femoralis", "bird_class": 48, "common_name": "Aplomado Falcon", "code": 3}, "pk": 551, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco rusticolus", "bird_class": 48, "common_name": "Gyrfalcon", "code": 2}, "pk": 552, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco peregrinus", "bird_class": 48, "common_name": "Peregrine Falcon", "code": 1}, "pk": 553, "model": "birds.bird"}, {"fields": {"scientific_name": "Falco mexicanus", "bird_class": 48, "common_name": "Prairie Falcon", "code": 1}, "pk": 554, "model": "birds.bird"}, {"fields": {"scientific_name": "Melopsittacus undulatus", "bird_class": 49, "common_name": "Budgerigar", "code": 3}, "pk": 555, "model": "birds.bird"}, {"fields": {"scientific_name": "Agapornis roseicollis", "bird_class": 49, "common_name": "Rosy-faced Lovebird", "code": 2}, "pk": 556, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiopsitta monachus", "bird_class": 49, "common_name": "Monk Parakeet", "code": 2}, "pk": 557, "model": "birds.bird"}, {"fields": {"scientific_name": "Conuropsis carolinensis", "bird_class": 49, "common_name": "Carolina Parakeet", "code": 6}, "pk": 558, "model": "birds.bird"}, {"fields": {"scientific_name": "Aratinga holochlora", "bird_class": 49, "common_name": "Green Parakeet", "code": 2}, "pk": 559, "model": "birds.bird"}, {"fields": {"scientific_name": "Nandayus nenday", "bird_class": 49, "common_name": "Nanday Parakeet", "code": 2}, "pk": 560, "model": "birds.bird"}, {"fields": {"scientific_name": "Rhynchopsitta pachyrhyncha", "bird_class": 49, "common_name": "Thick-billed Parrot", "code": 6}, "pk": 561, "model": "birds.bird"}, {"fields": {"scientific_name": "Brotogeris versicolurus", "bird_class": 49, "common_name": "White-winged Parakeet", "code": 2}, "pk": 562, "model": "birds.bird"}, {"fields": {"scientific_name": "Amazona viridigenalis", "bird_class": 49, "common_name": "Red-crowned Parrot", "code": 2}, "pk": 563, "model": "birds.bird"}, {"fields": {"scientific_name": "Camptostoma imberbe", "bird_class": 50, "common_name": "Northern Beardless-Tyrannulet", "code": 2}, "pk": 564, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiopagis viridicata", "bird_class": 50, "common_name": "Greenish Elaenia", "code": 5}, "pk": 565, "model": "birds.bird"}, {"fields": {"scientific_name": "Elaenia albiceps", "bird_class": 50, "common_name": "White-crested Elaenia", "code": 5}, "pk": 566, "model": "birds.bird"}, {"fields": {"scientific_name": "Mitrephanes phaeocercus", "bird_class": 50, "common_name": "Tufted Flycatcher", "code": 5}, "pk": 567, "model": "birds.bird"}, {"fields": {"scientific_name": "Contopus cooperi", "bird_class": 50, "common_name": "Olive-sided Flycatcher", "code": 1}, "pk": 568, "model": "birds.bird"}, {"fields": {"scientific_name": "Contopus pertinax", "bird_class": 50, "common_name": "Greater Pewee", "code": 2}, "pk": 569, "model": "birds.bird"}, {"fields": {"scientific_name": "Contopus sordidulus", "bird_class": 50, "common_name": "Western Wood-Pewee", "code": 1}, "pk": 570, "model": "birds.bird"}, {"fields": {"scientific_name": "Contopus virens", "bird_class": 50, "common_name": "Eastern Wood-Pewee", "code": 1}, "pk": 571, "model": "birds.bird"}, {"fields": {"scientific_name": "Contopus caribaeus", "bird_class": 50, "common_name": "Cuban Pewee", "code": 5}, "pk": 572, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax flaviventris", "bird_class": 50, "common_name": "Yellow-bellied Flycatcher", "code": 1}, "pk": 573, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax virescens", "bird_class": 50, "common_name": "Acadian Flycatcher", "code": 1}, "pk": 574, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax alnorum", "bird_class": 50, "common_name": "Alder Flycatcher", "code": 1}, "pk": 575, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax traillii", "bird_class": 50, "common_name": "Willow Flycatcher", "code": 1}, "pk": 576, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax minimus", "bird_class": 50, "common_name": "Least Flycatcher", "code": 1}, "pk": 577, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax hammondii", "bird_class": 50, "common_name": "Hammond's Flycatcher", "code": 1}, "pk": 578, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax wrightii", "bird_class": 50, "common_name": "Gray Flycatcher", "code": 1}, "pk": 579, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax oberholseri", "bird_class": 50, "common_name": "Dusky Flycatcher", "code": 1}, "pk": 580, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax difficilis", "bird_class": 50, "common_name": "Pacific-slope Flycatcher", "code": 1}, "pk": 581, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax occidentalis", "bird_class": 50, "common_name": "Cordilleran Flycatcher", "code": 1}, "pk": 582, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonax fulvifrons", "bird_class": 50, "common_name": "Buff-breasted Flycatcher", "code": 2}, "pk": 583, "model": "birds.bird"}, {"fields": {"scientific_name": "Sayornis nigricans", "bird_class": 50, "common_name": "Black Phoebe", "code": 1}, "pk": 584, "model": "birds.bird"}, {"fields": {"scientific_name": "Sayornis phoebe", "bird_class": 50, "common_name": "Eastern Phoebe", "code": 1}, "pk": 585, "model": "birds.bird"}, {"fields": {"scientific_name": "Sayornis saya", "bird_class": 50, "common_name": "Say's Phoebe", "code": 1}, "pk": 586, "model": "birds.bird"}, {"fields": {"scientific_name": "Pyrocephalus rubinus", "bird_class": 50, "common_name": "Vermilion Flycatcher", "code": 1}, "pk": 587, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiarchus tuberculifer", "bird_class": 50, "common_name": "Dusky-capped Flycatcher", "code": 2}, "pk": 588, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiarchus cinerascens", "bird_class": 50, "common_name": "Ash-throated Flycatcher", "code": 1}, "pk": 589, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiarchus nuttingi", "bird_class": 50, "common_name": "Nutting's Flycatcher", "code": 5}, "pk": 590, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiarchus crinitus", "bird_class": 50, "common_name": "Great Crested Flycatcher", "code": 1}, "pk": 591, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiarchus tyrannulus", "bird_class": 50, "common_name": "Brown-crested Flycatcher", "code": 1}, "pk": 592, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiarchus sagrae", "bird_class": 50, "common_name": "La Sagra's Flycatcher", "code": 3}, "pk": 593, "model": "birds.bird"}, {"fields": {"scientific_name": "Pitangus sulphuratus", "bird_class": 50, "common_name": "Great Kiskadee", "code": 2}, "pk": 594, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiozetetes similis", "bird_class": 50, "common_name": "Social Flycatcher", "code": 5}, "pk": 595, "model": "birds.bird"}, {"fields": {"scientific_name": "Myiodynastes luteiventris", "bird_class": 50, "common_name": "Sulphur-bellied Flycatcher", "code": 2}, "pk": 596, "model": "birds.bird"}, {"fields": {"scientific_name": "Legatus leucophaius", "bird_class": 50, "common_name": "Piratic Flycatcher", "code": 4}, "pk": 597, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonomus varius", "bird_class": 50, "common_name": "Variegated Flycatcher", "code": 5}, "pk": 598, "model": "birds.bird"}, {"fields": {"scientific_name": "Empidonomus aurantioatrocristatus", "bird_class": 50, "common_name": "Crowned Slaty Flycatcher", "code": 5}, "pk": 599, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus melancholicus", "bird_class": 50, "common_name": "Tropical Kingbird", "code": 2}, "pk": 600, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus couchii", "bird_class": 50, "common_name": "Couch's Kingbird", "code": 2}, "pk": 601, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus vociferans", "bird_class": 50, "common_name": "Cassin's Kingbird", "code": 1}, "pk": 602, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus crassirostris", "bird_class": 50, "common_name": "Thick-billed Kingbird", "code": 2}, "pk": 603, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus verticalis", "bird_class": 50, "common_name": "Western Kingbird", "code": 1}, "pk": 604, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus tyrannus", "bird_class": 50, "common_name": "Eastern Kingbird", "code": 1}, "pk": 605, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus dominicensis", "bird_class": 50, "common_name": "Gray Kingbird", "code": 2}, "pk": 606, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus caudifasciatus", "bird_class": 50, "common_name": "Loggerhead Kingbird", "code": 5}, "pk": 607, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus forficatus", "bird_class": 50, "common_name": "Scissor-tailed Flycatcher", "code": 1}, "pk": 608, "model": "birds.bird"}, {"fields": {"scientific_name": "Tyrannus savana", "bird_class": 50, "common_name": "Fork-tailed Flycatcher", "code": 3}, "pk": 609, "model": "birds.bird"}, {"fields": {"scientific_name": "Tityra semifasciata", "bird_class": 51, "common_name": "Masked Tityra", "code": 5}, "pk": 610, "model": "birds.bird"}, {"fields": {"scientific_name": "Pachyramphus major", "bird_class": 51, "common_name": "Gray-collared Becard", "code": 5}, "pk": 611, "model": "birds.bird"}, {"fields": {"scientific_name": "Pachyramphus aglaiae", "bird_class": 51, "common_name": "Rose-throated Becard", "code": 3}, "pk": 612, "model": "birds.bird"}, {"fields": {"scientific_name": "Lanius cristatus", "bird_class": 52, "common_name": "Brown Shrike", "code": 4}, "pk": 613, "model": "birds.bird"}, {"fields": {"scientific_name": "Lanius ludovicianus", "bird_class": 52, "common_name": "Loggerhead Shrike", "code": 1}, "pk": 614, "model": "birds.bird"}, {"fields": {"scientific_name": "Lanius excubitor", "bird_class": 52, "common_name": "Northern Shrike", "code": 1}, "pk": 615, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo griseus", "bird_class": 53, "common_name": "White-eyed Vireo", "code": 1}, "pk": 616, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo crassirostris", "bird_class": 53, "common_name": "Thick-billed Vireo", "code": 4}, "pk": 617, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo bellii", "bird_class": 53, "common_name": "Bell's Vireo", "code": 1}, "pk": 618, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo atricapilla", "bird_class": 53, "common_name": "Black-capped Vireo", "code": 2}, "pk": 619, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo vicinior", "bird_class": 53, "common_name": "Gray Vireo", "code": 2}, "pk": 620, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo flavifrons", "bird_class": 53, "common_name": "Yellow-throated Vireo", "code": 1}, "pk": 621, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo plumbeus", "bird_class": 53, "common_name": "Plumbeous Vireo", "code": 1}, "pk": 622, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo cassinii", "bird_class": 53, "common_name": "Cassin's Vireo", "code": 1}, "pk": 623, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo solitarius", "bird_class": 53, "common_name": "Blue-headed Vireo", "code": 1}, "pk": 624, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo huttoni", "bird_class": 53, "common_name": "Hutton's Vireo", "code": 1}, "pk": 625, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo gilvus", "bird_class": 53, "common_name": "Warbling Vireo", "code": 1}, "pk": 626, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo philadelphicus", "bird_class": 53, "common_name": "Philadelphia Vireo", "code": 1}, "pk": 627, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo olivaceus", "bird_class": 53, "common_name": "Red-eyed Vireo", "code": 1}, "pk": 628, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo flavoviridis", "bird_class": 53, "common_name": "Yellow-green Vireo", "code": 3}, "pk": 629, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo altiloquus", "bird_class": 53, "common_name": "Black-whiskered Vireo", "code": 2}, "pk": 630, "model": "birds.bird"}, {"fields": {"scientific_name": "Vireo magister", "bird_class": 53, "common_name": "Yucatan Vireo", "code": 5}, "pk": 631, "model": "birds.bird"}, {"fields": {"scientific_name": "Perisoreus canadensis", "bird_class": 54, "common_name": "Gray Jay", "code": 1}, "pk": 632, "model": "birds.bird"}, {"fields": {"scientific_name": "Psilorhinus morio", "bird_class": 54, "common_name": "Brown Jay", "code": 3}, "pk": 633, "model": "birds.bird"}, {"fields": {"scientific_name": "Cyanocorax yncas", "bird_class": 54, "common_name": "Green Jay", "code": 2}, "pk": 634, "model": "birds.bird"}, {"fields": {"scientific_name": "Gymnorhinus cyanocephalus", "bird_class": 54, "common_name": "Pinyon Jay", "code": 1}, "pk": 635, "model": "birds.bird"}, {"fields": {"scientific_name": "Cyanocitta stelleri", "bird_class": 54, "common_name": "Steller's Jay", "code": 1}, "pk": 636, "model": "birds.bird"}, {"fields": {"scientific_name": "Cyanocitta cristata", "bird_class": 54, "common_name": "Blue Jay", "code": 1}, "pk": 637, "model": "birds.bird"}, {"fields": {"scientific_name": "Aphelocoma coerulescens", "bird_class": 54, "common_name": "Florida Scrub-Jay", "code": 2}, "pk": 638, "model": "birds.bird"}, {"fields": {"scientific_name": "Aphelocoma insularis", "bird_class": 54, "common_name": "Island Scrub-Jay", "code": 2}, "pk": 639, "model": "birds.bird"}, {"fields": {"scientific_name": "Aphelocoma californica", "bird_class": 54, "common_name": "Western Scrub-Jay", "code": 1}, "pk": 640, "model": "birds.bird"}, {"fields": {"scientific_name": "Aphelocoma wollweberi", "bird_class": 54, "common_name": "Mexican Jay", "code": 2}, "pk": 641, "model": "birds.bird"}, {"fields": {"scientific_name": "Nucifraga columbiana", "bird_class": 54, "common_name": "Clark's Nutcracker", "code": 1}, "pk": 642, "model": "birds.bird"}, {"fields": {"scientific_name": "Pica hudsonia", "bird_class": 54, "common_name": "Black-billed Magpie", "code": 1}, "pk": 643, "model": "birds.bird"}, {"fields": {"scientific_name": "Pica nuttalli", "bird_class": 54, "common_name": "Yellow-billed Magpie", "code": 2}, "pk": 644, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus monedula", "bird_class": 54, "common_name": "Eurasian Jackdaw", "code": 4}, "pk": 645, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus brachyrhynchos", "bird_class": 54, "common_name": "American Crow", "code": 1}, "pk": 646, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus caurinus", "bird_class": 54, "common_name": "Northwestern Crow", "code": 1}, "pk": 647, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus imparatus", "bird_class": 54, "common_name": "Tamaulipas Crow", "code": 3}, "pk": 648, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus ossifragus", "bird_class": 54, "common_name": "Fish Crow", "code": 1}, "pk": 649, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus cryptoleucus", "bird_class": 54, "common_name": "Chihuahuan Raven", "code": 1}, "pk": 650, "model": "birds.bird"}, {"fields": {"scientific_name": "Corvus corax", "bird_class": 54, "common_name": "Common Raven", "code": 1}, "pk": 651, "model": "birds.bird"}, {"fields": {"scientific_name": "Alauda arvensis", "bird_class": 55, "common_name": "Sky Lark", "code": 3}, "pk": 652, "model": "birds.bird"}, {"fields": {"scientific_name": "Eremophila alpestris", "bird_class": 55, "common_name": "Horned Lark", "code": 1}, "pk": 653, "model": "birds.bird"}, {"fields": {"scientific_name": "Progne subis", "bird_class": 56, "common_name": "Purple Martin", "code": 1}, "pk": 654, "model": "birds.bird"}, {"fields": {"scientific_name": "Progne cryptoleuca", "bird_class": 56, "common_name": "Cuban Martin", "code": 5}, "pk": 655, "model": "birds.bird"}, {"fields": {"scientific_name": "Progne chalybea", "bird_class": 56, "common_name": "Gray-breasted Martin", "code": 5}, "pk": 656, "model": "birds.bird"}, {"fields": {"scientific_name": "Progne elegans", "bird_class": 56, "common_name": "Southern Martin", "code": 5}, "pk": 657, "model": "birds.bird"}, {"fields": {"scientific_name": "Progne tapera", "bird_class": 56, "common_name": "Brown-chested Martin", "code": 5}, "pk": 658, "model": "birds.bird"}, {"fields": {"scientific_name": "Tachycineta bicolor", "bird_class": 56, "common_name": "Tree Swallow", "code": 1}, "pk": 659, "model": "birds.bird"}, {"fields": {"scientific_name": "Tachycineta albilinea", "bird_class": 56, "common_name": "Mangrove Swallow", "code": 5}, "pk": 660, "model": "birds.bird"}, {"fields": {"scientific_name": "Tachycineta thalassina", "bird_class": 56, "common_name": "Violet-green Swallow", "code": 1}, "pk": 661, "model": "birds.bird"}, {"fields": {"scientific_name": "Tachycineta cyaneoviridis", "bird_class": 56, "common_name": "Bahama Swallow", "code": 4}, "pk": 662, "model": "birds.bird"}, {"fields": {"scientific_name": "Stelgidopteryx serripennis", "bird_class": 56, "common_name": "Northern Rough-winged Swallow", "code": 1}, "pk": 663, "model": "birds.bird"}, {"fields": {"scientific_name": "Riparia riparia", "bird_class": 56, "common_name": "Bank Swallow", "code": 1}, "pk": 664, "model": "birds.bird"}, {"fields": {"scientific_name": "Petrochelidon pyrrhonota", "bird_class": 56, "common_name": "Cliff Swallow", "code": 1}, "pk": 665, "model": "birds.bird"}, {"fields": {"scientific_name": "Petrochelidon fulva", "bird_class": 56, "common_name": "Cave Swallow", "code": 1}, "pk": 666, "model": "birds.bird"}, {"fields": {"scientific_name": "Hirundo rustica", "bird_class": 56, "common_name": "Barn Swallow", "code": 1}, "pk": 667, "model": "birds.bird"}, {"fields": {"scientific_name": "Delichon urbicum", "bird_class": 56, "common_name": "Common House-Martin", "code": 4}, "pk": 668, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile carolinensis", "bird_class": 57, "common_name": "Carolina Chickadee", "code": 1}, "pk": 669, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile atricapillus", "bird_class": 57, "common_name": "Black-capped Chickadee", "code": 1}, "pk": 670, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile gambeli", "bird_class": 57, "common_name": "Mountain Chickadee", "code": 1}, "pk": 671, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile sclateri", "bird_class": 57, "common_name": "Mexican Chickadee", "code": 2}, "pk": 672, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile rufescens", "bird_class": 57, "common_name": "Chestnut-backed Chickadee", "code": 1}, "pk": 673, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile hudsonicus", "bird_class": 57, "common_name": "Boreal Chickadee", "code": 1}, "pk": 674, "model": "birds.bird"}, {"fields": {"scientific_name": "Poecile cinctus", "bird_class": 57, "common_name": "Gray-headed Chickadee", "code": 3}, "pk": 675, "model": "birds.bird"}, {"fields": {"scientific_name": "Baeolophus wollweberi", "bird_class": 57, "common_name": "Bridled Titmouse", "code": 2}, "pk": 676, "model": "birds.bird"}, {"fields": {"scientific_name": "Baeolophus inornatus", "bird_class": 57, "common_name": "Oak Titmouse", "code": 1}, "pk": 677, "model": "birds.bird"}, {"fields": {"scientific_name": "Baeolophus ridgwayi", "bird_class": 57, "common_name": "Juniper Titmouse", "code": 1}, "pk": 678, "model": "birds.bird"}, {"fields": {"scientific_name": "Baeolophus bicolor", "bird_class": 57, "common_name": "Tufted Titmouse", "code": 1}, "pk": 679, "model": "birds.bird"}, {"fields": {"scientific_name": "Baeolophus atricristatus", "bird_class": 57, "common_name": "Black-crested Titmouse", "code": 2}, "pk": 680, "model": "birds.bird"}, {"fields": {"scientific_name": "Auriparus flaviceps", "bird_class": 58, "common_name": "Verdin", "code": 1}, "pk": 681, "model": "birds.bird"}, {"fields": {"scientific_name": "Psaltriparus minimus", "bird_class": 59, "common_name": "Bushtit", "code": 1}, "pk": 682, "model": "birds.bird"}, {"fields": {"scientific_name": "Sitta canadensis", "bird_class": 60, "common_name": "Red-breasted Nuthatch", "code": 1}, "pk": 683, "model": "birds.bird"}, {"fields": {"scientific_name": "Sitta carolinensis", "bird_class": 60, "common_name": "White-breasted Nuthatch", "code": 1}, "pk": 684, "model": "birds.bird"}, {"fields": {"scientific_name": "Sitta pygmaea", "bird_class": 60, "common_name": "Pygmy Nuthatch", "code": 1}, "pk": 685, "model": "birds.bird"}, {"fields": {"scientific_name": "Sitta pusilla", "bird_class": 60, "common_name": "Brown-headed Nuthatch", "code": 1}, "pk": 686, "model": "birds.bird"}, {"fields": {"scientific_name": "Certhia americana", "bird_class": 61, "common_name": "Brown Creeper", "code": 1}, "pk": 687, "model": "birds.bird"}, {"fields": {"scientific_name": "Salpinctes obsoletus", "bird_class": 62, "common_name": "Rock Wren", "code": 1}, "pk": 688, "model": "birds.bird"}, {"fields": {"scientific_name": "Catherpes mexicanus", "bird_class": 62, "common_name": "Canyon Wren", "code": 1}, "pk": 689, "model": "birds.bird"}, {"fields": {"scientific_name": "Troglodytes aedon", "bird_class": 62, "common_name": "House Wren", "code": 1}, "pk": 690, "model": "birds.bird"}, {"fields": {"scientific_name": "Troglodytes pacificus", "bird_class": 62, "common_name": "Pacific Wren", "code": 1}, "pk": 691, "model": "birds.bird"}, {"fields": {"scientific_name": "Troglodytes hiemalis", "bird_class": 62, "common_name": "Winter Wren", "code": 1}, "pk": 692, "model": "birds.bird"}, {"fields": {"scientific_name": "Cistothorus platensis", "bird_class": 62, "common_name": "Sedge Wren", "code": 1}, "pk": 693, "model": "birds.bird"}, {"fields": {"scientific_name": "Cistothorus palustris", "bird_class": 62, "common_name": "Marsh Wren", "code": 1}, "pk": 694, "model": "birds.bird"}, {"fields": {"scientific_name": "Thryothorus ludovicianus", "bird_class": 62, "common_name": "Carolina Wren", "code": 1}, "pk": 695, "model": "birds.bird"}, {"fields": {"scientific_name": "Thryomanes bewickii", "bird_class": 62, "common_name": "Bewick's Wren", "code": 1}, "pk": 696, "model": "birds.bird"}, {"fields": {"scientific_name": "Campylorhynchus brunneicapillus", "bird_class": 62, "common_name": "Cactus Wren", "code": 1}, "pk": 697, "model": "birds.bird"}, {"fields": {"scientific_name": "Thryophilus sinaloa", "bird_class": 62, "common_name": "Sinaloa Wren", "code": 5}, "pk": 698, "model": "birds.bird"}, {"fields": {"scientific_name": "Polioptila caerulea", "bird_class": 63, "common_name": "Blue-gray Gnatcatcher", "code": 1}, "pk": 699, "model": "birds.bird"}, {"fields": {"scientific_name": "Polioptila californica", "bird_class": 63, "common_name": "California Gnatcatcher", "code": 2}, "pk": 700, "model": "birds.bird"}, {"fields": {"scientific_name": "Polioptila melanura", "bird_class": 63, "common_name": "Black-tailed Gnatcatcher", "code": 1}, "pk": 701, "model": "birds.bird"}, {"fields": {"scientific_name": "Polioptila nigriceps", "bird_class": 63, "common_name": "Black-capped Gnatcatcher", "code": 3}, "pk": 702, "model": "birds.bird"}, {"fields": {"scientific_name": "Cinclus mexicanus", "bird_class": 64, "common_name": "American Dipper", "code": 1}, "pk": 703, "model": "birds.bird"}, {"fields": {"scientific_name": "Pycnonotus jocosus", "bird_class": 65, "common_name": "Red-whiskered Bulbul", "code": 2}, "pk": 704, "model": "birds.bird"}, {"fields": {"scientific_name": "Regulus satrapa", "bird_class": 66, "common_name": "Golden-crowned Kinglet", "code": 1}, "pk": 705, "model": "birds.bird"}, {"fields": {"scientific_name": "Regulus calendula", "bird_class": 66, "common_name": "Ruby-crowned Kinglet", "code": 1}, "pk": 706, "model": "birds.bird"}, {"fields": {"scientific_name": "Phylloscopus trochilus", "bird_class": 67, "common_name": "Willow Warbler", "code": 5}, "pk": 707, "model": "birds.bird"}, {"fields": {"scientific_name": "Phylloscopus sibilatrix", "bird_class": 67, "common_name": "Wood Warbler", "code": 5}, "pk": 708, "model": "birds.bird"}, {"fields": {"scientific_name": "Phylloscopus fuscatus", "bird_class": 67, "common_name": "Dusky Warbler", "code": 4}, "pk": 709, "model": "birds.bird"}, {"fields": {"scientific_name": "Phylloscopus proregulus", "bird_class": 67, "common_name": "Pallas's Leaf-Warbler", "code": 5}, "pk": 710, "model": "birds.bird"}, {"fields": {"scientific_name": "Phylloscopus inornatus", "bird_class": 67, "common_name": "Yellow-browed Warbler", "code": 4}, "pk": 711, "model": "birds.bird"}, {"fields": {"scientific_name": "Phylloscopus borealis", "bird_class": 67, "common_name": "Arctic Warbler", "code": 2}, "pk": 712, "model": "birds.bird"}, {"fields": {"scientific_name": "Sylvia curruca", "bird_class": 68, "common_name": "Lesser Whitethroat", "code": 5}, "pk": 713, "model": "birds.bird"}, {"fields": {"scientific_name": "Chamaea fasciata", "bird_class": 68, "common_name": "Wrentit", "code": 1}, "pk": 714, "model": "birds.bird"}, {"fields": {"scientific_name": "Acrocephalus schoenobaenus", "bird_class": 69, "common_name": "Sedge Warbler", "code": 5}, "pk": 715, "model": "birds.bird"}, {"fields": {"scientific_name": "Locustella ochotensis", "bird_class": 70, "common_name": "Middendorff's Grasshopper-Warbler", "code": 4}, "pk": 716, "model": "birds.bird"}, {"fields": {"scientific_name": "Locustella lanceolata", "bird_class": 70, "common_name": "Lanceolated Warbler", "code": 5}, "pk": 717, "model": "birds.bird"}, {"fields": {"scientific_name": "Muscicapa griseisticta", "bird_class": 71, "common_name": "Gray-streaked Flycatcher", "code": 4}, "pk": 718, "model": "birds.bird"}, {"fields": {"scientific_name": "Muscicapa dauurica", "bird_class": 71, "common_name": "Asian Brown Flycatcher", "code": 5}, "pk": 719, "model": "birds.bird"}, {"fields": {"scientific_name": "Muscicapa striata", "bird_class": 71, "common_name": "Spotted Flycatcher", "code": 5}, "pk": 720, "model": "birds.bird"}, {"fields": {"scientific_name": "Muscicapa sibirica", "bird_class": 71, "common_name": "Dark-sided Flycatcher", "code": 4}, "pk": 721, "model": "birds.bird"}, {"fields": {"scientific_name": "Luscinia sibilans", "bird_class": 71, "common_name": "Rufous-tailed Robin", "code": 5}, "pk": 722, "model": "birds.bird"}, {"fields": {"scientific_name": "Luscinia calliope", "bird_class": 71, "common_name": "Siberian Rubythroat", "code": 3}, "pk": 723, "model": "birds.bird"}, {"fields": {"scientific_name": "Luscinia svecica", "bird_class": 71, "common_name": "Bluethroat", "code": 2}, "pk": 724, "model": "birds.bird"}, {"fields": {"scientific_name": "Luscinia cyane", "bird_class": 71, "common_name": "Siberian Blue Robin", "code": 5}, "pk": 725, "model": "birds.bird"}, {"fields": {"scientific_name": "Tarsiger cyanurus", "bird_class": 71, "common_name": "Red-flanked Bluetail", "code": 4}, "pk": 726, "model": "birds.bird"}, {"fields": {"scientific_name": "Ficedula narcissina", "bird_class": 71, "common_name": "Narcissus Flycatcher", "code": 5}, "pk": 727, "model": "birds.bird"}, {"fields": {"scientific_name": "Ficedula mugimaki", "bird_class": 71, "common_name": "Mugimaki Flycatcher", "code": 5}, "pk": 728, "model": "birds.bird"}, {"fields": {"scientific_name": "Ficedula albicilla", "bird_class": 71, "common_name": "Taiga Flycatcher", "code": 4}, "pk": 729, "model": "birds.bird"}, {"fields": {"scientific_name": "Oenanthe oenanthe", "bird_class": 71, "common_name": "Northern Wheatear", "code": 2}, "pk": 730, "model": "birds.bird"}, {"fields": {"scientific_name": "Saxicola torquatus", "bird_class": 71, "common_name": "Stonechat", "code": 4}, "pk": 731, "model": "birds.bird"}, {"fields": {"scientific_name": "Sialia sialis", "bird_class": 72, "common_name": "Eastern Bluebird", "code": 1}, "pk": 732, "model": "birds.bird"}, {"fields": {"scientific_name": "Sialia mexicana", "bird_class": 72, "common_name": "Western Bluebird", "code": 1}, "pk": 733, "model": "birds.bird"}, {"fields": {"scientific_name": "Sialia currucoides", "bird_class": 72, "common_name": "Mountain Bluebird", "code": 1}, "pk": 734, "model": "birds.bird"}, {"fields": {"scientific_name": "Myadestes townsendi", "bird_class": 72, "common_name": "Townsend's Solitaire", "code": 1}, "pk": 735, "model": "birds.bird"}, {"fields": {"scientific_name": "Myadestes occidentalis", "bird_class": 72, "common_name": "Brown-backed Solitaire", "code": 5}, "pk": 736, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus aurantiirostris", "bird_class": 72, "common_name": "Orange-billed Nightingale-Thrush", "code": 5}, "pk": 737, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus mexicanus", "bird_class": 72, "common_name": "Black-headed Nightingale-Thrush", "code": 5}, "pk": 738, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus fuscescens", "bird_class": 72, "common_name": "Veery", "code": 1}, "pk": 739, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus minimus", "bird_class": 72, "common_name": "Gray-cheeked Thrush", "code": 1}, "pk": 740, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus bicknelli", "bird_class": 72, "common_name": "Bicknell's Thrush", "code": 2}, "pk": 741, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus ustulatus", "bird_class": 72, "common_name": "Swainson's Thrush", "code": 1}, "pk": 742, "model": "birds.bird"}, {"fields": {"scientific_name": "Catharus guttatus", "bird_class": 72, "common_name": "Hermit Thrush", "code": 1}, "pk": 743, "model": "birds.bird"}, {"fields": {"scientific_name": "Hylocichla mustelina", "bird_class": 72, "common_name": "Wood Thrush", "code": 1}, "pk": 744, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus merula", "bird_class": 72, "common_name": "Eurasian Blackbird", "code": 5}, "pk": 745, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus obscurus", "bird_class": 72, "common_name": "Eyebrowed Thrush", "code": 3}, "pk": 746, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus naumanni", "bird_class": 72, "common_name": "Dusky Thrush", "code": 4}, "pk": 747, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus pilaris", "bird_class": 72, "common_name": "Fieldfare", "code": 4}, "pk": 748, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus iliacus", "bird_class": 72, "common_name": "Redwing", "code": 4}, "pk": 749, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus philomelos", "bird_class": 72, "common_name": "Song Thrush", "code": 5}, "pk": 750, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus grayi", "bird_class": 72, "common_name": "Clay-colored Thrush", "code": 3}, "pk": 751, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus assimilis", "bird_class": 72, "common_name": "White-throated Thrush", "code": 4}, "pk": 752, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus rufopalliatus", "bird_class": 72, "common_name": "Rufous-backed Robin", "code": 3}, "pk": 753, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus migratorius", "bird_class": 72, "common_name": "American Robin", "code": 1}, "pk": 754, "model": "birds.bird"}, {"fields": {"scientific_name": "Turdus plumbeus", "bird_class": 72, "common_name": "Red-legged Thrush", "code": 5}, "pk": 755, "model": "birds.bird"}, {"fields": {"scientific_name": "Ixoreus naevius", "bird_class": 72, "common_name": "Varied Thrush", "code": 1}, "pk": 756, "model": "birds.bird"}, {"fields": {"scientific_name": "Ridgwayia pinicola", "bird_class": 72, "common_name": "Aztec Thrush", "code": 4}, "pk": 757, "model": "birds.bird"}, {"fields": {"scientific_name": "Dumetella carolinensis", "bird_class": 73, "common_name": "Gray Catbird", "code": 1}, "pk": 758, "model": "birds.bird"}, {"fields": {"scientific_name": "Mimus polyglottos", "bird_class": 73, "common_name": "Northern Mockingbird", "code": 1}, "pk": 759, "model": "birds.bird"}, {"fields": {"scientific_name": "Mimus gundlachii", "bird_class": 73, "common_name": "Bahama Mockingbird", "code": 4}, "pk": 760, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreoscoptes montanus", "bird_class": 73, "common_name": "Sage Thrasher", "code": 1}, "pk": 761, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma rufum", "bird_class": 73, "common_name": "Brown Thrasher", "code": 1}, "pk": 762, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma longirostre", "bird_class": 73, "common_name": "Long-billed Thrasher", "code": 2}, "pk": 763, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma bendirei", "bird_class": 73, "common_name": "Bendire's Thrasher", "code": 2}, "pk": 764, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma curvirostre", "bird_class": 73, "common_name": "Curve-billed Thrasher", "code": 1}, "pk": 765, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma redivivum", "bird_class": 73, "common_name": "California Thrasher", "code": 2}, "pk": 766, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma crissale", "bird_class": 73, "common_name": "Crissal Thrasher", "code": 2}, "pk": 767, "model": "birds.bird"}, {"fields": {"scientific_name": "Toxostoma lecontei", "bird_class": 73, "common_name": "Le Conte's Thrasher", "code": 2}, "pk": 768, "model": "birds.bird"}, {"fields": {"scientific_name": "Melanotis caerulescens", "bird_class": 73, "common_name": "Blue Mockingbird", "code": 5}, "pk": 769, "model": "birds.bird"}, {"fields": {"scientific_name": "Sturnus vulgaris", "bird_class": 74, "common_name": "European Starling", "code": 1}, "pk": 770, "model": "birds.bird"}, {"fields": {"scientific_name": "Acridotheres tristis", "bird_class": 74, "common_name": "Common Myna", "code": 2}, "pk": 771, "model": "birds.bird"}, {"fields": {"scientific_name": "Prunella montanella", "bird_class": 75, "common_name": "Siberian Accentor", "code": 4}, "pk": 772, "model": "birds.bird"}, {"fields": {"scientific_name": "Motacilla tschutschensis", "bird_class": 76, "common_name": "Eastern Yellow Wagtail", "code": 2}, "pk": 773, "model": "birds.bird"}, {"fields": {"scientific_name": "Motacilla citreola", "bird_class": 76, "common_name": "Citrine Wagtail", "code": 5}, "pk": 774, "model": "birds.bird"}, {"fields": {"scientific_name": "Motacilla cinerea", "bird_class": 76, "common_name": "Gray Wagtail", "code": 4}, "pk": 775, "model": "birds.bird"}, {"fields": {"scientific_name": "Motacilla alba", "bird_class": 76, "common_name": "White Wagtail", "code": 3}, "pk": 776, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthus trivialis", "bird_class": 76, "common_name": "Tree Pipit", "code": 5}, "pk": 777, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthus hodgsoni", "bird_class": 76, "common_name": "Olive-backed Pipit", "code": 3}, "pk": 778, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthus gustavi", "bird_class": 76, "common_name": "Pechora Pipit", "code": 4}, "pk": 779, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthus cervinus", "bird_class": 76, "common_name": "Red-throated Pipit", "code": 3}, "pk": 780, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthus rubescens", "bird_class": 76, "common_name": "American Pipit", "code": 1}, "pk": 781, "model": "birds.bird"}, {"fields": {"scientific_name": "Anthus spragueii", "bird_class": 76, "common_name": "Sprague's Pipit", "code": 2}, "pk": 782, "model": "birds.bird"}, {"fields": {"scientific_name": "Bombycilla garrulus", "bird_class": 77, "common_name": "Bohemian Waxwing", "code": 2}, "pk": 783, "model": "birds.bird"}, {"fields": {"scientific_name": "Bombycilla cedrorum", "bird_class": 77, "common_name": "Cedar Waxwing", "code": 1}, "pk": 784, "model": "birds.bird"}, {"fields": {"scientific_name": "Ptilogonys cinereus", "bird_class": 78, "common_name": "Gray Silky-flycatcher", "code": 5}, "pk": 785, "model": "birds.bird"}, {"fields": {"scientific_name": "Phainopepla nitens", "bird_class": 78, "common_name": "Phainopepla", "code": 1}, "pk": 786, "model": "birds.bird"}, {"fields": {"scientific_name": "Peucedramus taeniatus", "bird_class": 79, "common_name": "Olive Warbler", "code": 2}, "pk": 787, "model": "birds.bird"}, {"fields": {"scientific_name": "Calcarius lapponicus", "bird_class": 80, "common_name": "Lapland Longspur", "code": 1}, "pk": 788, "model": "birds.bird"}, {"fields": {"scientific_name": "Calcarius ornatus", "bird_class": 80, "common_name": "Chestnut-collared Longspur", "code": 1}, "pk": 789, "model": "birds.bird"}, {"fields": {"scientific_name": "Calcarius pictus", "bird_class": 80, "common_name": "Smith's Longspur", "code": 2}, "pk": 790, "model": "birds.bird"}, {"fields": {"scientific_name": "Rhynchophanes mccownii", "bird_class": 80, "common_name": "McCown's Longspur", "code": 2}, "pk": 791, "model": "birds.bird"}, {"fields": {"scientific_name": "Plectrophenax nivalis", "bird_class": 80, "common_name": "Snow Bunting", "code": 1}, "pk": 792, "model": "birds.bird"}, {"fields": {"scientific_name": "Plectrophenax hyperboreus", "bird_class": 80, "common_name": "McKay's Bunting", "code": 2}, "pk": 793, "model": "birds.bird"}, {"fields": {"scientific_name": "Seiurus aurocapilla", "bird_class": 81, "common_name": "Ovenbird", "code": 1}, "pk": 794, "model": "birds.bird"}, {"fields": {"scientific_name": "Helmitheros vermivorum", "bird_class": 81, "common_name": "Worm-eating Warbler", "code": 1}, "pk": 795, "model": "birds.bird"}, {"fields": {"scientific_name": "Parkesia motacilla", "bird_class": 81, "common_name": "Louisiana Waterthrush", "code": 1}, "pk": 796, "model": "birds.bird"}, {"fields": {"scientific_name": "Parkesia noveboracensis", "bird_class": 81, "common_name": "Northern Waterthrush", "code": 1}, "pk": 797, "model": "birds.bird"}, {"fields": {"scientific_name": "Vermivora bachmanii", "bird_class": 81, "common_name": "Bachman's Warbler", "code": 6}, "pk": 798, "model": "birds.bird"}, {"fields": {"scientific_name": "Vermivora chrysoptera", "bird_class": 81, "common_name": "Golden-winged Warbler", "code": 2}, "pk": 799, "model": "birds.bird"}, {"fields": {"scientific_name": "Vermivora cyanoptera", "bird_class": 81, "common_name": "Blue-winged Warbler", "code": 1}, "pk": 800, "model": "birds.bird"}, {"fields": {"scientific_name": "Mniotilta varia", "bird_class": 81, "common_name": "Black-and-white Warbler", "code": 1}, "pk": 801, "model": "birds.bird"}, {"fields": {"scientific_name": "Protonotaria citrea", "bird_class": 81, "common_name": "Prothonotary Warbler", "code": 1}, "pk": 802, "model": "birds.bird"}, {"fields": {"scientific_name": "Limnothlypis swainsonii", "bird_class": 81, "common_name": "Swainson's Warbler", "code": 2}, "pk": 803, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis superciliosa", "bird_class": 81, "common_name": "Crescent-chested Warbler", "code": 4}, "pk": 804, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis peregrina", "bird_class": 81, "common_name": "Tennessee Warbler", "code": 1}, "pk": 805, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis celata", "bird_class": 81, "common_name": "Orange-crowned Warbler", "code": 1}, "pk": 806, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis crissalis", "bird_class": 81, "common_name": "Colima Warbler", "code": 1}, "pk": 807, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis luciae", "bird_class": 81, "common_name": "Lucy's Warbler", "code": 1}, "pk": 808, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis ruficapilla", "bird_class": 81, "common_name": "Nashville Warbler", "code": 1}, "pk": 809, "model": "birds.bird"}, {"fields": {"scientific_name": "Oreothlypis virginiae", "bird_class": 81, "common_name": "Virginia\u2019s Warbler", "code": 1}, "pk": 810, "model": "birds.bird"}, {"fields": {"scientific_name": "Oporornis agilis", "bird_class": 81, "common_name": "Connecticut Warbler", "code": 2}, "pk": 811, "model": "birds.bird"}, {"fields": {"scientific_name": "Geothlypis poliocephala", "bird_class": 81, "common_name": "Gray-crowned Yellowthroat", "code": 4}, "pk": 812, "model": "birds.bird"}, {"fields": {"scientific_name": "Geothlypis tolmiei", "bird_class": 81, "common_name": "MacGillivray's Warbler", "code": 1}, "pk": 813, "model": "birds.bird"}, {"fields": {"scientific_name": "Geothlypis philadelphia", "bird_class": 81, "common_name": "Mourning Warbler", "code": 1}, "pk": 814, "model": "birds.bird"}, {"fields": {"scientific_name": "Geothlypis formosa", "bird_class": 81, "common_name": "Kentucky Warbler", "code": 1}, "pk": 815, "model": "birds.bird"}, {"fields": {"scientific_name": "Geothlypis trichas", "bird_class": 81, "common_name": "Common Yellowthroat", "code": 1}, "pk": 816, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga citrina", "bird_class": 81, "common_name": "Hooded Warbler", "code": 1}, "pk": 817, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga ruticilla", "bird_class": 81, "common_name": "American Redstart", "code": 1}, "pk": 818, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga kirtlandii", "bird_class": 81, "common_name": "Kirtland's Warbler", "code": 2}, "pk": 819, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga tigrina", "bird_class": 81, "common_name": "Cape May Warbler", "code": 1}, "pk": 820, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga cerulea", "bird_class": 81, "common_name": "Cerulean Warbler", "code": 2}, "pk": 821, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga americana", "bird_class": 81, "common_name": "Northern Parula", "code": 1}, "pk": 822, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga pitiayumi", "bird_class": 81, "common_name": "Tropical Parula", "code": 3}, "pk": 823, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga magnolia", "bird_class": 81, "common_name": "Magnolia Warbler", "code": 1}, "pk": 824, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga castanea", "bird_class": 81, "common_name": "Bay-breasted Warbler", "code": 1}, "pk": 825, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga fusca", "bird_class": 81, "common_name": "Blackburnian Warbler", "code": 1}, "pk": 826, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga petechia", "bird_class": 81, "common_name": "Yellow Warbler", "code": 1}, "pk": 827, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga pensylvanica", "bird_class": 81, "common_name": "Chestnut-sided Warbler", "code": 1}, "pk": 828, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga striata", "bird_class": 81, "common_name": "Blackpoll Warbler", "code": 1}, "pk": 829, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga caerulescens", "bird_class": 81, "common_name": "Black-throated Blue Warbler", "code": 1}, "pk": 830, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga palmarum", "bird_class": 81, "common_name": "Palm Warbler", "code": 1}, "pk": 831, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga pinus", "bird_class": 81, "common_name": "Pine Warbler", "code": 1}, "pk": 832, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga coronata", "bird_class": 81, "common_name": "Yellow-rumped Warbler", "code": 1}, "pk": 833, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga dominica", "bird_class": 81, "common_name": "Yellow-throated Warbler", "code": 1}, "pk": 834, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga discolor", "bird_class": 81, "common_name": "Prairie Warbler", "code": 1}, "pk": 835, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga graciae", "bird_class": 81, "common_name": "Grace's Warbler", "code": 1}, "pk": 836, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga nigrescens", "bird_class": 81, "common_name": "Black-throated Gray Warbler", "code": 1}, "pk": 837, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga townsendi", "bird_class": 81, "common_name": "Townsend's Warbler", "code": 1}, "pk": 838, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga occidentalis", "bird_class": 81, "common_name": "Hermit Warbler", "code": 1}, "pk": 839, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga chrysoparia", "bird_class": 81, "common_name": "Golden-cheeked Warbler", "code": 2}, "pk": 840, "model": "birds.bird"}, {"fields": {"scientific_name": "Setophaga virens", "bird_class": 81, "common_name": "Black-throated Green Warbler", "code": 1}, "pk": 841, "model": "birds.bird"}, {"fields": {"scientific_name": "Basileuterus lachrymosus", "bird_class": 81, "common_name": "Fan-tailed Warbler", "code": 4}, "pk": 842, "model": "birds.bird"}, {"fields": {"scientific_name": "Basileuterus rufifrons", "bird_class": 81, "common_name": "Rufous-capped Warbler", "code": 3}, "pk": 843, "model": "birds.bird"}, {"fields": {"scientific_name": "Basileuterus culicivorus", "bird_class": 81, "common_name": "Golden-crowned Warbler", "code": 4}, "pk": 844, "model": "birds.bird"}, {"fields": {"scientific_name": "Cardellina canadensis", "bird_class": 81, "common_name": "Canada Warbler", "code": 1}, "pk": 845, "model": "birds.bird"}, {"fields": {"scientific_name": "Cardellina pusilla", "bird_class": 81, "common_name": "Wilson's Warbler", "code": 1}, "pk": 846, "model": "birds.bird"}, {"fields": {"scientific_name": "Cardellina rubrifrons", "bird_class": 81, "common_name": "Red-faced Warbler", "code": 2}, "pk": 847, "model": "birds.bird"}, {"fields": {"scientific_name": "Myioborus pictus", "bird_class": 81, "common_name": "Painted Redstart", "code": 2}, "pk": 848, "model": "birds.bird"}, {"fields": {"scientific_name": "Myioborus miniatus", "bird_class": 81, "common_name": "Slate-throated Redstart", "code": 4}, "pk": 849, "model": "birds.bird"}, {"fields": {"scientific_name": "Icteria virens", "bird_class": 81, "common_name": "Yellow-breasted Chat", "code": 1}, "pk": 850, "model": "birds.bird"}, {"fields": {"scientific_name": "Coereba flaveola", "bird_class": 82, "common_name": "Bananaquit", "code": 4}, "pk": 851, "model": "birds.bird"}, {"fields": {"scientific_name": "Spindalis zena", "bird_class": 83, "common_name": "Western Spindalis", "code": 3}, "pk": 852, "model": "birds.bird"}, {"fields": {"scientific_name": "Sporophila torqueola", "bird_class": 84, "common_name": "White-collared Seedeater", "code": 3}, "pk": 853, "model": "birds.bird"}, {"fields": {"scientific_name": "Tiaris olivaceus", "bird_class": 84, "common_name": "Yellow-faced Grassquit", "code": 4}, "pk": 854, "model": "birds.bird"}, {"fields": {"scientific_name": "Tiaris bicolor", "bird_class": 84, "common_name": "Black-faced Grassquit", "code": 4}, "pk": 855, "model": "birds.bird"}, {"fields": {"scientific_name": "Arremonops rufivirgatus", "bird_class": 84, "common_name": "Olive Sparrow", "code": 2}, "pk": 856, "model": "birds.bird"}, {"fields": {"scientific_name": "Pipilo chlorurus", "bird_class": 84, "common_name": "Green-tailed Towhee", "code": 1}, "pk": 857, "model": "birds.bird"}, {"fields": {"scientific_name": "Pipilo maculatus", "bird_class": 84, "common_name": "Spotted Towhee", "code": 1}, "pk": 858, "model": "birds.bird"}, {"fields": {"scientific_name": "Pipilo erythrophthalmus", "bird_class": 84, "common_name": "Eastern Towhee", "code": 1}, "pk": 859, "model": "birds.bird"}, {"fields": {"scientific_name": "Aimophila ruficeps", "bird_class": 84, "common_name": "Rufous-crowned Sparrow", "code": 1}, "pk": 860, "model": "birds.bird"}, {"fields": {"scientific_name": "Melozone fusca", "bird_class": 84, "common_name": "Canyon Towhee", "code": 1}, "pk": 861, "model": "birds.bird"}, {"fields": {"scientific_name": "Melozone crissalis", "bird_class": 84, "common_name": "California Towhee", "code": 1}, "pk": 862, "model": "birds.bird"}, {"fields": {"scientific_name": "Melozone aberti", "bird_class": 84, "common_name": "Abert's Towhee", "code": 1}, "pk": 863, "model": "birds.bird"}, {"fields": {"scientific_name": "Peucaea carpalis", "bird_class": 84, "common_name": "Rufous-winged Sparrow", "code": 2}, "pk": 864, "model": "birds.bird"}, {"fields": {"scientific_name": "Peucaea botterii", "bird_class": 84, "common_name": "Botteri's Sparrow", "code": 2}, "pk": 865, "model": "birds.bird"}, {"fields": {"scientific_name": "Peucaea cassinii", "bird_class": 84, "common_name": "Cassin's Sparrow", "code": 1}, "pk": 866, "model": "birds.bird"}, {"fields": {"scientific_name": "Peucaea aestivalis", "bird_class": 84, "common_name": "Bachman's Sparrow", "code": 2}, "pk": 867, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella arborea", "bird_class": 84, "common_name": "American Tree Sparrow", "code": 1}, "pk": 868, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella passerina", "bird_class": 84, "common_name": "Chipping Sparrow", "code": 1}, "pk": 869, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella pallida", "bird_class": 84, "common_name": "Clay-colored Sparrow", "code": 1}, "pk": 870, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella breweri", "bird_class": 84, "common_name": "Brewer's Sparrow", "code": 1}, "pk": 871, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella pusilla", "bird_class": 84, "common_name": "Field Sparrow", "code": 1}, "pk": 872, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella wortheni", "bird_class": 84, "common_name": "Worthen's Sparrow", "code": 5}, "pk": 873, "model": "birds.bird"}, {"fields": {"scientific_name": "Spizella atrogularis", "bird_class": 84, "common_name": "Black-chinned Sparrow", "code": 1}, "pk": 874, "model": "birds.bird"}, {"fields": {"scientific_name": "Pooecetes gramineus", "bird_class": 84, "common_name": "Vesper Sparrow", "code": 1}, "pk": 875, "model": "birds.bird"}, {"fields": {"scientific_name": "Chondestes grammacus", "bird_class": 84, "common_name": "Lark Sparrow", "code": 1}, "pk": 876, "model": "birds.bird"}, {"fields": {"scientific_name": "Amphispiza quinquestriata", "bird_class": 84, "common_name": "Five-striped Sparrow", "code": 3}, "pk": 877, "model": "birds.bird"}, {"fields": {"scientific_name": "Amphispiza bilineata", "bird_class": 84, "common_name": "Black-throated Sparrow", "code": 1}, "pk": 878, "model": "birds.bird"}, {"fields": {"scientific_name": "Artemisiospiza belli", "bird_class": 84, "common_name": "Sage Sparrow", "code": 1}, "pk": 879, "model": "birds.bird"}, {"fields": {"scientific_name": "Calamospiza melanocorys", "bird_class": 84, "common_name": "Lark Bunting", "code": 1}, "pk": 880, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerculus sandwichensis", "bird_class": 84, "common_name": "Savannah Sparrow", "code": 1}, "pk": 881, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus savannarum", "bird_class": 84, "common_name": "Grasshopper Sparrow", "code": 1}, "pk": 882, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus bairdii", "bird_class": 84, "common_name": "Baird's Sparrow", "code": 2}, "pk": 883, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus henslowii", "bird_class": 84, "common_name": "Henslow's Sparrow", "code": 2}, "pk": 884, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus leconteii", "bird_class": 84, "common_name": "Le Conte's Sparrow", "code": 1}, "pk": 885, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus nelsoni", "bird_class": 84, "common_name": "Nelson's Sparrow", "code": 1}, "pk": 886, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus caudacutus", "bird_class": 84, "common_name": "Saltmarsh Sparrow", "code": 1}, "pk": 887, "model": "birds.bird"}, {"fields": {"scientific_name": "Ammodramus maritimus", "bird_class": 84, "common_name": "Seaside Sparrow", "code": 1}, "pk": 888, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerella iliaca", "bird_class": 84, "common_name": "Fox Sparrow", "code": 1}, "pk": 889, "model": "birds.bird"}, {"fields": {"scientific_name": "Melospiza melodia", "bird_class": 84, "common_name": "Song Sparrow", "code": 1}, "pk": 890, "model": "birds.bird"}, {"fields": {"scientific_name": "Melospiza lincolnii", "bird_class": 84, "common_name": "Lincoln's Sparrow", "code": 1}, "pk": 891, "model": "birds.bird"}, {"fields": {"scientific_name": "Melospiza georgiana", "bird_class": 84, "common_name": "Swamp Sparrow", "code": 1}, "pk": 892, "model": "birds.bird"}, {"fields": {"scientific_name": "Zonotrichia albicollis", "bird_class": 84, "common_name": "White-throated Sparrow", "code": 1}, "pk": 893, "model": "birds.bird"}, {"fields": {"scientific_name": "Zonotrichia querula", "bird_class": 84, "common_name": "Harris's Sparrow", "code": 1}, "pk": 894, "model": "birds.bird"}, {"fields": {"scientific_name": "Zonotrichia leucophrys", "bird_class": 84, "common_name": "White-crowned Sparrow", "code": 1}, "pk": 895, "model": "birds.bird"}, {"fields": {"scientific_name": "Zonotrichia atricapilla", "bird_class": 84, "common_name": "Golden-crowned Sparrow", "code": 1}, "pk": 896, "model": "birds.bird"}, {"fields": {"scientific_name": "Junco hyemalis", "bird_class": 84, "common_name": "Dark-eyed Junco", "code": 1}, "pk": 897, "model": "birds.bird"}, {"fields": {"scientific_name": "Junco phaeonotus", "bird_class": 84, "common_name": "Yellow-eyed Junco", "code": 2}, "pk": 898, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza leucocephalos", "bird_class": 84, "common_name": "Pine Bunting", "code": 5}, "pk": 899, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza chrysophrys", "bird_class": 84, "common_name": "Yellow-browed Bunting", "code": 5}, "pk": 900, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza pusilla", "bird_class": 84, "common_name": "Little Bunting", "code": 4}, "pk": 901, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza rustica", "bird_class": 84, "common_name": "Rustic Bunting", "code": 3}, "pk": 902, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza elegans", "bird_class": 84, "common_name": "Yellow-throated Bunting", "code": 5}, "pk": 903, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza aureola", "bird_class": 84, "common_name": "Yellow-breasted Bunting", "code": 5}, "pk": 904, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza variabilis", "bird_class": 84, "common_name": "Gray Bunting", "code": 5}, "pk": 905, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza pallasi", "bird_class": 84, "common_name": "Pallas's Bunting", "code": 5}, "pk": 906, "model": "birds.bird"}, {"fields": {"scientific_name": "Emberiza schoeniclus", "bird_class": 84, "common_name": "Reed Bunting", "code": 4}, "pk": 907, "model": "birds.bird"}, {"fields": {"scientific_name": "Piranga flava", "bird_class": 85, "common_name": "Hepatic Tanager", "code": 2}, "pk": 908, "model": "birds.bird"}, {"fields": {"scientific_name": "Piranga rubra", "bird_class": 85, "common_name": "Summer Tanager", "code": 1}, "pk": 909, "model": "birds.bird"}, {"fields": {"scientific_name": "Piranga olivacea", "bird_class": 85, "common_name": "Scarlet Tanager", "code": 1}, "pk": 910, "model": "birds.bird"}, {"fields": {"scientific_name": "Piranga ludoviciana", "bird_class": 85, "common_name": "Western Tanager", "code": 1}, "pk": 911, "model": "birds.bird"}, {"fields": {"scientific_name": "Piranga bidentata", "bird_class": 85, "common_name": "Flame-colored Tanager", "code": 3}, "pk": 912, "model": "birds.bird"}, {"fields": {"scientific_name": "Rhodothraupis celaeno", "bird_class": 85, "common_name": "Crimson-collared Grosbeak", "code": 4}, "pk": 913, "model": "birds.bird"}, {"fields": {"scientific_name": "Cardinalis cardinalis", "bird_class": 85, "common_name": "Northern Cardinal", "code": 1}, "pk": 914, "model": "birds.bird"}, {"fields": {"scientific_name": "Cardinalis sinuatus", "bird_class": 85, "common_name": "Pyrrhuloxia", "code": 1}, "pk": 915, "model": "birds.bird"}, {"fields": {"scientific_name": "Pheucticus chrysopeplus", "bird_class": 85, "common_name": "Yellow Grosbeak", "code": 4}, "pk": 916, "model": "birds.bird"}, {"fields": {"scientific_name": "Pheucticus ludovicianus", "bird_class": 85, "common_name": "Rose-breasted Grosbeak", "code": 1}, "pk": 917, "model": "birds.bird"}, {"fields": {"scientific_name": "Pheucticus melanocephalus", "bird_class": 85, "common_name": "Black-headed Grosbeak", "code": 1}, "pk": 918, "model": "birds.bird"}, {"fields": {"scientific_name": "Cyanocompsa parellina", "bird_class": 85, "common_name": "Blue Bunting", "code": 4}, "pk": 919, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerina caerulea", "bird_class": 85, "common_name": "Blue Grosbeak", "code": 1}, "pk": 920, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerina amoena", "bird_class": 85, "common_name": "Lazuli Bunting", "code": 1}, "pk": 921, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerina cyanea", "bird_class": 85, "common_name": "Indigo Bunting", "code": 1}, "pk": 922, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerina versicolor", "bird_class": 85, "common_name": "Varied Bunting", "code": 2}, "pk": 923, "model": "birds.bird"}, {"fields": {"scientific_name": "Passerina ciris", "bird_class": 85, "common_name": "Painted Bunting", "code": 1}, "pk": 924, "model": "birds.bird"}, {"fields": {"scientific_name": "Spiza americana", "bird_class": 85, "common_name": "Dickcissel", "code": 1}, "pk": 925, "model": "birds.bird"}, {"fields": {"scientific_name": "Dolichonyx oryzivorus", "bird_class": 86, "common_name": "Bobolink", "code": 1}, "pk": 926, "model": "birds.bird"}, {"fields": {"scientific_name": "Agelaius phoeniceus", "bird_class": 86, "common_name": "Red-winged Blackbird", "code": 1}, "pk": 927, "model": "birds.bird"}, {"fields": {"scientific_name": "Agelaius tricolor", "bird_class": 86, "common_name": "Tricolored Blackbird", "code": 2}, "pk": 928, "model": "birds.bird"}, {"fields": {"scientific_name": "Agelaius humeralis", "bird_class": 86, "common_name": "Tawny-shouldered Blackbird", "code": 5}, "pk": 929, "model": "birds.bird"}, {"fields": {"scientific_name": "Sturnella magna", "bird_class": 86, "common_name": "Eastern Meadowlark", "code": 1}, "pk": 930, "model": "birds.bird"}, {"fields": {"scientific_name": "Sturnella neglecta", "bird_class": 86, "common_name": "Western Meadowlark", "code": 1}, "pk": 931, "model": "birds.bird"}, {"fields": {"scientific_name": "Xanthocephalus xanthocephalus", "bird_class": 86, "common_name": "Yellow-headed Blackbird", "code": 1}, "pk": 932, "model": "birds.bird"}, {"fields": {"scientific_name": "Euphagus carolinus", "bird_class": 86, "common_name": "Rusty Blackbird", "code": 1}, "pk": 933, "model": "birds.bird"}, {"fields": {"scientific_name": "Euphagus cyanocephalus", "bird_class": 86, "common_name": "Brewer's Blackbird", "code": 1}, "pk": 934, "model": "birds.bird"}, {"fields": {"scientific_name": "Quiscalus quiscula", "bird_class": 86, "common_name": "Common Grackle", "code": 1}, "pk": 935, "model": "birds.bird"}, {"fields": {"scientific_name": "Quiscalus major", "bird_class": 86, "common_name": "Boat-tailed Grackle", "code": 1}, "pk": 936, "model": "birds.bird"}, {"fields": {"scientific_name": "Quiscalus mexicanus", "bird_class": 86, "common_name": "Great-tailed Grackle", "code": 1}, "pk": 937, "model": "birds.bird"}, {"fields": {"scientific_name": "Molothrus bonariensis", "bird_class": 86, "common_name": "Shiny Cowbird", "code": 3}, "pk": 938, "model": "birds.bird"}, {"fields": {"scientific_name": "Molothrus aeneus", "bird_class": 86, "common_name": "Bronzed Cowbird", "code": 1}, "pk": 939, "model": "birds.bird"}, {"fields": {"scientific_name": "Molothrus ater", "bird_class": 86, "common_name": "Brown-headed Cowbird", "code": 1}, "pk": 940, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus wagleri", "bird_class": 86, "common_name": "Black-vented Oriole", "code": 5}, "pk": 941, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus spurius", "bird_class": 86, "common_name": "Orchard Oriole", "code": 1}, "pk": 942, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus cucullatus", "bird_class": 86, "common_name": "Hooded Oriole", "code": 1}, "pk": 943, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus pustulatus", "bird_class": 86, "common_name": "Streak-backed Oriole", "code": 4}, "pk": 944, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus bullockii", "bird_class": 86, "common_name": "Bullock's Oriole", "code": 1}, "pk": 945, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus pectoralis", "bird_class": 86, "common_name": "Spot-breasted Oriole", "code": 2}, "pk": 946, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus gularis", "bird_class": 86, "common_name": "Altamira Oriole", "code": 2}, "pk": 947, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus graduacauda", "bird_class": 86, "common_name": "Audubon's Oriole", "code": 2}, "pk": 948, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus galbula", "bird_class": 86, "common_name": "Baltimore Oriole", "code": 1}, "pk": 949, "model": "birds.bird"}, {"fields": {"scientific_name": "Icterus parisorum", "bird_class": 86, "common_name": "Scott's Oriole", "code": 1}, "pk": 950, "model": "birds.bird"}, {"fields": {"scientific_name": "Fringilla coelebs", "bird_class": 87, "common_name": "Common Chaffinch", "code": 4}, "pk": 951, "model": "birds.bird"}, {"fields": {"scientific_name": "Fringilla montifringilla", "bird_class": 87, "common_name": "Brambling", "code": 3}, "pk": 952, "model": "birds.bird"}, {"fields": {"scientific_name": "Leucosticte arctoa", "bird_class": 87, "common_name": "Asian Rosy-Finch", "code": 5}, "pk": 953, "model": "birds.bird"}, {"fields": {"scientific_name": "Leucosticte tephrocotis", "bird_class": 87, "common_name": "Gray-crowned Rosy-Finch", "code": 1}, "pk": 954, "model": "birds.bird"}, {"fields": {"scientific_name": "Leucosticte atrata", "bird_class": 87, "common_name": "Black Rosy-Finch", "code": 2}, "pk": 955, "model": "birds.bird"}, {"fields": {"scientific_name": "Leucosticte australis", "bird_class": 87, "common_name": "Brown-capped Rosy-Finch", "code": 2}, "pk": 956, "model": "birds.bird"}, {"fields": {"scientific_name": "Pinicola enucleator", "bird_class": 87, "common_name": "Pine Grosbeak", "code": 1}, "pk": 957, "model": "birds.bird"}, {"fields": {"scientific_name": "Pyrrhula pyrrhula", "bird_class": 87, "common_name": "Eurasian Bullfinch", "code": 4}, "pk": 958, "model": "birds.bird"}, {"fields": {"scientific_name": "Carpodacus erythrinus", "bird_class": 87, "common_name": "Common Rosefinch", "code": 4}, "pk": 959, "model": "birds.bird"}, {"fields": {"scientific_name": "Haemorhous purpureus", "bird_class": 87, "common_name": "Purple Finch", "code": 1}, "pk": 960, "model": "birds.bird"}, {"fields": {"scientific_name": "Haemorhous cassinii", "bird_class": 87, "common_name": "Cassin's Finch", "code": 1}, "pk": 961, "model": "birds.bird"}, {"fields": {"scientific_name": "Haemorhous mexicanus", "bird_class": 87, "common_name": "House Finch", "code": 1}, "pk": 962, "model": "birds.bird"}, {"fields": {"scientific_name": "Loxia curvirostra", "bird_class": 87, "common_name": "Red Crossbill", "code": 1}, "pk": 963, "model": "birds.bird"}, {"fields": {"scientific_name": "Loxia leucoptera", "bird_class": 87, "common_name": "White-winged Crossbill", "code": 2}, "pk": 964, "model": "birds.bird"}, {"fields": {"scientific_name": "Acanthis flammea", "bird_class": 87, "common_name": "Common Redpoll", "code": 1}, "pk": 965, "model": "birds.bird"}, {"fields": {"scientific_name": "Acanthis hornemanni", "bird_class": 87, "common_name": "Hoary Redpoll", "code": 2}, "pk": 966, "model": "birds.bird"}, {"fields": {"scientific_name": "Spinus spinus", "bird_class": 87, "common_name": "Eurasian Siskin", "code": 5}, "pk": 967, "model": "birds.bird"}, {"fields": {"scientific_name": "Spinus pinus", "bird_class": 87, "common_name": "Pine Siskin", "code": 1}, "pk": 968, "model": "birds.bird"}, {"fields": {"scientific_name": "Spinus psaltria", "bird_class": 87, "common_name": "Lesser Goldfinch", "code": 1}, "pk": 969, "model": "birds.bird"}, {"fields": {"scientific_name": "Spinus lawrencei", "bird_class": 87, "common_name": "Lawrence's Goldfinch", "code": 2}, "pk": 970, "model": "birds.bird"}, {"fields": {"scientific_name": "Spinus tristis", "bird_class": 87, "common_name": "American Goldfinch", "code": 1}, "pk": 971, "model": "birds.bird"}, {"fields": {"scientific_name": "Chloris sinica", "bird_class": 87, "common_name": "Oriental Greenfinch", "code": 4}, "pk": 972, "model": "birds.bird"}, {"fields": {"scientific_name": "Coccothraustes vespertinus", "bird_class": 87, "common_name": "Evening Grosbeak", "code": 1}, "pk": 973, "model": "birds.bird"}, {"fields": {"scientific_name": "Coccothraustes coccothraustes", "bird_class": 87, "common_name": "Hawfinch", "code": 4}, "pk": 974, "model": "birds.bird"}, {"fields": {"scientific_name": "Passer domesticus", "bird_class": 88, "common_name": "House Sparrow", "code": 1}, "pk": 975, "model": "birds.bird"}, {"fields": {"scientific_name": "Passer montanus", "bird_class": 88, "common_name": "Eurasian Tree Sparrow", "code": 2}, "pk": 976, "model": "birds.bird"}] \ No newline at end of file diff --git a/app/unused_apps/birds/build.py b/app/unused_apps/birds/build.py deleted file mode 100644 index 565b675..0000000 --- a/app/unused_apps/birds/build.py +++ /dev/null @@ -1,21 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - - -class BuildBirds(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("birds:list_redirect"), - paginate_by=24 - ) - print("building birds") - - def get_model_queryset(self): - return self.model.objects.all() - -def builder(): - j = BuildBirds("birds", "birdsighting") - j.build() diff --git a/app/unused_apps/birds/migrations/0001_initial.py b/app/unused_apps/birds/migrations/0001_initial.py deleted file mode 100644 index b20387e..0000000 --- a/app/unused_apps/birds/migrations/0001_initial.py +++ /dev/null @@ -1,86 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-13 09:49 -from __future__ import unicode_literals - -import birds.models -from django.conf import settings -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - #('locations', '__first__'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='Bird', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('common_name', models.CharField(max_length=200)), - ('slug', models.SlugField()), - ('scientific_name', models.CharField(max_length=200)), - ('code', models.IntegerField(choices=[(1, 'regular occurring - common'), (2, 'regular occurring - less common'), (3, 'rare'), (4, 'casual'), (5, 'accidental'), (6, 'Cannot be found')], default=0)), - ('image', models.FileField(blank=True, null=True, upload_to=birds.models.get_upload_path)), - ], - options={ - 'ordering': ['common_name'], - }, - ), - migrations.CreateModel( - name='BirdAudio', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('audio', models.FileField(upload_to='audio/birds/')), - ('recorder', models.CharField(blank=True, max_length=200, null=True)), - ('pub_date', models.DateTimeField()), - ('location', models.CharField(blank=True, max_length=200, null=True)), - ('link', models.CharField(blank=True, max_length=450, null=True)), - ('copyright', models.CharField(blank=True, max_length=250, null=True)), - ('bird', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recordings', to='birds.Bird')), - ], - options={ - 'ordering': ['bird'], - 'verbose_name_plural': 'Bird Audio', - }, - ), - migrations.CreateModel( - name='BirdClass', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('common_name', models.CharField(max_length=200)), - ('scientific_name', models.CharField(max_length=200)), - ], - options={ - 'ordering': ['common_name'], - 'verbose_name_plural': 'Bird Class', - }, - ), - migrations.CreateModel( - name='BirdSighting', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('point', django.contrib.gis.db.models.fields.PointField(srid=4326)), - ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')), - ('image', models.FileField(blank=True, null=True, upload_to=birds.models.get_upload_path)), - ('bird', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='birds.Bird')), - ('location', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('seen_by', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), - ], - options={ - 'verbose_name_plural': 'Bird Sighting', - }, - ), - migrations.AddField( - model_name='bird', - name='bird_class', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='birds.BirdClass'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0002_auto_20160313_0953.py b/app/unused_apps/birds/migrations/0002_auto_20160313_0953.py deleted file mode 100644 index a2085ea..0000000 --- a/app/unused_apps/birds/migrations/0002_auto_20160313_0953.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-13 09:53 -from __future__ import unicode_literals - -import birds.models -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='bird', - name='image_credit', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AlterField( - model_name='bird', - name='image', - field=models.FileField(blank=True, help_text='width of high res is 1360px', null=True, upload_to=birds.models.get_upload_path), - ), - ] diff --git a/app/unused_apps/birds/migrations/0003_birdsighting_images.py b/app/unused_apps/birds/migrations/0003_birdsighting_images.py deleted file mode 100644 index d20e8b7..0000000 --- a/app/unused_apps/birds/migrations/0003_birdsighting_images.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-20 08:02 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0007_auto_20160320_0802'), - ('birds', '0002_auto_20160313_0953'), - ] - - operations = [ - migrations.AddField( - model_name='birdsighting', - name='images', - field=models.ManyToManyField(to='photos.LuxImage'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0004_auto_20160321_1123.py b/app/unused_apps/birds/migrations/0004_auto_20160321_1123.py deleted file mode 100644 index 7672a18..0000000 --- a/app/unused_apps/birds/migrations/0004_auto_20160321_1123.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-21 11:23 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0003_birdsighting_images'), - ] - - operations = [ - migrations.RemoveField( - model_name='birdsighting', - name='image', - ), - migrations.AddField( - model_name='birdsighting', - name='audio', - field=models.ManyToManyField(to='birds.BirdAudio'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0005_auto_20170714_2222.py b/app/unused_apps/birds/migrations/0005_auto_20170714_2222.py deleted file mode 100644 index 8bdfb4b..0000000 --- a/app/unused_apps/birds/migrations/0005_auto_20170714_2222.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-07-14 22:22 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0004_auto_20160321_1123'), - ] - - operations = [ - migrations.AlterField( - model_name='birdsighting', - name='audio', - field=models.ManyToManyField(blank=True, null=True, to='birds.BirdAudio'), - ), - migrations.AlterField( - model_name='birdsighting', - name='images', - field=models.ManyToManyField(blank=True, null=True, to='photos.LuxImage'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0006_auto_20170714_2224.py b/app/unused_apps/birds/migrations/0006_auto_20170714_2224.py deleted file mode 100644 index bd4db82..0000000 --- a/app/unused_apps/birds/migrations/0006_auto_20170714_2224.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-07-14 22:24 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0005_auto_20170714_2222'), - ] - - operations = [ - migrations.AlterField( - model_name='birdsighting', - name='audio', - field=models.ManyToManyField(blank=True, to='birds.BirdAudio'), - ), - migrations.AlterField( - model_name='birdsighting', - name='images', - field=models.ManyToManyField(blank=True, to='photos.LuxImage'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0007_auto_20170821_1415.py b/app/unused_apps/birds/migrations/0007_auto_20170821_1415.py deleted file mode 100644 index a51776c..0000000 --- a/app/unused_apps/birds/migrations/0007_auto_20170821_1415.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-08-21 14:15 -from __future__ import unicode_literals - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ('birds', '0006_auto_20170714_2224'), - ] - - operations = [ - migrations.AlterModelOptions( - name='birdsighting', - options={'get_latest_by': 'date', 'verbose_name_plural': 'Bird Sighting'}, - ), - migrations.RemoveField( - model_name='birdsighting', - name='images', - ), - migrations.AddField( - model_name='birdsighting', - name='image', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.LuxImage'), - ), - migrations.AlterField( - model_name='birdsighting', - name='point', - field=django.contrib.gis.db.models.fields.PointField(blank=True, srid=4326), - ), - ] diff --git a/app/unused_apps/birds/migrations/0008_auto_20170821_1418.py b/app/unused_apps/birds/migrations/0008_auto_20170821_1418.py deleted file mode 100644 index e5c80a4..0000000 --- a/app/unused_apps/birds/migrations/0008_auto_20170821_1418.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-08-21 14:18 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0007_auto_20170821_1415'), - ] - - operations = [ - migrations.RenameField( - model_name='birdsighting', - old_name='image', - new_name='images', - ), - ] diff --git a/app/unused_apps/birds/migrations/0009_auto_20170821_1429.py b/app/unused_apps/birds/migrations/0009_auto_20170821_1429.py deleted file mode 100644 index 840d7d3..0000000 --- a/app/unused_apps/birds/migrations/0009_auto_20170821_1429.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-08-21 14:29 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0008_auto_20170821_1418'), - ] - - operations = [ - migrations.RenameField( - model_name='birdsighting', - old_name='images', - new_name='image', - ), - ] diff --git a/app/unused_apps/birds/migrations/0010_auto_20170906_2100.py b/app/unused_apps/birds/migrations/0010_auto_20170906_2100.py deleted file mode 100644 index aada189..0000000 --- a/app/unused_apps/birds/migrations/0010_auto_20170906_2100.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-09-06 21:00 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ('birds', '0009_auto_20170821_1429'), - ] - - operations = [ - migrations.RemoveField( - model_name='birdsighting', - name='image', - ), - migrations.AddField( - model_name='birdsighting', - name='images', - field=models.ManyToManyField(blank=True, to='photos.LuxImage'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0011_auto_20180126_1456.py b/app/unused_apps/birds/migrations/0011_auto_20180126_1456.py deleted file mode 100644 index d63cf10..0000000 --- a/app/unused_apps/birds/migrations/0011_auto_20180126_1456.py +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by Django 2.0.1 on 2018-01-26 14:56 - -import birds.models -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0010_auto_20170906_2100'), - ] - - operations = [ - migrations.CreateModel( - name='AP', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('common_name', models.CharField(max_length=200)), - ('slug', models.SlugField()), - ('scientific_name', models.CharField(max_length=200)), - ('code', models.IntegerField(choices=[(1, 'regular occurring - common'), (2, 'regular occurring - less common'), (3, 'rare'), (4, 'casual'), (5, 'accidental'), (6, 'Cannot be found')], default=0)), - ('image', models.FileField(blank=True, help_text='width of high res is 1360px', null=True, upload_to=birds.models.get_upload_path)), - ('image_credit', models.CharField(blank=True, max_length=200, null=True)), - ], - options={ - 'ordering': ['common_name'], - }, - ), - migrations.CreateModel( - name='APClass', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('common_name', models.CharField(max_length=200)), - ('scientific_name', models.CharField(max_length=200)), - ('kind', models.IntegerField(choices=[(1, 'Bird'), (2, 'Mammal'), (3, 'Reptile'), (4, 'Amphibian'), (5, 'Plant')], default=1)), - ], - options={ - 'verbose_name_plural': 'Animal/Plant Class', - 'ordering': ['kind', 'common_name'], - }, - ), - migrations.AddField( - model_name='ap', - name='apclass', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='birds.APClass'), - ), - ] diff --git a/app/unused_apps/birds/migrations/0012_auto_20180126_1739.py b/app/unused_apps/birds/migrations/0012_auto_20180126_1739.py deleted file mode 100644 index 307aa42..0000000 --- a/app/unused_apps/birds/migrations/0012_auto_20180126_1739.py +++ /dev/null @@ -1,44 +0,0 @@ -# Generated by Django 2.0.1 on 2018-01-26 17:39 - -from django.conf import settings -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('locations', '0002_checkin'), - ('photos', '0018_auto_20161130_1218'), - ('contenttypes', '0002_remove_content_type_name'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('birds', '0011_auto_20180126_1456'), - ] - - operations = [ - migrations.CreateModel( - name='Sighting', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('object_id', models.PositiveIntegerField()), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, srid=4326)), - ('date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Date')), - ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), - ('images', models.ManyToManyField(blank=True, to='photos.LuxImage')), - ('location', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('seen_by', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.AlterField( - model_name='ap', - name='code', - field=models.IntegerField(choices=[(0, 'unknown'), (1, 'regular occurring - common'), (2, 'regular occurring - less common'), (3, 'rare'), (4, 'casual'), (5, 'accidental'), (6, 'Cannot be found')], default=0), - ), - migrations.AlterField( - model_name='bird', - name='code', - field=models.IntegerField(choices=[(0, 'unknown'), (1, 'regular occurring - common'), (2, 'regular occurring - less common'), (3, 'rare'), (4, 'casual'), (5, 'accidental'), (6, 'Cannot be found')], default=0), - ), - ] diff --git a/app/unused_apps/birds/migrations/0013_auto_20180126_2010.py b/app/unused_apps/birds/migrations/0013_auto_20180126_2010.py deleted file mode 100644 index 613597a..0000000 --- a/app/unused_apps/birds/migrations/0013_auto_20180126_2010.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.0.1 on 2018-01-26 20:10 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0012_auto_20180126_1739'), - ] - - operations = [ - migrations.RemoveField( - model_name='sighting', - name='content_type', - ), - migrations.RemoveField( - model_name='sighting', - name='object_id', - ), - migrations.AddField( - model_name='sighting', - name='ap', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='birds.AP'), - preserve_default=False, - ), - ] diff --git a/app/unused_apps/birds/migrations/0014_auto_20180128_0902.py b/app/unused_apps/birds/migrations/0014_auto_20180128_0902.py deleted file mode 100644 index 97791ef..0000000 --- a/app/unused_apps/birds/migrations/0014_auto_20180128_0902.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.0.1 on 2018-01-28 09:02 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('birds', '0013_auto_20180126_2010'), - ] - - operations = [ - migrations.AlterModelOptions( - name='ap', - options={'ordering': ['common_name'], 'verbose_name': 'Animal/Plant', 'verbose_name_plural': 'Animal/Plant'}, - ), - migrations.AlterModelOptions( - name='sighting', - options={'ordering': ['date']}, - ), - ] diff --git a/app/unused_apps/birds/migrations/__init__.py b/app/unused_apps/birds/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/birds/models.py b/app/unused_apps/birds/models.py deleted file mode 100644 index 5a14786..0000000 --- a/app/unused_apps/birds/models.py +++ /dev/null @@ -1,295 +0,0 @@ -import datetime -from django.urls import reverse -from django.template.defaultfilters import slugify -from django.contrib.gis.db import models -from django.contrib.auth.models import User -from django.utils import timezone -from locations.models import Location -from django import forms -from django.conf import settings - -from photos.models import LuxImage - - -def get_upload_path(self, filename): - return "images/bird-images/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -# from http://aba.org/checklist/codes.html -ABA_CODES = ( - (0, 'unknown'), - (1, 'regular occurring - common'), - (2, 'regular occurring - less common'), - (3, 'rare'), - (4, 'casual'), - (5, 'accidental'), - (6, 'Cannot be found'), -) - -KIND_LIST = ( - (1, 'Bird'), - (2, 'Mammal'), - (3, 'Reptile'), - (4, 'Amphibian'), - (5, 'Plant'), -) - - -class APClass(models.Model): - common_name = models.CharField(max_length=200) - scientific_name = models.CharField(max_length=200) - kind = models.IntegerField(choices=KIND_LIST, default=1) - - class Meta: - verbose_name_plural = 'Animal/Plant Class' - ordering = ["kind", "common_name"] - - def __str__(self): - return self.common_name - -class AP(models.Model): - common_name = models.CharField(max_length=200) - slug = models.SlugField() - scientific_name = models.CharField(max_length=200) - code = models.IntegerField(choices=ABA_CODES, default=0) - apclass = models.ForeignKey(APClass, on_delete=models.CASCADE) - image = models.FileField(upload_to=get_upload_path, null=True, blank=True, help_text="width of high res is 1360px") - image_credit = models.CharField(max_length=200, blank=True, null=True) - - def __str__(self): - return self.common_name - - def get_image_url(self): - return "%s%s" % (settings.IMAGES_URL, self.image.url.split("media")[1][8:]) - - def get_absolute_url(self): - return reverse("sightings:detail", kwargs={"slug": self.slug}) - - def kind(self): - return self.apclass.kind - - class Meta: - verbose_name_plural = 'Animal/Plant' - verbose_name = 'Animal/Plant' - ordering = ["common_name", ] - - def save(self, *args, **kwargs): - self.slug = slugify(self.common_name[:50]) - super(AP, self).save(*args, **kwargs) - - -class Sighting(models.Model): - ap = models.ForeignKey(AP, on_delete=models.CASCADE) - point = models.PointField(blank=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True, related_name="location_old") - date = models.DateTimeField('Date', default=timezone.now) - seen_by = models.ManyToManyField(User, related_name="seenby_old") - images = models.ManyToManyField(LuxImage, blank=True, related_name="images_old") - #audio = models.ManyToManyField(BirdAudio, blank=True) - - class Meta: - ordering = ["-date", ] - - @property - def state(self): - return self.location.state - - @property - def country(self): - return self.location.state.country - - @property - def region(self): - return self.location.state.country.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - def get_small_image(self): - for img in self.images.all(): - for size in img.sizes.all(): - if size.width > 360 and size.width < 700: - return img.get_image_by_size(size) - - def get_absolute_url(self): - return reverse("birds:detail", kwargs={"slug": self.bird.slug}) - - def __str__(self): - return self.ap.common_name - - def save(self): - if not self.point: - self.point = Sighting.objects.latest().point - try: - self.location = Location.objects.filter( - geometry__contains=self.point - ).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - super(Sighting, self).save() - -""" -Migration from Birds to abstract: -birdclass = BirdClass.objects.all() -for b in birdclass: - APClass.objects.create( - common_name = b.common_name, - scientific_name = b.scientific_name, - kind = 1 - ) - -birds = Bird.objects.all() -for b in birds: - ap = APClass.objects.get(scientific_name=b.bird_class.scientific_name) - print(ap) - AP.objects.create( - common_name = b.common_name, - scientific_name = b.scientific_name, - code = b.code, - apclass = ap, - image = b.image, - image_credit = b.image_credit, - ) - print(t) - -birdsighting = BirdSighting.objects.all() -for bird in birdsighting: - ap = AP.objects.get(scientific_name=bird.bird.scientific_name) - s = Sighting.objects.create( - ap = ap, - point = bird.point, - location = bird.location, - date = bird.date, - ) - for t in bird.images.all(): - s.images.add(t) - for t in bird.seen_by.all(): - s.seen_by.add(t) -""" - - -class BirdClass(models.Model): - common_name = models.CharField(max_length=200) - scientific_name = models.CharField(max_length=200) - - class Meta: - verbose_name_plural = 'Bird Class' - ordering = ["common_name", ] - - def __str__(self): - return self.common_name - - -class Bird(models.Model): - common_name = models.CharField(max_length=200) - slug = models.SlugField() - scientific_name = models.CharField(max_length=200) - code = models.IntegerField(choices=ABA_CODES, default=0) - bird_class = models.ForeignKey(BirdClass, on_delete=models.CASCADE) - image = models.FileField(upload_to=get_upload_path, null=True, blank=True, help_text="width of high res is 1360px") - image_credit = models.CharField(max_length=200, blank=True, null=True) - - def __str__(self): - return self.common_name - - # function to resize large image to 680px wide and use as normal image - # the question is, should this happen here, or with some universale image - # model that can be attached to other models, loaded in entries and - # displayed in galleries. I suppose the answer is yes then isn't it? - # the problem is that I still can't see exactly what that looks like... - - def get_image_url(self): - return "%s%s" % (settings.IMAGES_URL, self.image.url.split("media")[1][8:]) - - def get_absolute_url(self): - return reverse("birds:detail", kwargs={"slug": self.slug}) - - class Meta: - ordering = ["common_name", ] - - def save(self): - self.slug = slugify(self.common_name[:50]) - super(Bird, self).save() - - -class BirdAudio(models.Model): - bird = models.ForeignKey(Bird, on_delete=models.CASCADE, related_name='recordings') - audio = models.FileField(upload_to='audio/birds/') - recorder = models.CharField(max_length=200, null=True, blank=True) - pub_date = models.DateTimeField() - location = models.CharField(max_length=200, null=True, blank=True) - link = models.CharField(max_length=450, null=True, blank=True) - copyright = models.CharField(max_length=250, null=True, blank=True) - - class Meta: - verbose_name_plural = 'Bird Audio' - ordering = ["bird", ] - - def __str__(self): - return self.bird.common_name - - -class BirdSighting(models.Model): - bird = models.ForeignKey(Bird, on_delete=models.CASCADE) - point = models.PointField(blank=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True) - date = models.DateTimeField('Date', default=timezone.now) - seen_by = models.ManyToManyField(User) - images = models.ManyToManyField(LuxImage, blank=True) - audio = models.ManyToManyField(BirdAudio, blank=True) - - class Meta: - verbose_name_plural = 'Bird Sighting' - get_latest_by = 'date' - - @property - def state(self): - return self.location.state - - @property - def country(self): - return self.location.state.country - - @property - def region(self): - return self.location.state.country.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - def get_small_image(self): - for img in self.images.all(): - for size in img.sizes.all(): - if size.width > 360 and size.width < 700: - return img.get_image_by_size(size) - - def get_absolute_url(self): - return reverse("birds:detail", kwargs={"slug": self.bird.slug}) - - def __str__(self): - return self.bird.common_name - - def save(self): - if not self.point: - self.point = BirdSighting.objects.latest().point - try: - self.location = Location.objects.filter( - geometry__contains=self.point - ).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - super(BirdSighting, self).save() diff --git a/app/unused_apps/birds/urls.py b/app/unused_apps/birds/urls.py deleted file mode 100644 index 8781433..0000000 --- a/app/unused_apps/birds/urls.py +++ /dev/null @@ -1,34 +0,0 @@ -from django.conf.urls import url -from django.views.generic.base import RedirectView -from . import views - -app_name = "birds" - -urlpatterns = [ - url( - r'(?P[\w]+)/(?P\d+)/', - views.BirdListUserView.as_view(), - name='list_by_person' - ), - url( - r'(?P\d+)/$', - views.BirdListView.as_view(), - name="list" - ), - url( - r'^(?P[-_\w]+)$', - views.BirdDetailView.as_view(), - name='detail' - ), - # redirect /slug/ to /slug/1/ for live server - url( - r'(?P[-\w]+)/$', - RedirectView.as_view(url="/birds/%(user)s/1/", permanent=False), - name="list_person_redirect" - ), - url( - r'', - RedirectView.as_view(url="/birds/1/", permanent=False), - name="list_redirect" - ), -] diff --git a/app/unused_apps/birds/views.py b/app/unused_apps/birds/views.py deleted file mode 100644 index 4d7f59e..0000000 --- a/app/unused_apps/birds/views.py +++ /dev/null @@ -1,49 +0,0 @@ -from django.views.generic.detail import DetailView -from django.contrib.auth.models import User -from utils.views import PaginatedListView -from birds.models import Bird, BirdAudio, BirdSighting - - -class BirdListView(PaginatedListView): - template_name = 'archives/birds.html' - - def get_queryset(self): - return BirdSighting.objects.all() - - -class BirdListUserView(PaginatedListView): - template_name = 'archives/birds.html' - - def get_queryset(self): - return BirdSighting.objects.filter( - seen_by__username=self.kwargs['user'] - ) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(BirdListUserView, self).get_context_data(**kwargs) - context['user'] = User.objects.get(username=self.kwargs['user']) - return context - - -class BirdDetailView(DetailView): - model = Bird - template_name = "details/bird.html" - slug_field = "slug" - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(BirdDetailView, self).get_context_data(**kwargs) - try: - context['recording'] = BirdAudio.objects.get( - bird__slug=self.kwargs['slug'] - ) - except BirdAudio.DoesNotExist: - pass - try: - context['sighting'] = BirdSighting.objects.get( - bird__slug=self.kwargs['slug'] - ) - except BirdSighting.DoesNotExist: - pass - return context diff --git a/app/unused_apps/ccg_notes/__init__.py b/app/unused_apps/ccg_notes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/ccg_notes/admin.py b/app/unused_apps/ccg_notes/admin.py deleted file mode 100644 index 5aec3ae..0000000 --- a/app/unused_apps/ccg_notes/admin.py +++ /dev/null @@ -1,32 +0,0 @@ -from django.contrib import admin - -from utils.widgets import OLAdminBase -from utils.widgets import TagListFilter - -from .models import CcgNote -from .forms import CcgNoteForm - -class CcgNoteAdmin(OLAdminBase): - form = CcgNoteForm - prepopulated_fields = {"slug": ('title',)} - list_display = ('slug', 'pub_date',) - list_filter = ['status', TagListFilter] - fieldsets = ( - ('Note', { - 'fields': ( - ('title', 'slug'), - 'body_markdown', - 'tags', - ('pub_date', 'status'), - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - - -admin.site.register(CcgNote, CcgNoteAdmin) diff --git a/app/unused_apps/ccg_notes/autocomplete_light_registry.py b/app/unused_apps/ccg_notes/autocomplete_light_registry.py deleted file mode 100644 index 0781848..0000000 --- a/app/unused_apps/ccg_notes/autocomplete_light_registry.py +++ /dev/null @@ -1,24 +0,0 @@ -import autocomplete_light.shortcuts as al -from taggit.models import Tag - -# This will generate a PersonAutocomplete class -al.register(Tag, - # Just like in ModelAdmin.search_fields - search_fields=['name'], - attrs={ - # This will set the input placeholder attribute: - 'placeholder': 'Tags...', - # This will set the yourlabs.Autocomplete.minimumCharacters - # options, the naming conversion is handled by jQuery - 'data-autocomplete-minimum-characters': 1, -}, - # This will set the data-widget-maximum-values attribute on the - # widget container element, and will be set to - # yourlabs.Widget.maximumValues (jQuery handles the naming - # conversion). - widget_attrs={ - 'data-widget-maximum-values': 4, - # Enable modern-style widget ! - 'class': 'modern-style', - }, -) diff --git a/app/unused_apps/ccg_notes/build.py b/app/unused_apps/ccg_notes/build.py deleted file mode 100644 index 499adc6..0000000 --- a/app/unused_apps/ccg_notes/build.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from django.core.urlresolvers import reverse -from builder.base import BuildNew - - -class BuildNotes(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("notes:live_redirect"), - paginate_by=24 - ) - self.build_year_view("notes:list_year") - self.build_month_view("notes:list_month") - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildNotes("notes", "luxnote") - j.build() diff --git a/app/unused_apps/ccg_notes/forms.py b/app/unused_apps/ccg_notes/forms.py deleted file mode 100644 index 0934306..0000000 --- a/app/unused_apps/ccg_notes/forms.py +++ /dev/null @@ -1,17 +0,0 @@ -from django import forms -import dal -from dal_select2_taggit.widgets import TaggitSelect2 -from .models import CcgNote -from dal import autocomplete - - -class CcgNoteForm(autocomplete.FutureModelForm): - class Meta: - model = CcgNote - fields = ('tags',) - widgets = { - 'tags': autocomplete.TaggitSelect2( - 'tag-autocomplete' - ), - 'body_markdown': forms.Textarea(attrs={'rows': 18, 'cols': 60}), - } diff --git a/app/unused_apps/ccg_notes/mdx_urlize.py b/app/unused_apps/ccg_notes/mdx_urlize.py deleted file mode 100644 index dc8d1d7..0000000 --- a/app/unused_apps/ccg_notes/mdx_urlize.py +++ /dev/null @@ -1,81 +0,0 @@ -"""A more liberal autolinker - -Inspired by Django's urlize function. - -Positive examples: - ->>> import markdown ->>> md = markdown.Markdown(extensions=['urlize']) - ->>> md.convert('http://example.com/') -u'

http://example.com/

' - ->>> md.convert('go to http://example.com') -u'

go to http://example.com

' - ->>> md.convert('example.com') -u'

example.com

' - ->>> md.convert('example.net') -u'

example.net

' - ->>> md.convert('www.example.us') -u'

www.example.us

' - ->>> md.convert('(www.example.us/path/?name=val)') -u'

(www.example.us/path/?name=val)

' - ->>> md.convert('go to now!') -u'

go to http://example.com now!

' - -Negative examples: - ->>> md.convert('del.icio.us') -u'

del.icio.us

' - -""" - -import markdown - -# Global Vars -URLIZE_RE = '(%s)' % '|'.join([ - r'<(?:f|ht)tps?://[^>]*>', - r'\b(?:f|ht)tps?://[^)<>\s]+[^.,)<>\s]', - r'\bwww\.[^)<>\s]+[^.,)<>\s]', - r'[^(<\s]+\.(?:com|net|org)\b', -]) - -class UrlizePattern(markdown.inlinepatterns.Pattern): - """ Return a link Element given an autolink (`http://example/com`). """ - def handleMatch(self, m): - url = m.group(2) - - if url.startswith('<'): - url = url[1:-1] - - text = url - - if not url.split('://')[0] in ('http','https','ftp'): - if '@' in url and not '/' in url: - url = 'mailto:' + url - else: - url = 'http://' + url - - el = markdown.util.etree.Element("a") - el.set('href', url) - el.text = markdown.util.AtomicString(text) - return el - -class UrlizeExtension(markdown.Extension): - """ Urlize Extension for Python-Markdown. """ - - def extendMarkdown(self, md, md_globals): - """ Replace autolink with UrlizePattern """ - md.inlinePatterns['autolink'] = UrlizePattern(URLIZE_RE, md) - -def makeExtension(configs=None): - return UrlizeExtension(configs=configs) - -if __name__ == "__main__": - import doctest - doctest.testmod() diff --git a/app/unused_apps/ccg_notes/migrations/0001_initial.py b/app/unused_apps/ccg_notes/migrations/0001_initial.py deleted file mode 100644 index 1877e91..0000000 --- a/app/unused_apps/ccg_notes/migrations/0001_initial.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-07-22 19:54 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.utils.timezone -import taggit.managers - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('taggit', '0002_auto_20150616_2121'), - ] - - operations = [ - migrations.CreateModel( - name='CcgNote', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(blank=True, max_length=250, null=True)), - ('slug', models.SlugField(blank=True, unique_for_date='pub_date')), - ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), - ('date_last_updated', models.DateTimeField(blank=True, verbose_name='Date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField(verbose_name='Note')), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=1)), - ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), - ], - ), - ] diff --git a/app/unused_apps/ccg_notes/migrations/__init__.py b/app/unused_apps/ccg_notes/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/ccg_notes/models.py b/app/unused_apps/ccg_notes/models.py deleted file mode 100644 index b235d36..0000000 --- a/app/unused_apps/ccg_notes/models.py +++ /dev/null @@ -1,36 +0,0 @@ -from django.contrib.gis.db import models -from django.utils import timezone -from django.core.urlresolvers import reverse - -from taggit.managers import TaggableManager -from utils.widgets import markdown_to_html -from jrnl.models import render_images - - -class CcgNote(models.Model): - title = models.CharField(max_length=250, null=True, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - pub_date = models.DateTimeField(default=timezone.now) - date_last_updated = models.DateTimeField('Date', blank=True) - body_html = models.TextField(blank=True) - body_markdown = models.TextField('Note') - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=1) - tags = TaggableManager(blank=True) - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("ccg_notes:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - if not self.id: - self.pub_date = timezone.now() - self.date_last_updated = timezone.now() - super(CcgNote, self).save() diff --git a/app/unused_apps/ccg_notes/urls.py b/app/unused_apps/ccg_notes/urls.py deleted file mode 100644 index 0f9fad7..0000000 --- a/app/unused_apps/ccg_notes/urls.py +++ /dev/null @@ -1,62 +0,0 @@ -from django.conf.urls import url -from django.views.generic.base import RedirectView - -from . import views - -app_name = "notes" - -urlpatterns = [ - url( - r'(?P\d{4})/(?P\d{2})/(?P[-\w]+).txt$', - views.NoteDetailViewTXT.as_view(), - name="detail-txt" - ), - url( - r'(?P\d{4})/(?P\d{2})/(?P[-\w]+).amp$', - views.NoteDetailViewAMP.as_view(), - name="detail-amp" - ), - url( - r'(?P\d{4})/(?P\d{2})/(?P[-\w]+)$', - views.NoteDetailView.as_view(), - name="detail" - ), - url( - r'^(?P[0-9]{4})/(?P[0-9]{2})/$', - views.NoteMonthArchiveView.as_view(month_format='%m'), - name="list_month" - ), - url( - r'(?P\d{4})/$', - views.NoteYearArchiveView.as_view(), - name="list_year" - ), - - - url( - r'(?P\d{4})/(?P\d{2})/$', - views.date_list, - name="notes_by_month" - ), - url( - r'(?P\d{4})/$', - views.date_list, - name="notes_by_year" - ), - url( - r'(?P\d+)/$', - views.NoteList.as_view(), - name="list" - ), - # redirect / to /1/ for live server - url( - r'', - RedirectView.as_view(url="/field-notes/1/", permanent=False), - name="live_redirect" - ), - url( - r'^$', - views.entry_list, - name="notes_archive" - ), -] diff --git a/app/unused_apps/ccg_notes/views.py b/app/unused_apps/ccg_notes/views.py deleted file mode 100644 index 1fbe6f4..0000000 --- a/app/unused_apps/ccg_notes/views.py +++ /dev/null @@ -1,85 +0,0 @@ -from django.shortcuts import render_to_response, get_object_or_404 -from django.template import RequestContext -from django.views.generic.dates import YearArchiveView, MonthArchiveView -from django.views.generic.detail import DetailView - -from utils.views import PaginatedListView - -from notes.models import LuxNote, Note - - -class NoteList(PaginatedListView): - """ - Return a list of Notes in reverse chronological order - """ - queryset = LuxNote.objects.all().order_by('-pub_date') - template_name = "archives/notes.html" - - -class NoteDetailView(DetailView): - model = LuxNote - template_name = "details/note.html" - slug_field = "slug" - - -class NoteDetailViewTXT(NoteDetailView): - template_name = "details/entry.txt" - - -class NoteDetailViewAMP(NoteDetailView): - template_name = "details/entry.amp" - - -class NoteYearArchiveView(YearArchiveView): - queryset = LuxNote.objects.all() - date_field = "pub_date" - make_object_list = True - allow_future = True - template_name = "archives/notes_date.html" - - -class NoteMonthArchiveView(MonthArchiveView): - queryset = LuxNote.objects.all() - date_field = "pub_date" - allow_future = True - template_name = "archives/notes_date.html" - - -""" -Legacy Notes views -""" - - -def entry_detail(request, year, month, slug): - context = { - 'object': get_object_or_404(Note, slug__exact=slug), - } - return render_to_response( - 'details/note.html', - context, - context_instance=RequestContext(request) - ) - - -def date_list(request, year, month=None): - if month: - qs = Note.objects.filter(date_created__year=year, date_created__month=month).order_by('-date_created') - else: - qs = Note.objects.filter(date_created__year=year).order_by('-date_created') - context = { - 'year': year, - 'month': month, - 'object_list': qs, - } - return render_to_response( - "archives/notes_date.html", - context, - context_instance=RequestContext(request) - ) - - -def entry_list(request): - context = { - 'object_list': Note.objects.all().order_by('-date_created').select_related(), - } - return render_to_response("archives/notes.html", context, context_instance=RequestContext(request)) diff --git a/app/unused_apps/daily/admin.py b/app/unused_apps/daily/admin.py deleted file mode 100644 index 32a5747..0000000 --- a/app/unused_apps/daily/admin.py +++ /dev/null @@ -1,55 +0,0 @@ -from django.contrib import admin - -from utils.widgets import LGEntryForm, OLAdminBase -from .models import CheckIn, Daily, Weather - - -class WeatherAdmin(OLAdminBase): - pass - - -class CheckInAdmin(OLAdminBase): - list_display = ('date', 'location') - pass - - -class DailyAdmin(admin.ModelAdmin): - form = LGEntryForm - list_display = ('date', 'user', 'location') - list_filter = ( - 'date', - ('location', admin.RelatedOnlyFieldListFilter), - ) - fieldsets = ( - (None, { - 'fields': ( - 'user', - 'body_markdown', - 'weather_human', - ) - }), - ('Details', { - 'fields': ( - 'location', - 'weather', - 'date' - ), - 'classes': ('collapse',), - }), - ) - - def get_form(self, request, obj=None, **kwargs): - form = super(DailyAdmin, self).get_form(request, **kwargs) - form.current_user = request.user - return form - - def get_queryset(self, request): - qs = super(DailyAdmin, self).get_queryset(request) - if request.user.is_superuser: - return qs - return qs.filter(user=request.user) - - -admin.site.register(CheckIn, CheckInAdmin) -admin.site.register(Weather, WeatherAdmin) -admin.site.register(Daily, DailyAdmin) diff --git a/app/unused_apps/daily/create_daily.py b/app/unused_apps/daily/create_daily.py deleted file mode 100644 index 5441b77..0000000 --- a/app/unused_apps/daily/create_daily.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys -import os -from os.path import dirname, abspath -import django -PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/' -sys.path.append(PROJECT_ROOT) -sys.path.append(PROJECT_ROOT + '/app') -sys.path.append(PROJECT_ROOT + '/app/lib') -sys.path.append(PROJECT_ROOT + '/config') -sys.path.append(PROJECT_ROOT + '/venv/bin/python3') -os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings' -django.setup() -from daily import retriever -retriever.create_daily() diff --git a/app/unused_apps/daily/get_weather.py b/app/unused_apps/daily/get_weather.py deleted file mode 100644 index 6cd56af..0000000 --- a/app/unused_apps/daily/get_weather.py +++ /dev/null @@ -1,14 +0,0 @@ -import sys -import os -from os.path import dirname, abspath -import django -PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/' -sys.path.append(PROJECT_ROOT) -sys.path.append(PROJECT_ROOT + '/app') -sys.path.append(PROJECT_ROOT + '/app/lib') -sys.path.append(PROJECT_ROOT + '/config') -sys.path.append(PROJECT_ROOT + '/venv/bin/python3') -os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings' -django.setup() -from daily import retriever -retriever.get_yesterday_weather() diff --git a/app/unused_apps/daily/migrations/0001_initial.py b/app/unused_apps/daily/migrations/0001_initial.py deleted file mode 100644 index 70a9755..0000000 --- a/app/unused_apps/daily/migrations/0001_initial.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-18 20:38 -from __future__ import unicode_literals - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - #('locations', '__first__'), - ] - - operations = [ - migrations.CreateModel( - name='CheckIn', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, srid=4326)), - ('date', models.DateField(default=django.utils.timezone.now)), - ('location', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ], - ), - migrations.CreateModel( - name='Daily', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('slug', models.SlugField()), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('date', models.DateField(verbose_name='Date published')), - ('location', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ], - options={ - 'get_latest_by': 'date', - 'ordering': ('date',), - }, - ), - migrations.CreateModel( - name='Weather', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('date', models.DateField()), - ('temp_max', models.CharField(max_length=4)), - ('temp_min', models.CharField(max_length=4)), - ('temp_mean', models.CharField(max_length=4)), - ('wind_mean', models.CharField(max_length=10)), - ('wind_max', models.CharField(max_length=10)), - ('humidity', models.CharField(max_length=10)), - ('snow_amount', models.CharField(max_length=10)), - ('rain_amount', models.CharField(max_length=10)), - ('fog', models.NullBooleanField()), - ('rain', models.NullBooleanField()), - ('snow', models.NullBooleanField()), - ('hail', models.NullBooleanField()), - ('thunder', models.NullBooleanField()), - ], - ), - migrations.AddField( - model_name='daily', - name='weather', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='daily.Weather'), - ), - ] diff --git a/app/unused_apps/daily/migrations/0002_auto_20160118_2144.py b/app/unused_apps/daily/migrations/0002_auto_20160118_2144.py deleted file mode 100644 index 4769c21..0000000 --- a/app/unused_apps/daily/migrations/0002_auto_20160118_2144.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-18 21:44 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='checkin', - name='location', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location'), - ), - ] diff --git a/app/unused_apps/daily/migrations/0003_auto_20160119_1206.py b/app/unused_apps/daily/migrations/0003_auto_20160119_1206.py deleted file mode 100644 index d28c9ff..0000000 --- a/app/unused_apps/daily/migrations/0003_auto_20160119_1206.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-19 12:06 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0002_auto_20160118_2144'), - ] - - operations = [ - migrations.AlterModelOptions( - name='checkin', - options={'get_latest_by': 'date', 'ordering': ('-date',)}, - ), - migrations.AlterModelOptions( - name='weather', - options={'get_latest_by': 'date', 'ordering': ('-date',), 'verbose_name_plural': 'Weather'}, - ), - migrations.AlterField( - model_name='daily', - name='body_html', - field=models.TextField(blank=True, null=True), - ), - migrations.AlterField( - model_name='daily', - name='body_markdown', - field=models.TextField(blank=True, null=True), - ), - migrations.AlterField( - model_name='daily', - name='slug', - field=models.SlugField(blank=True, null=True), - ), - migrations.AlterField( - model_name='daily', - name='title', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AlterField( - model_name='daily', - name='weather', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='daily.Weather'), - ), - ] diff --git a/app/unused_apps/daily/migrations/0004_auto_20160119_1223.py b/app/unused_apps/daily/migrations/0004_auto_20160119_1223.py deleted file mode 100644 index 3c77deb..0000000 --- a/app/unused_apps/daily/migrations/0004_auto_20160119_1223.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-19 12:23 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0003_auto_20160119_1206'), - ] - - operations = [ - migrations.AlterField( - model_name='weather', - name='temp_max', - field=models.CharField(max_length=8), - ), - migrations.AlterField( - model_name='weather', - name='temp_mean', - field=models.CharField(max_length=8), - ), - migrations.AlterField( - model_name='weather', - name='temp_min', - field=models.CharField(max_length=8), - ), - ] diff --git a/app/unused_apps/daily/migrations/0005_remove_daily_slug.py b/app/unused_apps/daily/migrations/0005_remove_daily_slug.py deleted file mode 100644 index 8a896ba..0000000 --- a/app/unused_apps/daily/migrations/0005_remove_daily_slug.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-19 13:38 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0004_auto_20160119_1223'), - ] - - operations = [ - migrations.RemoveField( - model_name='daily', - name='slug', - ), - ] diff --git a/app/unused_apps/daily/migrations/0006_daily_weather_human.py b/app/unused_apps/daily/migrations/0006_daily_weather_human.py deleted file mode 100644 index 7f701b4..0000000 --- a/app/unused_apps/daily/migrations/0006_daily_weather_human.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-19 13:45 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0005_remove_daily_slug'), - ] - - operations = [ - migrations.AddField( - model_name='daily', - name='weather_human', - field=models.TextField(blank=True, null=True), - ), - ] diff --git a/app/unused_apps/daily/migrations/0007_auto_20160119_1604.py b/app/unused_apps/daily/migrations/0007_auto_20160119_1604.py deleted file mode 100644 index 1acd5de..0000000 --- a/app/unused_apps/daily/migrations/0007_auto_20160119_1604.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-19 16:04 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0006_daily_weather_human'), - ] - - operations = [ - migrations.AlterField( - model_name='daily', - name='location', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location'), - ), - ] diff --git a/app/unused_apps/daily/migrations/0008_auto_20160124_0914.py b/app/unused_apps/daily/migrations/0008_auto_20160124_0914.py deleted file mode 100644 index eff3604..0000000 --- a/app/unused_apps/daily/migrations/0008_auto_20160124_0914.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-24 09:14 -from __future__ import unicode_literals - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -from django.contrib.auth.models import User -lux = User.objects.get(username="luxagraf") - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('daily', '0007_auto_20160119_1604'), - ] - - operations = [ - migrations.AddField( - model_name='daily', - name='user', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - migrations.AlterField( - model_name='daily', - name='date', - field=models.DateField(), - ), - ] diff --git a/app/unused_apps/daily/migrations/0009_remove_daily_title.py b/app/unused_apps/daily/migrations/0009_remove_daily_title.py deleted file mode 100644 index 085adf3..0000000 --- a/app/unused_apps/daily/migrations/0009_remove_daily_title.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-01-24 16:27 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0008_auto_20160124_0914'), - ] - - operations = [ - migrations.RemoveField( - model_name='daily', - name='title', - ), - ] diff --git a/app/unused_apps/daily/migrations/0010_auto_20161023_2014.py b/app/unused_apps/daily/migrations/0010_auto_20161023_2014.py deleted file mode 100644 index 72a68cf..0000000 --- a/app/unused_apps/daily/migrations/0010_auto_20161023_2014.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-23 20:14 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0009_remove_daily_title'), - ] - - operations = [ - migrations.AlterModelOptions( - name='daily', - options={'get_latest_by': 'date', 'ordering': ('-date',)}, - ), - ] diff --git a/app/unused_apps/daily/migrations/0011_auto_20171214_2239.py b/app/unused_apps/daily/migrations/0011_auto_20171214_2239.py deleted file mode 100644 index 2cf9207..0000000 --- a/app/unused_apps/daily/migrations/0011_auto_20171214_2239.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.5 on 2017-12-14 22:39 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('daily', '0010_auto_20161023_2014'), - ] - - operations = [ - migrations.AlterField( - model_name='checkin', - name='location', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='adsjf', to='locations.Location'), - ), - ] diff --git a/app/unused_apps/daily/migrations/__init__.py b/app/unused_apps/daily/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/daily/models.py b/app/unused_apps/daily/models.py deleted file mode 100644 index bd5f018..0000000 --- a/app/unused_apps/daily/models.py +++ /dev/null @@ -1,105 +0,0 @@ -from django.contrib.gis.db import models -from django.conf import settings -from django import forms -from django.utils import timezone - -from locations.models import Location - -from utils.widgets import markdown_to_html - - -class CheckIn(models.Model): - point = models.PointField(blank=True) - location = models.ForeignKey(Location, blank=True, null=True, related_name='adsjf') - date = models.DateField(default=timezone.now) - - class Meta: - ordering = ('-date',) - get_latest_by = 'date' - - def __str__(self): - return str(self.date) - - @property - def lon(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def lat(self): - '''Get the site's latitude.''' - return self.point.y - - def save(self): - try: - self.location = Location.objects.filter(geometry__contains=self.point).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - super(CheckIn, self).save() - - -class Weather(models.Model): - point = models.PointField(null=True, blank=True) - date = models.DateField() - temp_max = models.CharField(max_length=8) - temp_min = models.CharField(max_length=8) - temp_mean = models.CharField(max_length=8) - wind_mean = models.CharField(max_length=10) - wind_max = models.CharField(max_length=10) - humidity = models.CharField(max_length=10) - snow_amount = models.CharField(max_length=10) - rain_amount = models.CharField(max_length=10) - fog = models.NullBooleanField() - rain = models.NullBooleanField() - snow = models.NullBooleanField() - hail = models.NullBooleanField() - thunder = models.NullBooleanField() - - class Meta: - ordering = ('-date',) - get_latest_by = 'date' - verbose_name_plural = "Weather" - - def __str__(self): - return str(self.date) - - -class Daily(models.Model): - user = models.ForeignKey(settings.AUTH_USER_MODEL) - location = models.ForeignKey(Location, blank=True, null=True) - weather = models.ForeignKey(Weather, blank=True, null=True) - weather_human = models.TextField(blank=True, null=True) - body_html = models.TextField(blank=True, null=True) - body_markdown = models.TextField(blank=True, null=True) - date = models.DateField() - - class Meta: - ordering = ('-date',) - get_latest_by = 'date' - - def __str__(self): - return str(self.date) - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - def save(self, **kwargs): - if self.body_markdown: - self.body_html = markdown_to_html(self.body_markdown) - self.location = CheckIn.objects.latest().location - super(Daily, self).save() diff --git a/app/unused_apps/daily/retriever.py b/app/unused_apps/daily/retriever.py deleted file mode 100644 index 3b7da87..0000000 --- a/app/unused_apps/daily/retriever.py +++ /dev/null @@ -1,53 +0,0 @@ -from datetime import datetime -import requests -import json - -from django.utils import timezone -from django.template.loader import render_to_string -from django.contrib.auth.models import User -from django.db.models import Q - -from .models import CheckIn, Daily, Weather - - -def create_daily(): - users = User.objects.filter(Q(username="luxagraf") | Q(username="corrinne")) - for user in users: - d, created = Daily.objects.get_or_create( - user=user, - date=timezone.now() - ) - if not created: - print("already existed") - - -def get_yesterday_weather(): - current = CheckIn.objects.latest() - PB_URL = "http://api.wunderground.com/api/39c3ce6a12b14e75/yesterday/q/%s,%s.json" % (current.lat, current.lon) - r = requests.get(PB_URL) - weather = json.loads(r.text) - data = weather['history']['dailysummary'][0] - date = "%s %s %s" % (data['date']['year'], data['date']['mon'], data['date']['mday']) - dt = datetime.strptime(date, "%Y %m %d") - w, created = Weather.objects.get_or_create( - point=current.point, - date=dt, - temp_max=data['maxtempi'], - temp_min=data['mintempi'], - temp_mean=data['meantempi'], - wind_mean=data['meanwindspdi'], - wind_max=data['maxwspdi'], - humidity=data['humidity'], - snow_amount=data['snowfalli'], - rain_amount=data['precipi'], - fog=int(data['fog']), - rain=int(data['rain']), - snow=int(data['snow']), - hail=int(data['hail']), - thunder=int(data['thunder']), - ) - dailies = Daily.objects.filter(date=dt) - for d in dailies: - d.weather = w - d.weather_human = render_to_string('human_weather.txt', {'object': w}).strip() - d.save() diff --git a/app/unused_apps/ebay/__init__.py b/app/unused_apps/ebay/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/ebay/admin.py b/app/unused_apps/ebay/admin.py deleted file mode 100644 index 93bf87f..0000000 --- a/app/unused_apps/ebay/admin.py +++ /dev/null @@ -1,15 +0,0 @@ -from django.contrib import admin - -from .models import Item, Price, TrackedItem - - -@admin.register(Item) -class ItemAdmin(admin.ModelAdmin): - list_display = ('name', 'currently_own', 'purchase_price') - - -@admin.register(TrackedItem) -class TrackedItemAdmin(admin.ModelAdmin): - list_display = ('title', 'admin_link', 'date_ending', 'get_latest_price', 'amount_desired' ) - list_filter = ('amount_desired',) - diff --git a/app/unused_apps/ebay/migrations/0001_initial.py b/app/unused_apps/ebay/migrations/0001_initial.py deleted file mode 100644 index 3d2d34e..0000000 --- a/app/unused_apps/ebay/migrations/0001_initial.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-31 11:43 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Item', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('url', models.CharField(max_length=200)), - ('title', models.CharField(max_length=200)), - ('purchase_price', models.IntegerField()), - ('currently_own', models.BooleanField(default=False)), - ('sold', models.BooleanField(default=False)), - ('sale_price', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='Price', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateTimeField()), - ('price', models.IntegerField()), - ], - ), - migrations.CreateModel( - name='TrackedItem', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('url', models.CharField(max_length=200)), - ('title', models.CharField(max_length=200)), - ], - ), - migrations.AddField( - model_name='price', - name='item', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ebay.TrackedItem'), - ), - ] diff --git a/app/unused_apps/ebay/migrations/0002_auto_20161231_1401.py b/app/unused_apps/ebay/migrations/0002_auto_20161231_1401.py deleted file mode 100644 index 46f5a12..0000000 --- a/app/unused_apps/ebay/migrations/0002_auto_20161231_1401.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-31 14:01 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ebay', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='price', - name='date', - field=models.DateTimeField(blank=True), - ), - migrations.AlterField( - model_name='price', - name='price', - field=models.DecimalField(decimal_places=2, max_digits=6), - ), - ] diff --git a/app/unused_apps/ebay/migrations/0003_auto_20161231_1419.py b/app/unused_apps/ebay/migrations/0003_auto_20161231_1419.py deleted file mode 100644 index 1f05859..0000000 --- a/app/unused_apps/ebay/migrations/0003_auto_20161231_1419.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-31 14:19 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('ebay', '0002_auto_20161231_1401'), - ] - - operations = [ - migrations.AlterModelOptions( - name='price', - options={'get_latest_by': 'date', 'ordering': ('-date',)}, - ), - migrations.RenameField( - model_name='item', - old_name='title', - new_name='name', - ), - ] diff --git a/app/unused_apps/ebay/migrations/0004_trackeditem_date_ending.py b/app/unused_apps/ebay/migrations/0004_trackeditem_date_ending.py deleted file mode 100644 index 15f41e7..0000000 --- a/app/unused_apps/ebay/migrations/0004_trackeditem_date_ending.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-31 14:26 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('ebay', '0003_auto_20161231_1419'), - ] - - operations = [ - migrations.AddField( - model_name='trackeditem', - name='date_ending', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - ] diff --git a/app/unused_apps/ebay/migrations/0005_auto_20161231_1444.py b/app/unused_apps/ebay/migrations/0005_auto_20161231_1444.py deleted file mode 100644 index a7a48ac..0000000 --- a/app/unused_apps/ebay/migrations/0005_auto_20161231_1444.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-31 14:44 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ebay', '0004_trackeditem_date_ending'), - ] - - operations = [ - migrations.AlterModelOptions( - name='trackeditem', - options={'get_latest_by': 'date_ending', 'ordering': ('-date_ending', 'amount_desired')}, - ), - migrations.AddField( - model_name='trackeditem', - name='amount_desired', - field=models.IntegerField(choices=[(0, '1'), (1, '2'), (2, '3'), (3, '4'), (4, '5')], default=0), - ), - ] diff --git a/app/unused_apps/ebay/migrations/__init__.py b/app/unused_apps/ebay/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/ebay/models.py b/app/unused_apps/ebay/models.py deleted file mode 100644 index 089e0e4..0000000 --- a/app/unused_apps/ebay/models.py +++ /dev/null @@ -1,84 +0,0 @@ -import datetime -import re -from django.utils.encoding import force_text -from django.contrib.gis.db import models -from django.utils import timezone -from bs4 import BeautifulSoup -import requests - -class Item(models.Model): - name = models.CharField(max_length=200) - purchase_price = models.IntegerField() - url = models.CharField(max_length=200) - currently_own = models.BooleanField(blank=True, default=False) - sold = models.BooleanField(blank=True, default=False) - sale_price = models.IntegerField() - - def save(self, **kwargs): - super(Item, self).save() - - def __str__(self): - return self.name - - -class TrackedItem(models.Model): - title = models.CharField(max_length=200) - url = models.CharField(max_length=200) - DESIRE = ( - (0, '1'), - (1, '2'), - (2, '3'), - (3, '4'), - (4, '5'), - ) - amount_desired = models.IntegerField(choices=DESIRE, default=0) - date_ending = models.DateTimeField(default=timezone.now) - - class Meta: - ordering = ('date_ending', 'amount_desired') - get_latest_by = 'date_ending' - - @property - def get_latest_price(self): - return self.price_set.latest().price - - def admin_link(self): - return force_text('View Auction page' % (self.url)) - admin_link.allow_tags = True - admin_link.short_description = 'Link' - - def __str__(self): - return self.title - - def save(self, **kwargs): - super(TrackedItem, self).save() - - -class Price(models.Model): - date = models.DateTimeField(blank=True) - price = models.DecimalField(max_digits=6, decimal_places=2) - item = models.ForeignKey(TrackedItem) - - class Meta: - ordering = ('-date',) - get_latest_by = 'date' - - def __str__(self): - return str(self.date) - - def save(self, **kwargs): - if not self.pk: - self.date = datetime.datetime.now() - super(Price, self).save() - - -def update_tracked_item_price(item): - r = requests.get(item.url) - soup = BeautifulSoup(r.text, "lxml") - numbers = re.compile('\d+(?:\.\d+)?') - price = soup.find(itemprop="price").get_text() - price = numbers.findall(price)[0] - l, created = Price.objects.get_or_create( - price=price, - item=item - ) diff --git a/app/unused_apps/ebay/update_price.py b/app/unused_apps/ebay/update_price.py deleted file mode 100755 index b8b4c8c..0000000 --- a/app/unused_apps/ebay/update_price.py +++ /dev/null @@ -1,17 +0,0 @@ -import sys -import os -from os.path import dirname, abspath -import django -PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/' -sys.path.append(PROJECT_ROOT) -sys.path.append(PROJECT_ROOT + '/app') -sys.path.append(PROJECT_ROOT + '/app/lib') -sys.path.append(PROJECT_ROOT + '/config') -sys.path.append(PROJECT_ROOT + '/venv/bin/python3') -os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings' -django.setup() -import datetime -from ebay.models import TrackedItem, update_tracked_item_price -items = TrackedItem.objects.filter(date_ending__gte=datetime.datetime.now()) -for item in items: - update_tracked_item_price(item) diff --git a/app/unused_apps/essays/__init__.py b/app/unused_apps/essays/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/essays/admin.py b/app/unused_apps/essays/admin.py deleted file mode 100644 index ed39ca3..0000000 --- a/app/unused_apps/essays/admin.py +++ /dev/null @@ -1,47 +0,0 @@ -from django.contrib import admin - -from utils.widgets import LGEntryForm - -from .models import Essay - - -@admin.register(Essay) -class EssayAdmin(admin.ModelAdmin): - form = LGEntryForm - list_display = ('title', 'pub_date', 'enable_comments', 'status') - list_filter = ('pub_date', 'enable_comments', 'status') - prepopulated_fields = {"slug": ('title',)} - fieldsets = ( - ('Entry', { - 'fields': ( - 'title', - 'sub_title', - 'body_markdown', - ('pub_date', 'status'), - 'meta_description', - ('slug', 'enable_comments', 'has_code'), - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - }), - ('meta', { - 'fields': ( - 'originally_published_by', - 'originally_published_by_url', - 'afterword', - 'preamble', - ('field_notes', 'books'), - ), - 'classes': ( - 'hide', - 'extrapretty', - 'wide' - ) - }), - ) - - class Media: - js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/unused_apps/essays/build.py b/app/unused_apps/essays/build.py deleted file mode 100644 index 392e991..0000000 --- a/app/unused_apps/essays/build.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -from builder.base import BuildNew -from django.urls import reverse -from . import models - - -class BuildEssays(BuildNew): - - def build(self): - self.build_list_view() - self.build_detail_view() - # These are the unique classes for this model: - #self.build_feed("src:feed") - - def build_list_view(self): - response = self.client.get('/essays/') - self.write_file('essays/', response.content) - - -def essaybuilder(): - j = BuildEssays("essays", "essay") - j.build() diff --git a/app/unused_apps/essays/migrations/0001_initial.py b/app/unused_apps/essays/migrations/0001_initial.py deleted file mode 100644 index 7b7ea62..0000000 --- a/app/unused_apps/essays/migrations/0001_initial.py +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-04 14:08 - -from django.db import migrations, models -import django.db.models.deletion -import taggit.managers - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ('books', '0007_auto_20190131_2351'), - ('taxonomy', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Essay', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('sub_title', models.CharField(blank=True, max_length=200)), - ('dek', models.TextField(blank=True)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('last_updated', models.DateTimeField(auto_now=True)), - ('enable_comments', models.BooleanField(default=False)), - ('has_code', models.BooleanField(default=False)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('post_type', models.IntegerField(choices=[(0, 'essay'), (1, 'tools'), (2, 'figment')], default=0)), - ('elsewhere', models.CharField(blank=True, max_length=400)), - ('has_video', models.BooleanField(blank=True, default=False)), - ('afterword', models.TextField(blank=True)), - ('books', models.ManyToManyField(blank=True, to='books.Book')), - ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.LuxImage')), - ('tags', taggit.managers.TaggableManager(blank=True, help_text='Topics Covered', through='taxonomy.TaggedItems', to='taxonomy.LuxTag', verbose_name='Tags')), - ], - options={ - 'verbose_name_plural': 'Essays', - 'ordering': ('-pub_date',), - 'get_latest_by': 'pub_date', - }, - ), - ] diff --git a/app/unused_apps/essays/migrations/0002_auto_20190204_1541.py b/app/unused_apps/essays/migrations/0002_auto_20190204_1541.py deleted file mode 100644 index f4e6744..0000000 --- a/app/unused_apps/essays/migrations/0002_auto_20190204_1541.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-04 15:41 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0001_initial'), - ] - - operations = [ - migrations.RenameField( - model_name='essay', - old_name='elsewhere', - new_name='originally_published_by', - ), - migrations.AddField( - model_name='essay', - name='originally_published_by_url', - field=models.CharField(blank=True, max_length=400), - ), - ] diff --git a/app/unused_apps/essays/migrations/0003_essay_afterword_html.py b/app/unused_apps/essays/migrations/0003_essay_afterword_html.py deleted file mode 100644 index 5f8301b..0000000 --- a/app/unused_apps/essays/migrations/0003_essay_afterword_html.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-04 16:11 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0002_auto_20190204_1541'), - ] - - operations = [ - migrations.AddField( - model_name='essay', - name='afterword_html', - field=models.TextField(blank=True), - ), - ] diff --git a/app/unused_apps/essays/migrations/0004_auto_20190205_0830.py b/app/unused_apps/essays/migrations/0004_auto_20190205_0830.py deleted file mode 100644 index 65e2e5d..0000000 --- a/app/unused_apps/essays/migrations/0004_auto_20190205_0830.py +++ /dev/null @@ -1,27 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-05 08:30 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0003_essay_afterword_html'), - ] - - operations = [ - migrations.CreateModel( - name='PostType', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('dek', models.TextField(blank=True)), - ('slug', models.SlugField()), - ], - ), - migrations.AlterField( - model_name='essay', - name='post_type', - field=models.IntegerField(choices=[(0, 'essays'), (1, 'tools'), (2, 'figments')], default=0), - ), - ] diff --git a/app/unused_apps/essays/migrations/0005_auto_20190208_0946.py b/app/unused_apps/essays/migrations/0005_auto_20190208_0946.py deleted file mode 100644 index 5b68bb4..0000000 --- a/app/unused_apps/essays/migrations/0005_auto_20190208_0946.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-08 09:46 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0004_auto_20190205_0830'), - ] - - operations = [ - migrations.DeleteModel( - name='PostType', - ), - migrations.RemoveField( - model_name='essay', - name='post_type', - ), - migrations.AddField( - model_name='essay', - name='preamble', - field=models.TextField(blank=True), - ), - ] diff --git a/app/unused_apps/essays/migrations/0006_auto_20190303_1625.py b/app/unused_apps/essays/migrations/0006_auto_20190303_1625.py deleted file mode 100644 index dde70fd..0000000 --- a/app/unused_apps/essays/migrations/0006_auto_20190303_1625.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 16:25 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0005_auto_20190208_0946'), - ] - - operations = [ - migrations.AlterField( - model_name='essay', - name='field_notes', - field=models.ManyToManyField(blank=True, to='fieldnotes.FieldNote'), - ), - ] diff --git a/app/unused_apps/essays/migrations/0006_remove_essay_has_video.py b/app/unused_apps/essays/migrations/0006_remove_essay_has_video.py deleted file mode 100644 index 0842d8b..0000000 --- a/app/unused_apps/essays/migrations/0006_remove_essay_has_video.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.2 on 2019-02-27 21:22 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0005_auto_20190208_0946'), - ] - - operations = [ - migrations.RemoveField( - model_name='essay', - name='has_video', - ), - ] diff --git a/app/unused_apps/essays/migrations/0007_auto_20190414_1455.py b/app/unused_apps/essays/migrations/0007_auto_20190414_1455.py deleted file mode 100644 index a5242cb..0000000 --- a/app/unused_apps/essays/migrations/0007_auto_20190414_1455.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-04-14 14:55 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0006_auto_20190303_1625'), - ] - - operations = [ - migrations.AddField( - model_name='essay', - name='preamble_html', - field=models.TextField(blank=True), - ), - ] diff --git a/app/unused_apps/essays/migrations/0007_essay_has_video.py b/app/unused_apps/essays/migrations/0007_essay_has_video.py deleted file mode 100644 index 0057e95..0000000 --- a/app/unused_apps/essays/migrations/0007_essay_has_video.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.2 on 2019-02-27 21:22 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0006_remove_essay_has_video'), - ] - - operations = [ - migrations.AddField( - model_name='essay', - name='has_video', - field=models.BooleanField(blank=True, default=False), - ), - ] diff --git a/app/unused_apps/essays/migrations/0008_merge_20190303_1638.py b/app/unused_apps/essays/migrations/0008_merge_20190303_1638.py deleted file mode 100644 index 7c155d8..0000000 --- a/app/unused_apps/essays/migrations/0008_merge_20190303_1638.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 2.1.2 on 2019-03-03 16:38 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0007_essay_has_video'), - ('essays', '0006_auto_20190303_1625'), - ] - - operations = [ - ] diff --git a/app/unused_apps/essays/migrations/0009_merge_20190414_1500.py b/app/unused_apps/essays/migrations/0009_merge_20190414_1500.py deleted file mode 100644 index 83a8323..0000000 --- a/app/unused_apps/essays/migrations/0009_merge_20190414_1500.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 2.1.2 on 2019-04-14 15:00 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('essays', '0008_merge_20190303_1638'), - ('essays', '0007_auto_20190414_1455'), - ] - - operations = [ - ] diff --git a/app/unused_apps/essays/migrations/0010_essay_field_notes.py b/app/unused_apps/essays/migrations/0010_essay_field_notes.py deleted file mode 100644 index ca15b38..0000000 --- a/app/unused_apps/essays/migrations/0010_essay_field_notes.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.1.7 on 2019-07-04 09:03 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('fieldnotes', '0002_auto_20190303_1222'), - ('essays', '0009_merge_20190414_1500'), - ] - - operations = [ - migrations.AddField( - model_name='essay', - name='field_notes', - field=models.ManyToManyField(blank=True, to='fieldnotes.FieldNote'), - ), - ] diff --git a/app/unused_apps/essays/migrations/__init__.py b/app/unused_apps/essays/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/essays/models.py b/app/unused_apps/essays/models.py deleted file mode 100644 index c75f72d..0000000 --- a/app/unused_apps/essays/models.py +++ /dev/null @@ -1,91 +0,0 @@ -from django.db import models -from django.urls import reverse -from django.contrib.sitemaps import Sitemap -import datetime -from itertools import chain - -from taggit.managers import TaggableManager - -from taxonomy.models import TaggedItems -from utils.util import render_images, markdown_to_html -from fieldnotes.models import FieldNote -from books.models import Book -from photos.models import LuxImage - - -POST_TYPE = ( - (0, 'essays'), - (1, 'tools'), - (2, 'figments'), -) - - -class Essay(models.Model): - title = models.CharField(max_length=200) - sub_title = models.CharField(max_length=200, blank=True) - dek = models.TextField(blank=True) - preamble = models.TextField(blank=True) - preamble_html = models.TextField(blank=True) - slug = models.SlugField(unique_for_date='pub_date') - body_html = models.TextField(blank=True) - body_markdown = models.TextField() - pub_date = models.DateTimeField('Date published') - last_updated = models.DateTimeField(auto_now=True) - enable_comments = models.BooleanField(default=False) - has_code = models.BooleanField(default=False) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - meta_description = models.CharField(max_length=256, null=True, blank=True) - tags = TaggableManager(through=TaggedItems, blank=True, help_text='Topics Covered') - originally_published_by = models.CharField(max_length=400, blank=True) - originally_published_by_url = models.CharField(max_length=400, blank=True) - featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) - has_video = models.BooleanField(blank=True, default=False) - field_notes = models.ManyToManyField(FieldNote, blank=True) - books = models.ManyToManyField(Book, blank=True) - afterword = models.TextField(blank=True) - afterword_html = models.TextField(blank=True) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - verbose_name_plural = 'Essays' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse('essays:detail', kwargs={"slug": self.slug}) - - def comment_period_open(self): - return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - def save(self): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - self.afterword_html = markdown_to_html(self.afterword) - self.preamble_html = markdown_to_html(self.preamble) - super(Essay, self).save() - - -class EssaySitemap(Sitemap): - changefreq = "never" - priority = 1.0 - protocol = "https" - - def items(self): - return Essay.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/essays/urls.py b/app/unused_apps/essays/urls.py deleted file mode 100644 index 8216f06..0000000 --- a/app/unused_apps/essays/urls.py +++ /dev/null @@ -1,28 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "essays" - -urlpatterns = [ - #path( - # r'topic/', - # views.TopicListView.as_view(), - # name="list_topics" - #), - path( - r'', - views.EntryDetailView.as_view(), - name="detail" - ), - path( - r'', - views.EntryDetailViewTXT.as_view(), - name="detail-txt" - ), - path( - r'', - views.EssayListView.as_view(), - name="list", - ), -] diff --git a/app/unused_apps/essays/views.py b/app/unused_apps/essays/views.py deleted file mode 100644 index f8c68c7..0000000 --- a/app/unused_apps/essays/views.py +++ /dev/null @@ -1,47 +0,0 @@ -from django.views.generic import ListView -from django.views.generic.detail import DetailView -from django.contrib.syndication.views import Feed - - -from .models import Essay - - -class EssayListView(ListView): - model = Essay - - def get_queryset(self, **kwargs): - qs = Essay.objects.filter(status=1) - return qs - - -class EntryDetailView(DetailView): - model = Essay - - -class EntryDetailViewTXT(EntryDetailView): - template_name = "essays/entry_detail.txt" - - -''' -class TopicListView(ListView): - template_name = 'archives/src_home.html' - - def queryset(self): - return Post.objects.filter(topics__slug=self.kwargs['slug']) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(TopicListView, self).get_context_data(**kwargs) - context['topic'] = Topic.objects.get(slug__exact=self.kwargs['slug']) - return context - - -class SrcRSSFeedView(Feed): - title = "luxagraf:src Code and Technology" - link = "/src/" - description = "Latest postings to luxagraf.net/src" - description_template = 'feeds/blog_description.html' - - def items(self): - return Post.objects.filter(status__exact=1).order_by('-pub_date')[:10] -''' diff --git a/app/unused_apps/expenses/__init__.py b/app/unused_apps/expenses/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/expenses/admin.py b/app/unused_apps/expenses/admin.py deleted file mode 100644 index a754883..0000000 --- a/app/unused_apps/expenses/admin.py +++ /dev/null @@ -1,25 +0,0 @@ -from django.contrib import admin - -from .models import LuxExpense, Trip, Expense, Month - - -@admin.register(Trip) -class TripAdmin(admin.ModelAdmin): - list_display = ('name', 'start') - - -@admin.register(Expense) -class ExpenseAdmin(admin.ModelAdmin): - list_display = ('name', 'category', 'amount', 'date_month') - list_filter = ('date', 'category') - - -@admin.register(LuxExpense) -class LuxExpenseAdmin(admin.ModelAdmin): - list_display = ('category', 'amount', 'month') - list_filter = ('month', 'category') - - -@admin.register(Month) -class MonthAdmin(admin.ModelAdmin): - pass diff --git a/app/unused_apps/expenses/build.py b/app/unused_apps/expenses/build.py deleted file mode 100644 index 7241a70..0000000 --- a/app/unused_apps/expenses/build.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -from django.core.urlresolvers import reverse -from builder.base import BuildNew - - -class BuildExpenses(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("expenses:list_trip"), - paginate_by=24 - ) - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildExpenses("expenses", "trip") - j.build() diff --git a/app/unused_apps/expenses/migrations/0001_initial.py b/app/unused_apps/expenses/migrations/0001_initial.py deleted file mode 100644 index 5ff70cd..0000000 --- a/app/unused_apps/expenses/migrations/0001_initial.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-04-28 22:47 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Expense', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('amount', models.DecimalField(decimal_places=2, max_digits=8)), - ('date', models.DateTimeField(default=django.utils.timezone.now)), - ('notes', models.TextField(blank=True, null=True)), - ('category', models.CharField(choices=[('1', 'Groceries'), ('2', 'Restaurants'), ('3', 'Camping'), ('4', 'Petrol'), ('5', 'Bus'), ('6', 'Misc')], default=1, max_length=2)), - ], - options={ - 'ordering': ('-date',), - }, - ), - migrations.CreateModel( - name='Trip', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('slug', models.SlugField()), - ('start', models.DateTimeField(blank=True, default=django.utils.timezone.now, null=True)), - ('end', models.DateTimeField(blank=True, default=django.utils.timezone.now, null=True)), - ('dek', models.TextField(blank=True, null=True)), - ], - ), - migrations.AddField( - model_name='expense', - name='trip', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='expenses.Trip'), - ), - ] diff --git a/app/unused_apps/expenses/migrations/0002_luxexpense.py b/app/unused_apps/expenses/migrations/0002_luxexpense.py deleted file mode 100644 index 9edfdb4..0000000 --- a/app/unused_apps/expenses/migrations/0002_luxexpense.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-04-28 22:48 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('expenses', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='LuxExpense', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('category', models.CharField(choices=[('1', 'Groceries'), ('2', 'Restaurants'), ('3', 'Camping'), ('4', 'Petrol'), ('5', 'Bus'), ('6', 'Misc')], default=1, max_length=2)), - ('amount', models.DecimalField(decimal_places=2, max_digits=8)), - ('date', models.DateTimeField(default=django.utils.timezone.now)), - ('notes', models.TextField(blank=True, null=True)), - ], - ), - ] diff --git a/app/unused_apps/expenses/migrations/0003_auto_20170429_0748.py b/app/unused_apps/expenses/migrations/0003_auto_20170429_0748.py deleted file mode 100644 index 69f14ec..0000000 --- a/app/unused_apps/expenses/migrations/0003_auto_20170429_0748.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2017-04-29 07:48 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('expenses', '0002_luxexpense'), - ] - - operations = [ - migrations.CreateModel( - name='Month', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('year', models.IntegerField()), - ('date', models.DateTimeField(default=django.utils.timezone.now)), - ('notes', models.TextField(blank=True, null=True)), - ], - ), - migrations.RemoveField( - model_name='luxexpense', - name='date', - ), - migrations.RemoveField( - model_name='luxexpense', - name='notes', - ), - migrations.AddField( - model_name='luxexpense', - name='month', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='expenses.Month'), - ), - ] diff --git a/app/unused_apps/expenses/migrations/__init__.py b/app/unused_apps/expenses/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/expenses/models.py b/app/unused_apps/expenses/models.py deleted file mode 100644 index fbcdd7a..0000000 --- a/app/unused_apps/expenses/models.py +++ /dev/null @@ -1,62 +0,0 @@ -from django.db import models -from django.urls import reverse -from django.utils import timezone - -CATS = ( - ('1', "Groceries"), - ('2', "Restaurants"), - ('3', "Camping"), - ('4', "Petrol"), - ('5', "Bus"), - ('6', "Misc"), -) - - -class Trip(models.Model): - name = models.CharField(max_length=200) - slug = models.SlugField() - start = models.DateTimeField(default=timezone.now, blank=True, null=True) - end = models.DateTimeField(default=timezone.now, blank=True, null=True) - dek = models.TextField(null=True, blank=True) - - def __str__(self): - return self.name - - def get_absolute_url(self): - return reverse("expenses:list_expense", kwargs={"slug": self.slug}) - -class Month(models.Model): - name = models.CharField(max_length=200) - year = models.IntegerField() - date = models.DateTimeField(default=timezone.now) - notes = models.TextField(null=True, blank=True) - - def __str__(self): - return "%s %s" %(self.name, self.year) - -class LuxExpense(models.Model): - category = models.CharField(max_length=2, choices=CATS, default=1) - amount = models.DecimalField(max_digits=8, decimal_places=2) - month = models.ForeignKey(Month, on_delete=models.CASCADE, null=True) - - def __str__(self): - return '%s-%s' %(self.month, self.get_category_display()) - - - -class Expense(models.Model): - name = models.CharField(max_length=200) - amount = models.DecimalField(max_digits=8, decimal_places=2) - date = models.DateTimeField(default=timezone.now) - notes = models.TextField(null=True, blank=True) - category = models.CharField(max_length=2, choices=CATS, default=1) - trip = models.ForeignKey(Trip, on_delete=models.CASCADE, null=True) - - class Meta: - ordering = ('-date',) - - def __str__(self): - return self.name - - def date_month(self): - return self.date.strftime("%b %Y") diff --git a/app/unused_apps/expenses/urls.py b/app/unused_apps/expenses/urls.py deleted file mode 100644 index 6ad732e..0000000 --- a/app/unused_apps/expenses/urls.py +++ /dev/null @@ -1,22 +0,0 @@ -from django.conf.urls import url -from . import views - -app_name = "expenses" - -urlpatterns = [ - #url( - # r'(?P[-\w]+)$', - # views.ExpenseListView.as_view(), - # name='list_expense' - #), - url( - r'(?P[-\w]+)$', - views.LuxExpenseListView.as_view(), - name='list_expense' - ), - url( - r'^$', - views.TripListView.as_view(), - name='list_trip' - ) -] diff --git a/app/unused_apps/expenses/views.py b/app/unused_apps/expenses/views.py deleted file mode 100644 index 98a4c70..0000000 --- a/app/unused_apps/expenses/views.py +++ /dev/null @@ -1,38 +0,0 @@ -from django.views.generic import ListView - -from .models import LuxExpense, Expense, Trip, CATS - -class ExpenseListView(ListView): - model = Expense - context_object_name = 'object_list' - template_name = 'details/expenses.html' - - def get_queryset(self): - return Expense.objects.filter( - trip__slug=self.kwargs['slug'] - ) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(ExpenseListView, self).get_context_data(**kwargs) - context['categories'] = CATS - return context - -class LuxExpenseListView(ListView): - model = LuxExpense - context_object_name = 'object_list' - template_name = 'details/expenses.html' - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(LuxExpenseListView, self).get_context_data(**kwargs) - context['categories'] = CATS - return context - -class TripListView(ListView): - model = Trip - context_object_name = 'object_list' - template_name = 'archives/expenses.html' - - def get_queryset(self): - return Trip.objects.all() diff --git a/app/unused_apps/fieldnotes/__init__.py b/app/unused_apps/fieldnotes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/fieldnotes/admin.py b/app/unused_apps/fieldnotes/admin.py deleted file mode 100644 index 838063d..0000000 --- a/app/unused_apps/fieldnotes/admin.py +++ /dev/null @@ -1,38 +0,0 @@ -from django.contrib import admin -from django.contrib.contenttypes.admin import GenericTabularInline - -from .models import FieldNote -from utils.widgets import LGEntryForm, OLAdminBase -from utils.util import get_latlon - - -@admin.register(FieldNote) -class NoteAdmin(OLAdminBase): - form = LGEntryForm - prepopulated_fields = {"slug": ('title',)} - list_display = ('title', 'slug', 'pub_date', 'location') - fieldsets = ( - ('Note', { - 'fields': ( - ('title', 'note_type'), - 'subtitle', - 'body_markdown', - 'slug', - ('pub_date', 'status'), - 'point' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 10 - - class Media: - js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/unused_apps/fieldnotes/build.py b/app/unused_apps/fieldnotes/build.py deleted file mode 100644 index 4c5c83b..0000000 --- a/app/unused_apps/fieldnotes/build.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - - -class BuildNotes(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("fieldnotes:list"), - paginate_by=24 - ) - self.build_year_view("fieldnotes:list_year") - self.build_month_view("fieldnotes:list_month") - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildNotes("fieldnotes", "fieldnote") - j.build() diff --git a/app/unused_apps/fieldnotes/migrations/0001_initial.py b/app/unused_apps/fieldnotes/migrations/0001_initial.py deleted file mode 100644 index cec67fb..0000000 --- a/app/unused_apps/fieldnotes/migrations/0001_initial.py +++ /dev/null @@ -1,37 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 12:13 - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('locations', '0017_auto_20190217_1849'), - ] - - operations = [ - migrations.CreateModel( - name='FieldNote', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(blank=True, max_length=250)), - ('subtitle', models.CharField(blank=True, max_length=250)), - ('slug', models.SlugField(blank=True, unique_for_date='pub_date')), - ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField(verbose_name='Note')), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=1)), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ], - options={ - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date',), - }, - ), - ] diff --git a/app/unused_apps/fieldnotes/migrations/0002_auto_20190303_1222.py b/app/unused_apps/fieldnotes/migrations/0002_auto_20190303_1222.py deleted file mode 100644 index c0e352e..0000000 --- a/app/unused_apps/fieldnotes/migrations/0002_auto_20190303_1222.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 12:22 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ('fieldnotes', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='fieldnote', - name='featured_image', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='photos.LuxImage'), - ), - migrations.AddField( - model_name='fieldnote', - name='note_type', - field=models.IntegerField(choices=[(0, 'Note'), (1, 'Photo')], default=0), - ), - ] diff --git a/app/unused_apps/fieldnotes/migrations/__init__.py b/app/unused_apps/fieldnotes/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/fieldnotes/models.py b/app/unused_apps/fieldnotes/models.py deleted file mode 100644 index c14ba80..0000000 --- a/app/unused_apps/fieldnotes/models.py +++ /dev/null @@ -1,113 +0,0 @@ -import re -from django import forms -from django.contrib.gis.db import models -from django.utils import timezone -from django.urls import reverse -from django.conf import settings -from django.contrib.sitemaps import Sitemap - -from locations.models import Location, CheckIn -from photos.models import LuxImage -from utils.util import render_images, parse_image, markdown_to_html, extract_main_image - - -def render_images(s): - s = re.sub('', parse_image, s) - return s - - -class FieldNote(models.Model): - title = models.CharField(max_length=250, blank=True) - subtitle = models.CharField(max_length=250, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - pub_date = models.DateTimeField(default=timezone.now) - body_html = models.TextField(blank=True) - body_markdown = models.TextField('Note') - point = models.PointField(blank=True, null=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True, null=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=1) - NOTE_TYPE = ( - (0, 'Note'), - (1, 'Photo'), - ) - note_type = models.IntegerField(choices=NOTE_TYPE, default=0) - featured_image = models.ForeignKey(LuxImage, on_delete=models.SET_NULL, blank=True, null=True) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("fieldnotes:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - def get_object_type(self): - return 'fieldnote' - - @property - def region(self): - return self.location.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return round(self.point.x, 2) - - @property - def latitude(self): - '''Get the site's latitude.''' - return round(self.point.y, 2) - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date() - - @property - def get_next_published(self): - return self.get_next_by_pub_date() - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - if not self.point: - self.point = CheckIn.objects.latest().point - try: - self.location = Location.objects.filter(geometry__contains=self.point).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - if not self.id: - self.pub_date = timezone.now() - self.date_last_updated = timezone.now() - self.featured_image = extract_main_image(self.body_markdown) - super(FieldNote, self).save() - - -class FieldNoteSitemap(Sitemap): - changefreq = "never" - priority = 0.7 - protocol = "https" - - def items(self): - return FieldNote.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_archive_list_date.html b/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_archive_list_date.html deleted file mode 100644 index 5d6865f..0000000 --- a/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_archive_list_date.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load html5_datetime %} -{% block pagetitle %} Field Notes | luxagraf {% endblock %} -{% block metadescription %} Rough notes and sketches from the field {% endblock %} -{%block bodyid%}id="field-notes"{%endblock%} - -{% block primary %} - -
-
-

Field Notes {% if month or year %}{% if month %} from {{month|date:"F"}} {{month|date:"Y"}}{%else%} from {{year|date:"Y"}}{%endif%}{%endif%}

-

Quick notes, sketches and images from the road. This is the semi-orgnized brain dump that comes before the more organized journal entries and essays. If I used social media this is the stuff I'd probably put there, but I prefer to put it here, even if it means a lot few people read it.

-
- -
- -{% endblock %} - - - diff --git a/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_detail.html b/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_detail.html deleted file mode 100644 index d1c648b..0000000 --- a/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_detail.html +++ /dev/null @@ -1,95 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load html5_datetime %} -{% load month_number_to_name %} -{% block pagetitle %}{{object.title|title|smartypants|safe}} - Luxagraf, Field Notes{% endblock %} - -{% block metadescription %}{{object.body_html|striptags|safe|truncatewords:30}}{% endblock %} -{%block extrahead%} - - - - - -{%endblock%} -{% block bodyid %}class="notes--permalin detail" id="archive-{% if month %}{{month|month_number_to_name}}{%endif%}{{year}}"{%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
-
-
-

{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

- {% if object.subtitle %}

{{object.subtitle|smartypants|safe}}

{%endif%} -
- {% if object.location %}
-

{% if object.location.country_name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.location.state_name|safe}}, U.S.{%else%}{{object.location.name|smartypants|safe}}, {{object.location.country_name|safe}}{%endif%}

- – Map -
{%endif%} - - -
-
-
- {{object.body_html|safe|smartypants}} -
- - - - - - - - {% with object.get_next_published as next %} - {% with object.get_previous_published as prev %} - {%endwith%}{%endwith%} -
-
-{% endblock %} - -{% block js %} - -{%endblock%} diff --git a/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_list.html b/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_list.html deleted file mode 100644 index 37cd0ca..0000000 --- a/app/unused_apps/fieldnotes/templates/fieldnotes/fieldnote_list.html +++ /dev/null @@ -1,49 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load get_next %} -{% load html5_datetime %} -{% load pagination_tags %} -{% block pagetitle %} Field Notes | luxagraf {% endblock %} -{% block metadescription %}Rough notes and sketches from the field {% endblock %} -{%block bodyid%}id="field-notes"{%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
-
-

Field Notes

-

Quick notes, sketches, and images from the road. This is the semi-organized brain dump that comes before the more organized journal entries. If I used social media this is the stuff I'd probably put there, but I prefer to put it here, even if it means a lot fewer people read it.

-
- {% autopaginate object_list 30 %} - -
- -{% endblock %} - - - diff --git a/app/unused_apps/fieldnotes/urls.py b/app/unused_apps/fieldnotes/urls.py deleted file mode 100644 index 85ee710..0000000 --- a/app/unused_apps/fieldnotes/urls.py +++ /dev/null @@ -1,39 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "field notes" - -urlpatterns = [ - re_path( - r'(?P[0-9]{4})/$', - views.FieldNoteYearArchiveView.as_view(), - name="list_year" - ), - path( - r'', - views.FieldNoteListView.as_view(), - {'page': 1}, - name="list" - ), - path( - r'/', - views.FieldNoteListView.as_view(), - name="list" - ), - path( - r'//.txt', - views.FieldNoteDetailViewTXT.as_view(), - name="detail-txt" - ), - path( - r'//', - views.FieldNoteDetailView.as_view(), - name="detail" - ), - path( - r'//', - views.FieldNoteMonthArchiveView.as_view(month_format='%m'), - name="list_month" - ), -] diff --git a/app/unused_apps/fieldnotes/views.py b/app/unused_apps/fieldnotes/views.py deleted file mode 100644 index 9b49cc0..0000000 --- a/app/unused_apps/fieldnotes/views.py +++ /dev/null @@ -1,37 +0,0 @@ -from django.views.generic.dates import YearArchiveView, MonthArchiveView -from django.views.generic.detail import DetailView - -from utils.views import PaginatedListView, LuxDetailView - -from .models import FieldNote - - -class FieldNoteListView(PaginatedListView): - model = FieldNote - """ - Return a list of Notes in reverse chronological order - """ - queryset = FieldNote.objects.filter(status=1).order_by('-pub_date') - - -class FieldNoteDetailView(LuxDetailView): - model = FieldNote - slug_field = "slug" - - -class FieldNoteDetailViewTXT(FieldNoteDetailView): - template_name = "jrnl/entry.txt" - - -class FieldNoteYearArchiveView(YearArchiveView): - queryset = FieldNote.objects.filter(status=1) - date_field = "pub_date" - template_name = "fieldnotes/fieldnote_archive_list_date.html" - make_object_list = True - - -class FieldNoteMonthArchiveView(MonthArchiveView): - queryset = FieldNote.objects.filter(status=1) - date_field = "pub_date" - make_object_list = True - template_name = "fieldnotes/fieldnote_archive_list_date.html" diff --git a/app/unused_apps/fieldnotes_/__init__.py b/app/unused_apps/fieldnotes_/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/fieldnotes_/admin.py b/app/unused_apps/fieldnotes_/admin.py deleted file mode 100644 index 838063d..0000000 --- a/app/unused_apps/fieldnotes_/admin.py +++ /dev/null @@ -1,38 +0,0 @@ -from django.contrib import admin -from django.contrib.contenttypes.admin import GenericTabularInline - -from .models import FieldNote -from utils.widgets import LGEntryForm, OLAdminBase -from utils.util import get_latlon - - -@admin.register(FieldNote) -class NoteAdmin(OLAdminBase): - form = LGEntryForm - prepopulated_fields = {"slug": ('title',)} - list_display = ('title', 'slug', 'pub_date', 'location') - fieldsets = ( - ('Note', { - 'fields': ( - ('title', 'note_type'), - 'subtitle', - 'body_markdown', - 'slug', - ('pub_date', 'status'), - 'point' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 10 - - class Media: - js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/unused_apps/fieldnotes_/build.py b/app/unused_apps/fieldnotes_/build.py deleted file mode 100644 index 4c5c83b..0000000 --- a/app/unused_apps/fieldnotes_/build.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - - -class BuildNotes(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("fieldnotes:list"), - paginate_by=24 - ) - self.build_year_view("fieldnotes:list_year") - self.build_month_view("fieldnotes:list_month") - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildNotes("fieldnotes", "fieldnote") - j.build() diff --git a/app/unused_apps/fieldnotes_/migrations/0001_initial.py b/app/unused_apps/fieldnotes_/migrations/0001_initial.py deleted file mode 100644 index cec67fb..0000000 --- a/app/unused_apps/fieldnotes_/migrations/0001_initial.py +++ /dev/null @@ -1,37 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 12:13 - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('locations', '0017_auto_20190217_1849'), - ] - - operations = [ - migrations.CreateModel( - name='FieldNote', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(blank=True, max_length=250)), - ('subtitle', models.CharField(blank=True, max_length=250)), - ('slug', models.SlugField(blank=True, unique_for_date='pub_date')), - ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField(verbose_name='Note')), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=1)), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ], - options={ - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date',), - }, - ), - ] diff --git a/app/unused_apps/fieldnotes_/migrations/0002_auto_20190303_1222.py b/app/unused_apps/fieldnotes_/migrations/0002_auto_20190303_1222.py deleted file mode 100644 index c0e352e..0000000 --- a/app/unused_apps/fieldnotes_/migrations/0002_auto_20190303_1222.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 12:22 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ('fieldnotes', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='fieldnote', - name='featured_image', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='photos.LuxImage'), - ), - migrations.AddField( - model_name='fieldnote', - name='note_type', - field=models.IntegerField(choices=[(0, 'Note'), (1, 'Photo')], default=0), - ), - ] diff --git a/app/unused_apps/fieldnotes_/migrations/__init__.py b/app/unused_apps/fieldnotes_/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/fieldnotes_/models.py b/app/unused_apps/fieldnotes_/models.py deleted file mode 100644 index c14ba80..0000000 --- a/app/unused_apps/fieldnotes_/models.py +++ /dev/null @@ -1,113 +0,0 @@ -import re -from django import forms -from django.contrib.gis.db import models -from django.utils import timezone -from django.urls import reverse -from django.conf import settings -from django.contrib.sitemaps import Sitemap - -from locations.models import Location, CheckIn -from photos.models import LuxImage -from utils.util import render_images, parse_image, markdown_to_html, extract_main_image - - -def render_images(s): - s = re.sub('', parse_image, s) - return s - - -class FieldNote(models.Model): - title = models.CharField(max_length=250, blank=True) - subtitle = models.CharField(max_length=250, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - pub_date = models.DateTimeField(default=timezone.now) - body_html = models.TextField(blank=True) - body_markdown = models.TextField('Note') - point = models.PointField(blank=True, null=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True, null=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=1) - NOTE_TYPE = ( - (0, 'Note'), - (1, 'Photo'), - ) - note_type = models.IntegerField(choices=NOTE_TYPE, default=0) - featured_image = models.ForeignKey(LuxImage, on_delete=models.SET_NULL, blank=True, null=True) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("fieldnotes:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - def get_object_type(self): - return 'fieldnote' - - @property - def region(self): - return self.location.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return round(self.point.x, 2) - - @property - def latitude(self): - '''Get the site's latitude.''' - return round(self.point.y, 2) - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date() - - @property - def get_next_published(self): - return self.get_next_by_pub_date() - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - if not self.point: - self.point = CheckIn.objects.latest().point - try: - self.location = Location.objects.filter(geometry__contains=self.point).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - if not self.id: - self.pub_date = timezone.now() - self.date_last_updated = timezone.now() - self.featured_image = extract_main_image(self.body_markdown) - super(FieldNote, self).save() - - -class FieldNoteSitemap(Sitemap): - changefreq = "never" - priority = 0.7 - protocol = "https" - - def items(self): - return FieldNote.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_archive_list_date.html b/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_archive_list_date.html deleted file mode 100644 index 5d6865f..0000000 --- a/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_archive_list_date.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load html5_datetime %} -{% block pagetitle %} Field Notes | luxagraf {% endblock %} -{% block metadescription %} Rough notes and sketches from the field {% endblock %} -{%block bodyid%}id="field-notes"{%endblock%} - -{% block primary %} - -
-
-

Field Notes {% if month or year %}{% if month %} from {{month|date:"F"}} {{month|date:"Y"}}{%else%} from {{year|date:"Y"}}{%endif%}{%endif%}

-

Quick notes, sketches and images from the road. This is the semi-orgnized brain dump that comes before the more organized journal entries and essays. If I used social media this is the stuff I'd probably put there, but I prefer to put it here, even if it means a lot few people read it.

-
- -
- -{% endblock %} - - - diff --git a/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_detail.html b/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_detail.html deleted file mode 100644 index d1c648b..0000000 --- a/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_detail.html +++ /dev/null @@ -1,95 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load html5_datetime %} -{% load month_number_to_name %} -{% block pagetitle %}{{object.title|title|smartypants|safe}} - Luxagraf, Field Notes{% endblock %} - -{% block metadescription %}{{object.body_html|striptags|safe|truncatewords:30}}{% endblock %} -{%block extrahead%} - - - - - -{%endblock%} -{% block bodyid %}class="notes--permalin detail" id="archive-{% if month %}{{month|month_number_to_name}}{%endif%}{{year}}"{%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
-
-
-

{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

- {% if object.subtitle %}

{{object.subtitle|smartypants|safe}}

{%endif%} -
- {% if object.location %}
-

{% if object.location.country_name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.location.state_name|safe}}, U.S.{%else%}{{object.location.name|smartypants|safe}}, {{object.location.country_name|safe}}{%endif%}

- – Map -
{%endif%} - - -
-
-
- {{object.body_html|safe|smartypants}} -
- - - - - - - - {% with object.get_next_published as next %} - {% with object.get_previous_published as prev %} - {%endwith%}{%endwith%} -
-
-{% endblock %} - -{% block js %} - -{%endblock%} diff --git a/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_list.html b/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_list.html deleted file mode 100644 index 37cd0ca..0000000 --- a/app/unused_apps/fieldnotes_/templates/fieldnotes/fieldnote_list.html +++ /dev/null @@ -1,49 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load get_next %} -{% load html5_datetime %} -{% load pagination_tags %} -{% block pagetitle %} Field Notes | luxagraf {% endblock %} -{% block metadescription %}Rough notes and sketches from the field {% endblock %} -{%block bodyid%}id="field-notes"{%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
-
-

Field Notes

-

Quick notes, sketches, and images from the road. This is the semi-organized brain dump that comes before the more organized journal entries. If I used social media this is the stuff I'd probably put there, but I prefer to put it here, even if it means a lot fewer people read it.

-
- {% autopaginate object_list 30 %} - -
- -{% endblock %} - - - diff --git a/app/unused_apps/fieldnotes_/urls.py b/app/unused_apps/fieldnotes_/urls.py deleted file mode 100644 index 85ee710..0000000 --- a/app/unused_apps/fieldnotes_/urls.py +++ /dev/null @@ -1,39 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "field notes" - -urlpatterns = [ - re_path( - r'(?P[0-9]{4})/$', - views.FieldNoteYearArchiveView.as_view(), - name="list_year" - ), - path( - r'', - views.FieldNoteListView.as_view(), - {'page': 1}, - name="list" - ), - path( - r'/', - views.FieldNoteListView.as_view(), - name="list" - ), - path( - r'//.txt', - views.FieldNoteDetailViewTXT.as_view(), - name="detail-txt" - ), - path( - r'//', - views.FieldNoteDetailView.as_view(), - name="detail" - ), - path( - r'//', - views.FieldNoteMonthArchiveView.as_view(month_format='%m'), - name="list_month" - ), -] diff --git a/app/unused_apps/fieldnotes_/views.py b/app/unused_apps/fieldnotes_/views.py deleted file mode 100644 index 9b49cc0..0000000 --- a/app/unused_apps/fieldnotes_/views.py +++ /dev/null @@ -1,37 +0,0 @@ -from django.views.generic.dates import YearArchiveView, MonthArchiveView -from django.views.generic.detail import DetailView - -from utils.views import PaginatedListView, LuxDetailView - -from .models import FieldNote - - -class FieldNoteListView(PaginatedListView): - model = FieldNote - """ - Return a list of Notes in reverse chronological order - """ - queryset = FieldNote.objects.filter(status=1).order_by('-pub_date') - - -class FieldNoteDetailView(LuxDetailView): - model = FieldNote - slug_field = "slug" - - -class FieldNoteDetailViewTXT(FieldNoteDetailView): - template_name = "jrnl/entry.txt" - - -class FieldNoteYearArchiveView(YearArchiveView): - queryset = FieldNote.objects.filter(status=1) - date_field = "pub_date" - template_name = "fieldnotes/fieldnote_archive_list_date.html" - make_object_list = True - - -class FieldNoteMonthArchiveView(MonthArchiveView): - queryset = FieldNote.objects.filter(status=1) - date_field = "pub_date" - make_object_list = True - template_name = "fieldnotes/fieldnote_archive_list_date.html" diff --git a/app/unused_apps/figments/admin.py b/app/unused_apps/figments/admin.py deleted file mode 100644 index 34452bd..0000000 --- a/app/unused_apps/figments/admin.py +++ /dev/null @@ -1,46 +0,0 @@ -from django.contrib import admin -from .models import Figment, Series -from utils.widgets import LGEntryForm - - -class FigmentAdmin(admin.ModelAdmin): - form = LGEntryForm - list_display = ('title', 'pub_date', 'get_series') - prepopulated_fields = {"slug": ('title',)} - fieldsets = ( - ('Figment', { - 'fields': ( - 'title', - 'body_markdown', - ('slug', 'status'), - 'pub_date', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ('Extra', { - 'fields': ( - 'dek', - 'prologue', - 'series', - 'published_link', - ), - 'classes': ( - 'collapse', - 'extrapretty', - 'wide' - ) - } - ), - ) - - -class SeriesAdmin(admin.ModelAdmin): - pass - -admin.site.register(Figment, FigmentAdmin) -admin.site.register(Series, SeriesAdmin) diff --git a/app/unused_apps/figments/build.py b/app/unused_apps/figments/build.py deleted file mode 100644 index b656ab0..0000000 --- a/app/unused_apps/figments/build.py +++ /dev/null @@ -1,17 +0,0 @@ -from django.urls import reverse -from builder.base import BuildNew - - -class BuildFigments(BuildNew): - def build(self): - self.build_list_view( - base_path=reverse('figments:list'), - paginate_by=99999 - ) - self.build_detail_view() - self.build_feed('figments:feed') - - -def builder(): - j = BuildFigments("figments", "figment") - j.build() diff --git a/app/unused_apps/figments/ebook.py b/app/unused_apps/figments/ebook.py deleted file mode 100644 index 81210a4..0000000 --- a/app/unused_apps/figments/ebook.py +++ /dev/null @@ -1,79 +0,0 @@ -import os -from ebooklib import epub - -from django.conf import settings -from typogrify.filters import typogrify - - -def generate_epub_file(f): - book = epub.EpubBook() - - # add metadata - book.set_identifier('lux23') - book.set_title(f.title) - book.set_language('en') - - book.add_author('Scott Gilbertson') - - # intro chapter - c1 = epub.EpubHtml(title='Introduction', file_name='intro.xhtml', lang='en') - c1.content = u'

Forward

Thank you for downloading my story %s. I hope you enjoy it and please feel free to email me if you have any questions or comments.

If you enjoy this story and would like to read more, head on over to luxagraf.net.

– Scott Gilbertson
  sng@luxagraf.net

' % f.title - - # chapter - c2 = epub.EpubHtml(title=f.title, file_name='story.xhtml') - c2.content = '

%s

' % f.title - c2.content += typogrify(f.body_html) - - # add chapters to the book - book.add_item(c1) - book.add_item(c2) - # create table of contents - # - add section - # - add auto created links to chapters - - book.toc = (epub.Link('intro.xhtml', 'Introduction', 'intro'), - epub.Link('story.xhtml', f.title, 'story'), - ) - - # add navigation files - book.add_item(epub.EpubNcx()) - book.add_item(epub.EpubNav()) - - # define css style - style = ''' -@namespace epub "http://www.idpf.org/2007/ops"; -body { - font-family: Georgia, Times, Times New Roman, serif; -} -h2 { - text-align: left; - text-transform: uppercase; - font-weight: 200; -} -ol { - list-style-type: none; -} -ol > li:first-child { - margin-top: 0.3em; -} -nav[epub|type~='toc'] > ol > li > ol { - list-style-type:square; -} -nav[epub|type~='toc'] > ol > li > ol > li { - margin-top: 0.3em; -} -''' - - # add css file - nav_css = epub.EpubItem(uid="style_nav", file_name="style/nav.css", media_type="text/css", content=style) - book.add_item(nav_css) - - # create spine - book.spine = ['nav', c1, c2] - path, filename = os.path.split(f.get_absolute_url()) - fpath = '%s%s/' % (settings.FLATFILES_ROOT, path) - if not os.path.isdir(fpath): - os.makedirs(fpath) - bk = '%s%s.epub' % (fpath, f.slug) - # create epub file - epub.write_epub(bk, book, {}) diff --git a/app/unused_apps/figments/models.py b/app/unused_apps/figments/models.py deleted file mode 100644 index 8b22049..0000000 --- a/app/unused_apps/figments/models.py +++ /dev/null @@ -1,97 +0,0 @@ -import datetime -from itertools import chain -from django.db import models -from django.urls import reverse -from django.contrib.sitemaps import Sitemap -from django.contrib.syndication.views import Feed -from django.db.models.signals import post_save -from django.dispatch import receiver - -from utils.util import markdown_to_html - -from .ebook import generate_epub_file - - -class Series(models.Model): - title = models.CharField(max_length=200) - slug = models.CharField(max_length=50) - is_book = models.BooleanField(default=False) - body_markdown = models.TextField(null=True, blank=True) - body_html = models.TextField(null=True, blank=True) - pub_date = models.DateTimeField(auto_now_add=True) - - class Meta: - verbose_name_plural = 'Series' - - def __str__(self): - return self.title - - -class Figment(models.Model): - title = models.CharField(max_length=200) - slug = models.CharField(max_length=50) - pub_date = models.DateTimeField(blank=True) - body_markdown = models.TextField(null=True, blank=True) - prologue = models.TextField(null=True, blank=True) - dek = models.TextField(null=True, blank=True) - body_html = models.TextField(null=True, blank=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - series = models.ManyToManyField(Series, related_name="series", blank=True) - TEMPLATES = ( - (0, 'default'), - ) - template_name = models.IntegerField(choices=TEMPLATES, default=0) - published_link = models.CharField(max_length=300, help_text="link to online pub", blank=True, null=True) - - class Meta: - ordering = ('-pub_date',) - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("figments:detail", kwargs={"slug": self.slug}) - - def get_series(self): - return "\n".join([s.title for s in self.series.all()]) - - def save(self, *args, **kwargs): - if not self.id and not self.pub_date: - self.pub_date = datetime.datetime.now() - self.body_html = markdown_to_html(self.body_markdown) - super(Figment, self).save() - - -@receiver(post_save, sender=Figment) -def post_save_events(sender, instance, **kwargs): - if instance.body_markdown != instance._loaded_values['body_markdown']: - print("you updated") - generate_epub_file(instance) - else: - print("no update found, not buidling") - - -class LatestFull(Feed): - title = "luxagraf figments: stories less literally true." - link = "/figments/" - description = "Latest postings to luxagraf.net/figments" - description_template = 'feeds/blog_description.html' - - def items(self): - return Figment.objects.filter(status__exact=1).order_by('-pub_date')[:10] - - -class FigmentSitemap(Sitemap): - changefreq = "never" - priority = 0.7 - protocol = "https" - - def items(self): - return list(chain(Figment.objects.filter(status__exact=1), Series.objects.all())) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/figments/urls.py b/app/unused_apps/figments/urls.py deleted file mode 100644 index 4a37cf5..0000000 --- a/app/unused_apps/figments/urls.py +++ /dev/null @@ -1,38 +0,0 @@ -from django.conf.urls import url - -from . import views - -app_name = "figments" - -urlpatterns = [ - url( - r'^feed.xml', - views.FigRSSFeedView(), - name="feed" - ), - url( - r'series/$', - views.SeriesListView.as_view(), - name='list_series' - ), - url( - r'(?P[-\w]+).txt$', - views.FigmentDetailViewTXT.as_view(), - name="detail-txt" - ), - url( - r'(?P[-\w]+).amp$', - views.FigmentDetailViewAMP.as_view(), - name="detail-amp" - ), - url( - r'(?P[-\w]+)$', - views.FigmentDetailView.as_view(), - name='detail' - ), - url( - r'^$', - views.FigmentListView.as_view(), - name='list' - ), -] diff --git a/app/unused_apps/figments/views.py b/app/unused_apps/figments/views.py deleted file mode 100644 index 6521c29..0000000 --- a/app/unused_apps/figments/views.py +++ /dev/null @@ -1,42 +0,0 @@ -from django.views.generic import ListView, DetailView -from django.contrib.syndication.views import Feed - -from .models import Figment, Series - - -class FigmentListView(ListView): - model = Figment - template_name = "archives/figments.html" - context_object_name = 'object_list' - - def get_queryset(self): - return Figment.objects.filter(status__exact=1).order_by('-pub_date') - - -class SeriesListView(ListView): - model = Series - template_name = "archives/figments_series.html" - context_object_name = 'object_list' - - -class FigmentDetailView(DetailView): - model = Figment - template_name = "details/figments.html" - - -class FigmentDetailViewTXT(FigmentDetailView): - template_name = "details/entry.txt" - - -class FigmentDetailViewAMP(FigmentDetailView): - template_name = "details/entry.amp" - - -class FigRSSFeedView(Feed): - title = "luxagraf figments: stories less literally true." - link = "/figments/" - description = "Latest postings to luxagraf.net/figments" - description_template = 'feeds/blog_description.html' - - def items(self): - return Figment.objects.filter(status__exact=1).order_by('-pub_date')[:10] diff --git a/app/unused_apps/garden/admin.py b/app/unused_apps/garden/admin.py deleted file mode 100644 index 0f9c8d0..0000000 --- a/app/unused_apps/garden/admin.py +++ /dev/null @@ -1,38 +0,0 @@ -from django.contrib import admin -from django.contrib.contenttypes.admin import GenericStackedInline - -from utils.widgets import AdminImageWidget, LGEntryForm -from .models import Plant, Planting, Seed - - -@admin.register(Plant) -class PlantAdmin(admin.ModelAdmin): - form = LGEntryForm - - list_display = ('name', 'family', 'growth_time') - list_filter = ('family', 'edible', 'conditions', 'heirloom') - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - css = { - "all": ("my_styles.css",) - } - - -@admin.register(Planting) -class PlantingAdmin(admin.ModelAdmin): - form = LGEntryForm - - list_display = ('plant', 'family', 'number_of_plants', 'date_seed_started', 'date_seed_sprouted', 'date_hardened_off', 'date_planted', 'seed_start_area','garden_area', 'outcome') - list_filter = ('plant__family', 'date_seed_started', 'garden_area', 'seed_start_area', 'outcome') - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - css = { - "all": ("my_styles.css",) - } - - -@admin.register(Seed) -class PlantAdmin(admin.ModelAdmin): - form = LGEntryForm diff --git a/app/unused_apps/garden/migrations/0001_initial.py b/app/unused_apps/garden/migrations/0001_initial.py deleted file mode 100644 index d73d80d..0000000 --- a/app/unused_apps/garden/migrations/0001_initial.py +++ /dev/null @@ -1,91 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-05 16:18 - -import datetime -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Guild', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(blank=True, max_length=200)), - ('seperation', models.PositiveIntegerField()), - ('notes', models.TextField(blank=True, null=True)), - ], - ), - migrations.CreateModel( - name='Plant', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ('scientific_name', models.CharField(max_length=200)), - ('edible', models.BooleanField(default=False)), - ('date_created', models.DateTimeField(default=datetime.datetime.now)), - ('growth_time', models.PositiveIntegerField()), - ('germination_time', models.PositiveIntegerField()), - ('seperation', models.PositiveIntegerField()), - ('notes', models.TextField(blank=True, null=True)), - ('conditions', models.IntegerField(choices=[(0, 'Direct Sun'), (1, 'Part Sun'), (2, 'Shade')], default=0)), - ('organic', models.BooleanField(default=True)), - ('heirloom', models.BooleanField(default=True)), - ], - options={ - 'ordering': ('-date_created',), - 'get_latest_by': 'date_created', - }, - ), - migrations.CreateModel( - name='Planting', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('seed_start_area', models.IntegerField(choices=[(0, 'Indoors'), (1, 'Direct Sow'), (2, 'Greenhouse')], default=0)), - ('date_seed_started', models.DateField(verbose_name='Date published')), - ('date_seed_sprouted', models.DateField(verbose_name='Date published')), - ('date_hardened_off', models.DateField(verbose_name='Date published')), - ('date_planted', models.DateField(verbose_name='Date published')), - ('garden_area', models.IntegerField(choices=[(0, 'Far Plot Mound'), (1, 'Far Plot ground'), (2, 'Herb Plot half mound')], default=0)), - ('notes', models.TextField(blank=True, null=True)), - ('plant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='garden.Plant')), - ], - options={ - 'ordering': ('-date_seed_started',), - 'get_latest_by': 'date_seed_started', - }, - ), - migrations.CreateModel( - name='Seed', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('brand', models.CharField(max_length=200)), - ('date_created', models.DateTimeField(default=datetime.datetime.now)), - ('estimated_growth_time', models.PositiveIntegerField()), - ('estimated_germination_time', models.PositiveIntegerField()), - ('organic', models.BooleanField(default=True)), - ('notes', models.TextField(blank=True, null=True)), - ('plant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='garden.Plant')), - ], - options={ - 'ordering': ('-date_created',), - 'get_latest_by': 'date_created', - }, - ), - migrations.AddField( - model_name='planting', - name='seed', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='garden.Seed'), - ), - migrations.AddField( - model_name='guild', - name='plant', - field=models.ManyToManyField(to='garden.Plant'), - ), - ] diff --git a/app/unused_apps/garden/migrations/0002_plant_family.py b/app/unused_apps/garden/migrations/0002_plant_family.py deleted file mode 100644 index db81791..0000000 --- a/app/unused_apps/garden/migrations/0002_plant_family.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-05 16:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('garden', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='plant', - name='family', - field=models.IntegerField(choices=[(0, 'Tomatoes'), (1, 'Cucumbers'), (2, 'Watermelons'), (3, 'Pumkins'), (4, 'Basil')], default=0), - ), - ] diff --git a/app/unused_apps/garden/migrations/0003_auto_20200705_1629.py b/app/unused_apps/garden/migrations/0003_auto_20200705_1629.py deleted file mode 100644 index ed0eb01..0000000 --- a/app/unused_apps/garden/migrations/0003_auto_20200705_1629.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-05 16:29 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('garden', '0002_plant_family'), - ] - - operations = [ - migrations.AlterField( - model_name='plant', - name='scientific_name', - field=models.CharField(max_length=200, null=True), - ), - ] diff --git a/app/unused_apps/garden/migrations/0004_auto_20200705_1650.py b/app/unused_apps/garden/migrations/0004_auto_20200705_1650.py deleted file mode 100644 index 6e9ea63..0000000 --- a/app/unused_apps/garden/migrations/0004_auto_20200705_1650.py +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-05 16:50 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('garden', '0003_auto_20200705_1629'), - ] - - operations = [ - migrations.AddField( - model_name='planting', - name='number_of_plants', - field=models.PositiveIntegerField(default=1), - preserve_default=False, - ), - migrations.AddField( - model_name='planting', - name='outcome', - field=models.IntegerField(choices=[(0, 'Far Plot Mound'), (1, 'Far Plot ground'), (2, 'Herb Plot ground'), (2, 'Herb Plot bed')], default=0), - ), - migrations.AlterField( - model_name='plant', - name='scientific_name', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AlterField( - model_name='planting', - name='date_hardened_off', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='planting', - name='date_planted', - field=models.DateField(), - ), - migrations.AlterField( - model_name='planting', - name='date_seed_sprouted', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='planting', - name='date_seed_started', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='planting', - name='garden_area', - field=models.IntegerField(choices=[(0, 'Far Plot Mound'), (1, 'Far Plot ground'), (2, 'Herb Plot ground'), (2, 'Herb Plot bed')], default=0), - ), - migrations.AlterField( - model_name='planting', - name='seed_start_area', - field=models.IntegerField(choices=[(0, 'Indoors'), (1, 'Direct Sow'), (2, 'Greenhouse'), (2, 'Purchased Seedling')], default=0), - ), - ] diff --git a/app/unused_apps/garden/migrations/0005_auto_20200705_1652.py b/app/unused_apps/garden/migrations/0005_auto_20200705_1652.py deleted file mode 100644 index 22bebaf..0000000 --- a/app/unused_apps/garden/migrations/0005_auto_20200705_1652.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-05 16:52 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('garden', '0004_auto_20200705_1650'), - ] - - operations = [ - migrations.AlterField( - model_name='planting', - name='outcome', - field=models.IntegerField(choices=[(0, 'Unknown'), (1, 'Success'), (2, 'Moderate Success'), (3, 'Fail')], default=0), - ), - migrations.AlterField( - model_name='planting', - name='seed', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='garden.Seed'), - ), - ] diff --git a/app/unused_apps/garden/migrations/0006_auto_20200706_0854.py b/app/unused_apps/garden/migrations/0006_auto_20200706_0854.py deleted file mode 100644 index a036635..0000000 --- a/app/unused_apps/garden/migrations/0006_auto_20200706_0854.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-06 08:54 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('garden', '0005_auto_20200705_1652'), - ] - - operations = [ - migrations.AddField( - model_name='plant', - name='annual', - field=models.BooleanField(default=True), - ), - migrations.AlterField( - model_name='plant', - name='family', - field=models.IntegerField(choices=[(0, 'Tomatoes'), (1, 'Cucumbers'), (2, 'Watermelons'), (3, 'Pumkins'), (4, 'Cantelope'), (5, 'Kale'), (6, 'Okra'), (7, 'Collards'), (8, 'Arugula'), (9, 'Butter Lettuce'), (10, 'Basil'), (11, 'Lemongrass'), (12, 'Thyme'), (13, 'Mint')], default=0), - ), - ] diff --git a/app/unused_apps/garden/migrations/0007_auto_20200706_0854.py b/app/unused_apps/garden/migrations/0007_auto_20200706_0854.py deleted file mode 100644 index 94f85e7..0000000 --- a/app/unused_apps/garden/migrations/0007_auto_20200706_0854.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-06 08:54 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('garden', '0006_auto_20200706_0854'), - ] - - operations = [ - migrations.AlterField( - model_name='plant', - name='conditions', - field=models.IntegerField(choices=[(0, 'Vegetable'), (1, 'Herb'), (2, 'Berry'), (3, 'Nut')], default=0), - ), - ] diff --git a/app/unused_apps/garden/migrations/__init__.py b/app/unused_apps/garden/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/garden/models.py b/app/unused_apps/garden/models.py deleted file mode 100644 index 56e8c30..0000000 --- a/app/unused_apps/garden/models.py +++ /dev/null @@ -1,153 +0,0 @@ -import datetime - -from django.contrib.gis.db import models - -from utils.util import render_images, markdown_to_html - - -PLANT_FAMILY = ( - (0, 'Tomatoes'), - (1, 'Cucumbers'), - (2, 'Watermelons'), - (3, 'Pumkins'), - (4, 'Cantelope'), - (5, 'Kale'), - (6, 'Okra'), - (7, 'Collards'), - (8, 'Arugula'), - (9, 'Butter Lettuce'), - (10, 'Basil'), - (11, 'Lemongrass'), - (12, 'Thyme'), - (13, 'Mint'), -) - - -class Plant(models.Model): - """ - Model to hold Plant Definitions - """ - name = models.CharField(max_length=200) - family = models.IntegerField(choices=PLANT_FAMILY, default=0) - scientific_name = models.CharField(max_length=200, null=True, blank=True) - edible = models.BooleanField(default=False) - date_created = models.DateTimeField(default=datetime.datetime.now) - growth_time = models.PositiveIntegerField() - germination_time = models.PositiveIntegerField() - seperation = models.PositiveIntegerField() - notes = models.TextField(null=True, blank=True) - CONDITIONS = ( - (0, 'Direct Sun'), - (1, 'Part Sun'), - (2, 'Shade'), - ) - conditions = models.IntegerField(choices=CONDITIONS, default=0) - PLANT_TYPE= ( - (0, 'Vegetable'), - (1, 'Herb'), - (2, 'Berry'), - (3, 'Nut'), - ) - conditions = models.IntegerField(choices=PLANT_TYPE, default=0) - organic = models.BooleanField(default=True) - heirloom = models.BooleanField(default=True) - annual = models.BooleanField(default=True) - - class Meta: - ordering = ('-date_created',) - get_latest_by = 'date_created' - - def __str__(self): - return self.name - - -class Seed(models.Model): - plant = models.ForeignKey(Plant, on_delete=models.CASCADE) - brand = models.CharField(max_length=200) - date_created = models.DateTimeField(default=datetime.datetime.now) - estimated_growth_time = models.PositiveIntegerField() - estimated_germination_time = models.PositiveIntegerField() - organic = models.BooleanField(default=True) - notes = models.TextField(null=True, blank=True) - - class Meta: - ordering = ('-date_created',) - get_latest_by = 'date_created' - - def __str__(self): - return self.plant.name - - -class Planting(models.Model): - plant = models.ForeignKey(Plant, on_delete=models.CASCADE) - number_of_plants = models.PositiveIntegerField() - seed = models.ForeignKey(Seed, on_delete=models.CASCADE, null=True, blank=True) - START_AREA = ( - (0, 'Indoors'), - (1, 'Direct Sow'), - (2, 'Greenhouse'), - (2, 'Purchased Seedling'), - ) - seed_start_area = models.IntegerField(choices=START_AREA, default=0) - date_seed_started = models.DateField(null=True, blank=True) - date_seed_sprouted = models.DateField(null=True, blank=True) - date_hardened_off = models.DateField(null=True, blank=True) - date_planted = models.DateField() - GARDEN_PLOT = ( - (0, 'Far Plot Mound'), - (1, 'Far Plot ground'), - (2, 'Herb Plot ground'), - (2, 'Herb Plot bed'), - ) - garden_area = models.IntegerField(choices=GARDEN_PLOT, default=0) - OUTCOME = ( - (0, 'Unknown'), - (1, 'Success'), - (2, 'Moderate Success'), - (3, 'Fail'), - ) - outcome = models.IntegerField(choices=OUTCOME, default=0) - notes = models.TextField(null=True, blank=True) - - class Meta: - ordering = ('-date_seed_started',) - get_latest_by = 'date_seed_started' - - def __str__(self): - return self.plant.name - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - - @property - def family(self): - return self.plant.get_family_display() - - - def save(self, *args, **kwargs): - created = self.pk is None - if not created: - md = render_images(self.notes) - self.body_html = markdown_to_html(md) - super(Planting, self).save(*args, **kwargs) - - -class Guild(models.Model): - name = models.CharField(max_length=200, blank=True) - plant = models.ManyToManyField(Plant) - seperation = models.PositiveIntegerField() - notes = models.TextField(null=True, blank=True) - - def __str__(self): - return self.name diff --git a/app/unused_apps/guide/__init__.py b/app/unused_apps/guide/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/guide/admin.py b/app/unused_apps/guide/admin.py deleted file mode 100644 index dfdf45e..0000000 --- a/app/unused_apps/guide/admin.py +++ /dev/null @@ -1,61 +0,0 @@ -from django.contrib import admin -from guide.models import Guide -from django.contrib.gis.admin import OSMGeoAdmin - - -class GuideAdmin(OSMGeoAdmin): - list_display = ( - 'title', - 'pub_date', - 'template_name', - 'status', - 'location', - 'photo_gallery' - ) - search_fields = ['title', 'body_markdown'] - prepopulated_fields = {"slug": ('title',)} - list_filter = ('pub_date', 'status', 'location__state__country__lux_region', 'location') - fieldsets = ( - ('Note', { - 'fields': ( - 'title', - 'body_markdown', - 'location', - 'pub_date', - 'status', - 'slug', - 'photo_gallery' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - }), - ('Extra', { - 'fields': ( - 'dek', - 'meta_description', - 'template_name', - 'image', - 'thumbnail' - ), - 'classes': ( - 'collapse', - 'wide' - ) - }), - ) - - # options for OSM map Using custom ESRI topo map - default_lon = -9285175 - default_lat = 4025046 - default_zoom = 6 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - -admin.site.register(Guide, GuideAdmin) diff --git a/app/unused_apps/guide/models.py b/app/unused_apps/guide/models.py deleted file mode 100644 index 7f0d501..0000000 --- a/app/unused_apps/guide/models.py +++ /dev/null @@ -1,129 +0,0 @@ -import datetime -from django.contrib.gis.db import models -from django.conf import settings -from django.contrib.sitemaps import Sitemap -from django.contrib.syndication.views import Feed -from PIL import Image - -from taggit.managers import TaggableManager -from locations.models import Location -from jrnl.models import Entry -from photos.models import PhotoGallery - -from utils.widgets import markdown_to_html - - -def get_upload_path(self, filename): - return "images/guide-images/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -def get_tn_path(self, filename): - return "images/guide-thumbnail/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -def image_url_replace(str): - str = str.replace('[[base_url]]', settings.IMAGES_URL) - return str - - -def markdown_processor(md): - return markdown_to_html(md) - - -class Guide(models.Model): - title = models.CharField(max_length=200) - slug = models.SlugField(unique_for_date='pub_date') - entry = models.ForeignKey(Entry, null=True, blank=True) - body_html = models.TextField(blank=True) - body_markdown = models.TextField() - dek = models.TextField(null=True, blank=True) - pub_date = models.DateTimeField('Date published') - location = models.ForeignKey(Location, null=True, blank=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - photo_gallery = models.ForeignKey(PhotoGallery, blank=True, null=True, verbose_name='photo set') - meta_description = models.CharField(max_length=256, null=True, blank=True) - TEMPLATES = ( - (0, 'single'), - (1, 'double'), - (2, 'single-dark'), - (3, 'double-dark'), - ) - template_name = models.IntegerField(choices=TEMPLATES, default=0) - tags = TaggableManager(blank=True) - image = models.FileField(upload_to=get_upload_path, null=True, blank=True) - thumbnail = models.FileField(upload_to=get_tn_path, null=True, blank=True) - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - verbose_name_plural = 'entries' - - def __unicode__(self): - return self.title - - def get_absolute_url(self): - if self.location: - return "/travel-guide/location/%s/%s/" % (self.location.slug, self.slug) - else: - return "/travel-guide/%s/" % (self.slug) - - def get_thumbnail_url(self): - image_dir, img = self.thumbnail.url.split('guide-thumbnail/')[1].split('/') - return '%sguide-thumbnail/%s/%s' % (settings.IMAGES_URL, image_dir, img) - - def get_image_url(self): - image_dir, img = self.image.url.split('guide-images/')[1].split('/') - return '%sguide-images/%s/%s' % (settings.IMAGES_URL, image_dir, img) - - def save(self): - if self.image: - img = Image.open(self.image) - self.image_width, self.image_height = img.size - img = Image.open(self.thumbnail) - self.thumb_width, self.thumb_height = img.size - md = image_url_replace(self.body_markdown) - self.body_html = markdown_to_html(md) - self.dek = markdown_to_html(self.dek) - super(Guide, self).save() - - -class GuideSitemap(Sitemap): - changefreq = "never" - priority = 1.0 - - def items(self): - return Entry.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date - - -class GuideFull(Feed): - title = "Luxagraf: Topographical Writings" - link = "/writing/" - description = "Latest postings to luxagraf.net" - description_template = 'feeds/blog_description.html' - - def items(self): - return Entry.objects.filter(status__exact=1).order_by('-pub_date')[:10] - - -#from django.dispatch import dispatcher -#from django.db.models import signals - -#signals.post_save.connect(update_recent, sender=Entry) - diff --git a/app/unused_apps/guide/urls.py b/app/unused_apps/guide/urls.py deleted file mode 100644 index e701d3e..0000000 --- a/app/unused_apps/guide/urls.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.conf.urls import * -from django.views.generic.base import RedirectView - -from . import views - -urlpatterns = [ - url(r'location/(?P[-\w]+)/(?P[-\w]+)/$', views.guide_detail), - url(r'location/(?P[-\w]+)/$', views.guide_list_by_location), - url(r'location/$', views.location_list), - url(r'(?P\d+)/$', views.guide_list), - url(r'(?P[-\w]+)/$', views.guide_detail), - url(r'', RedirectView.as_view(url="/travel-guide/1/")), -] diff --git a/app/unused_apps/guide/views.py b/app/unused_apps/guide/views.py deleted file mode 100644 index c22a6b3..0000000 --- a/app/unused_apps/guide/views.py +++ /dev/null @@ -1,35 +0,0 @@ -from django.shortcuts import render_to_response, get_object_or_404 -from django.template import RequestContext - -from guide.models import Guide - - -def guide_list(request, page): - """List of all guides""" - request.page_url = "/guide/%d/" - request.page = int(page) - context = { - 'object_list': Guide.objects.filter(status__exact=1).order_by('-pub_date').select_related(), - 'page': page, - } - return render_to_response("archives/guide.html", context, context_instance=RequestContext(request)) - - -def guide_list_by_location(request, location): - context = { - "object_list": Guide.objects.filter(location__slug__exact=location), - } - return render_to_response("archives/guide.html", context, context_instance=RequestContext(request)) - - -def location_list(request): - """List of all locations with guides""" - context = { - "object_list": Guide.objects.filter(status__exact=1).order_by('-pub_date').select_related() - } - return render_to_response("archives/guide.html", context, context_instance=RequestContext(request)) - - -def guide_detail(request, slug, location=None): - obj = get_object_or_404(Guide, slug__exact=slug) - return render_to_response('details/guide.html', {'object': obj}, context_instance=RequestContext(request)) diff --git a/app/unused_apps/guides/__init__.py b/app/unused_apps/guides/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/guides/admin.py b/app/unused_apps/guides/admin.py deleted file mode 100644 index 7895aba..0000000 --- a/app/unused_apps/guides/admin.py +++ /dev/null @@ -1,67 +0,0 @@ -from django.contrib import admin -from django.contrib.gis.admin import OSMGeoAdmin - -from utils.widgets import LGEntryForm -from utils.util import get_latlon - -from .models import Guide - - -@admin.register(Guide) -class GuideAdmin(OSMGeoAdmin): - form = LGEntryForm - list_display = ('title', 'pub_date', 'enable_comments', 'status', 'post_type') - list_filter = ('pub_date', 'enable_comments', 'status') - prepopulated_fields = {"slug": ('title',)} - fieldsets = ( - ('Entry', { - 'fields': ( - 'title', - 'sub_title', - 'body_markdown', - ('pub_date', 'status', 'post_type', 'disclaimer'), - 'meta_description', - 'featured_image', - 'dek', - 'tags', - 'prologue_markdown', - 'epilogue_markdown', - 'has_video', - ('slug', 'enable_comments'), - 'point', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - }), - ('meta', { - 'fields': ( - ('field_notes', 'books','jrnl'), - ), - 'classes': ( - 'hide', - 'extrapretty', - 'wide' - ) - }), - ) - - # options for OSM map Using custom ESRI topo map - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 10 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - css = { - "all": ("my_styles.css",) - } diff --git a/app/unused_apps/guides/build.py b/app/unused_apps/guides/build.py deleted file mode 100644 index 392e991..0000000 --- a/app/unused_apps/guides/build.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -from builder.base import BuildNew -from django.urls import reverse -from . import models - - -class BuildEssays(BuildNew): - - def build(self): - self.build_list_view() - self.build_detail_view() - # These are the unique classes for this model: - #self.build_feed("src:feed") - - def build_list_view(self): - response = self.client.get('/essays/') - self.write_file('essays/', response.content) - - -def essaybuilder(): - j = BuildEssays("essays", "essay") - j.build() diff --git a/app/unused_apps/guides/guide_urls.py b/app/unused_apps/guides/guide_urls.py deleted file mode 100644 index ad67061..0000000 --- a/app/unused_apps/guides/guide_urls.py +++ /dev/null @@ -1,18 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "guide" - -urlpatterns = [ - path( - r'', - views.GuideDetailView.as_view(), - name="guide-detail" - ), - path( - r'.txt', - views.GuideDetailViewTXT.as_view(), - name="guide-detail-txt" - ), -] diff --git a/app/unused_apps/guides/migrations/0001_initial.py b/app/unused_apps/guides/migrations/0001_initial.py deleted file mode 100644 index 833dfbe..0000000 --- a/app/unused_apps/guides/migrations/0001_initial.py +++ /dev/null @@ -1,60 +0,0 @@ -# Generated by Django 2.1.7 on 2019-07-04 09:03 - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import taggit.managers - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('jrnl', '0043_auto_20190704_0903'), - ('books', '0009_book_afflink'), - ('photos', '0019_auto_20190704_0903'), - ('fieldnotes', '0002_auto_20190303_1222'), - ('locations', '0018_auto_20190414_2124'), - ('essays', '0010_essay_field_notes'), - ('taxonomy', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Guide', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('sub_title', models.CharField(blank=True, max_length=200)), - ('dek', models.TextField(blank=True)), - ('preamble_markdown', models.TextField(blank=True)), - ('preamble_html', models.TextField(blank=True)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('last_updated', models.DateTimeField(auto_now=True)), - ('enable_comments', models.BooleanField(default=False)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('has_video', models.BooleanField(blank=True, default=False)), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('afterword', models.TextField(blank=True)), - ('afterword_html', models.TextField(blank=True)), - ('books', models.ManyToManyField(blank=True, to='books.Book')), - ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='taxonomy.Category')), - ('essays', models.ManyToManyField(blank=True, to='essays.Essay')), - ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.LuxImage')), - ('field_notes', models.ManyToManyField(blank=True, to='fieldnotes.FieldNote')), - ('jrnl', models.ManyToManyField(blank=True, to='jrnl.Entry')), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('tags', taggit.managers.TaggableManager(blank=True, help_text='Topics Covered', through='taxonomy.TaggedItems', to='taxonomy.LuxTag', verbose_name='Tags')), - ], - options={ - 'verbose_name_plural': 'Guides', - 'ordering': ('-pub_date',), - 'get_latest_by': 'pub_date', - }, - ), - ] diff --git a/app/unused_apps/guides/migrations/0002_remove_guide_category.py b/app/unused_apps/guides/migrations/0002_remove_guide_category.py deleted file mode 100644 index 76eefa6..0000000 --- a/app/unused_apps/guides/migrations/0002_remove_guide_category.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.7 on 2019-07-04 12:05 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('guides', '0001_initial'), - ] - - operations = [ - migrations.RemoveField( - model_name='guide', - name='category', - ), - ] diff --git a/app/unused_apps/guides/migrations/0003_guide_category.py b/app/unused_apps/guides/migrations/0003_guide_category.py deleted file mode 100644 index 82d03ac..0000000 --- a/app/unused_apps/guides/migrations/0003_guide_category.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.1.7 on 2019-09-08 17:45 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('taxonomy', '0001_initial'), - ('guides', '0002_remove_guide_category'), - ] - - operations = [ - migrations.AddField( - model_name='guide', - name='category', - field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='taxonomy.Category'), - preserve_default=False, - ), - ] diff --git a/app/unused_apps/guides/migrations/0004_auto_20190914_0646.py b/app/unused_apps/guides/migrations/0004_auto_20190914_0646.py deleted file mode 100644 index ccd79a5..0000000 --- a/app/unused_apps/guides/migrations/0004_auto_20190914_0646.py +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by Django 2.1.7 on 2019-09-14 06:46 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('guides', '0003_guide_category'), - ] - - operations = [ - migrations.RenameField( - model_name='guide', - old_name='afterword', - new_name='epilogue_html', - ), - migrations.RenameField( - model_name='guide', - old_name='afterword_html', - new_name='epilogue_markdown', - ), - migrations.RenameField( - model_name='guide', - old_name='preamble_html', - new_name='prologue_html', - ), - migrations.RenameField( - model_name='guide', - old_name='preamble_markdown', - new_name='prologue_markdown', - ), - migrations.RemoveField( - model_name='guide', - name='essays', - ), - migrations.AddField( - model_name='guide', - name='disclaimer', - field=models.BooleanField(blank=True, default=False), - ), - migrations.AddField( - model_name='guide', - name='post_type', - field=models.IntegerField(choices=[(0, 'guide'), (1, 'review')], default=0), - ), - ] diff --git a/app/unused_apps/guides/migrations/0005_remove_guide_category.py b/app/unused_apps/guides/migrations/0005_remove_guide_category.py deleted file mode 100644 index 71d0280..0000000 --- a/app/unused_apps/guides/migrations/0005_remove_guide_category.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.7 on 2019-09-14 07:08 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('guides', '0004_auto_20190914_0646'), - ] - - operations = [ - migrations.RemoveField( - model_name='guide', - name='category', - ), - ] diff --git a/app/unused_apps/guides/migrations/__init__.py b/app/unused_apps/guides/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/guides/models.py b/app/unused_apps/guides/models.py deleted file mode 100644 index 8704887..0000000 --- a/app/unused_apps/guides/models.py +++ /dev/null @@ -1,136 +0,0 @@ -from django.contrib.gis.db import models -from django.urls import reverse -from django.contrib.sitemaps import Sitemap -import datetime -from itertools import chain - -from taggit.managers import TaggableManager - -from taxonomy.models import TaggedItems, Category -from utils.util import render_images, markdown_to_html -from fieldnotes.models import FieldNote -from books.models import Book -from locations.models import Location -from photos.models import LuxImage -from essays.models import Essay -from jrnl.models import Entry - - -class Guide(models.Model): - title = models.CharField(max_length=200) - sub_title = models.CharField(max_length=200, blank=True) - dek = models.TextField(blank=True) - prologue_markdown = models.TextField(blank=True) - prologue_html = models.TextField(blank=True) - body_markdown = models.TextField() - body_html = models.TextField(blank=True) - epilogue_markdown = models.TextField(blank=True) - epilogue_html = models.TextField(blank=True) - slug = models.SlugField(unique_for_date='pub_date') - pub_date = models.DateTimeField('Date published') - last_updated = models.DateTimeField(auto_now=True) - enable_comments = models.BooleanField(default=False) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - POST_TYPE = ( - (0, 'guide'), - (1, 'review'), - ) - post_type = models.IntegerField(choices=POST_TYPE, default=0) - meta_description = models.CharField(max_length=256, null=True, blank=True) - tags = TaggableManager(through=TaggedItems, blank=True, help_text='Topics Covered') - featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) - point = models.PointField(null=True, blank=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True) - has_video = models.BooleanField(blank=True, default=False) - disclaimer = models.BooleanField(blank=True, default=False) - field_notes = models.ManyToManyField(FieldNote, blank=True) - books = models.ManyToManyField(Book, blank=True) - jrnl = models.ManyToManyField(Entry, blank=True) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - verbose_name_plural = 'Guides' - - def __str__(self): - return self.title - - def get_absolute_url(self): - if self.post_type == 0: - return reverse('guide:guide-detail', kwargs={"slug": self.slug}) - if self.post_type == 1: - return reverse('review:review-detail', kwargs={"slug": self.slug}) - - def comment_period_open(self): - return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - def save(self, *args, **kwargs): - created = self.pk is None - if not created: - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - self.prologue_html = markdown_to_html(self.prologue_markdown) - self.epilogue_html = markdown_to_html(self.epilogue_markdown) - self.has_video = parse_video(self.body_html) - if self.point: - try: - self.location = Location.objects.filter(geometry__contains=self.point).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - if created and not self.featured_image: - self.featured_image = LuxImage.objects.latest() - old = type(self).objects.get(pk=self.pk) if self.pk else None - if old and old.featured_image != self.featured_image: # Field has changed - s = LuxImageSize.objects.get(name="featured_jrnl") - ss = LuxImageSize.objects.get(name="picwide-med") - self.featured_image.sizes.add(s) - self.featured_image.sizes.add(ss) - self.featured_image.save() - super(Guide, self).save(*args, **kwargs) - - -class GuideSitemap(Sitemap): - changefreq = "never" - priority = 1.0 - protocol = "https" - - def items(self): - return Guide.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/guides/review_urls.py b/app/unused_apps/guides/review_urls.py deleted file mode 100644 index 7048065..0000000 --- a/app/unused_apps/guides/review_urls.py +++ /dev/null @@ -1,18 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "review" - -urlpatterns = [ - path( - r'', - views.GuideDetailView.as_view(), - name="review-detail" - ), - path( - r'.txt', - views.GuideDetailViewTXT.as_view(), - name="review-detail-txt" - ), -] diff --git a/app/unused_apps/guides/templates/guides/guide_detail.html b/app/unused_apps/guides/templates/guides/guide_detail.html deleted file mode 100644 index 1ef602a..0000000 --- a/app/unused_apps/guides/templates/guides/guide_detail.html +++ /dev/null @@ -1,176 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load comments %} -{%block htmlclass%}class="detail single"{%endblock%} -{% block pagetitle %}{{object.title|title|smartypants|safe}} - by Scott Gilbertson{% endblock %} - -{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %} -{%block extrahead%} -{% if object.has_code %} - -{%endif %} - - - - - - - - - - - - - - - {% if object.featured_image %} - {%endif%} - -{%endblock%} - -{%block bodyid %}{% if object.get_post_type_display == 'tools' %}class="src"{% endif %}{%endblock%} - -{% block primary %} -
-
-
-

{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

-

{{object.sub_title|smartypants|safe}}

-
- {% if object.originally_published_by %}

Originally Published By: {{object.originally_published_by}}

{%endif%} - {% if object.location %}
-

{% if object.location.country_name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.location.state_name|safe}}, U.S.{%else%}{{object.location.name|smartypants|safe}}, {{object.location.country_name|safe}}{%endif%}

- – Map -
{%endif%} - - -
-
-
- {% if object.preamble %}
- {{object.preamble_html|smartypants|safe}} -
{%endif%} - {{object.body_html|safe|smartypants}} -
- {% if object.afterword_html %}
-

Afterward

- {{object.afterword_html|smartypants|safe}} -
{%endif%} - {%if wildlife or object.field_notes.all or object.books.all %}{%endif%} -
- - {% comment %}
-
If you enjoyed this, you should join the mailing list…
- {% include 'mailing_list.html' %} -
{% endcomment %} -
- {% if object.enable_comments %} -{% get_comment_count for object as comment_count %} -{%if comment_count > 0 %} -

{{comment_count}} Comment{{ comment_count|pluralize }}

-{% render_comment_list for object %} -{%endif%} -{% render_comment_form for object %} -{% else %} -

Sorry, comments have been disabled for this post.

-{%endif%} -{% endblock %} -{% block js %} - -{%endblock%} diff --git a/app/unused_apps/guides/templates/guides/guide_detail.txt b/app/unused_apps/guides/templates/guides/guide_detail.txt deleted file mode 100644 index 547ce79..0000000 --- a/app/unused_apps/guides/templates/guides/guide_detail.txt +++ /dev/null @@ -1,8 +0,0 @@ -{{object.title|safe}} -{% for letter in object.title %}={%endfor%} - - by Scott Gilbertson - <{{SITE_URL}}{{object.get_absolute_url}}> - {{object.pub_date|date:"l, d F Y"}} - -{{object.body_markdown|safe}} diff --git a/app/unused_apps/guides/templates/guides/guide_list.html b/app/unused_apps/guides/templates/guides/guide_list.html deleted file mode 100644 index a264a11..0000000 --- a/app/unused_apps/guides/templates/guides/guide_list.html +++ /dev/null @@ -1,40 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load html5_datetime %} -{% load pagination_tags %} -{% block pagetitle %}Guides for the Perplexed{% endblock %} -{% block metadescription %}Guides for fellow travelers: tools, tips, and tricks to make life on the road easier.{% endblock %} - -{% block primary %} -
-
-

Guides for fellow travelers

-

The less stuff you travel with the better off you will be, up to a point. But where is that point? What's enough? What's too much? That point is what I'm trying to discover here.

-

What do you really need? What's worth having? What's not?

-

Topics include {% for topic in topic_list %}{{topic}}, {% endfor %}travel, cooking, photography, writing, simplicity, and once, coffee.

-
-

Guides

- {% autopaginate object_list 30 %} - -
-{%endblock%} diff --git a/app/unused_apps/guides/urls.py b/app/unused_apps/guides/urls.py deleted file mode 100644 index c91a5b5..0000000 --- a/app/unused_apps/guides/urls.py +++ /dev/null @@ -1,34 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "guides" - -urlpatterns = [ - path( - r'', - views.GuideListView.as_view(), - {'page': 1}, - name="list" - ), - path( - r'/', - views.GuideListView.as_view(), - name="list" - ), - path( - r'/', - views.GuideDetailView.as_view(), - name="detail" - ), - path( - r'/', - views.GuideDetailViewTXT.as_view(), - name="detail-txt" - ), - path( - r'', - views.GuideCatListView.as_view(), - name="list-cat" - ), -] diff --git a/app/unused_apps/guides/views.py b/app/unused_apps/guides/views.py deleted file mode 100644 index 01dc974..0000000 --- a/app/unused_apps/guides/views.py +++ /dev/null @@ -1,62 +0,0 @@ -from django.views.generic import ListView -from django.views.generic.detail import DetailView -from django.contrib.syndication.views import Feed - -from utils.views import PaginatedListView - -from .models import Guide - - -class GuideListView(PaginatedListView): - model = Guide - - def get_queryset(self, **kwargs): - qs = Guide.objects.filter(status=1) - return qs - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(GuideListView, self).get_context_data(**kwargs) - context['topic_list'] = Guide.tags.all() - return context - - -class GuideCatListView(GuideListView): - model = Guide - - def get_queryset(self, **kwargs): - cat = Category.objects.get(slug=self.kwargs['slug']) - qs = Guide.objects.filter(status=1, tags=cat) - return qs - -class GuideDetailView(DetailView): - model = Guide - - -class GuideDetailViewTXT(GuideDetailView): - template_name = "essays/entry_detail.txt" - - -''' -class TopicListView(ListView): - template_name = 'archives/src_home.html' - - def queryset(self): - return Post.objects.filter(topics__slug=self.kwargs['slug']) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(TopicListView, self).get_context_data(**kwargs) - context['topic'] = Topic.objects.get(slug__exact=self.kwargs['slug']) - return context - - -class SrcRSSFeedView(Feed): - title = "luxagraf:src Code and Technology" - link = "/src/" - description = "Latest postings to luxagraf.net/src" - description_template = 'feeds/blog_description.html' - - def items(self): - return Post.objects.filter(status__exact=1).order_by('-pub_date')[:10] -''' diff --git a/app/unused_apps/income/__init__.py b/app/unused_apps/income/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/income/admin.py b/app/unused_apps/income/admin.py deleted file mode 100644 index b165371..0000000 --- a/app/unused_apps/income/admin.py +++ /dev/null @@ -1,88 +0,0 @@ -import datetime -from django.contrib import admin -from django.db.models import Sum -from django.contrib.gis.admin import OSMGeoAdmin -from django.conf.urls import url -from django.shortcuts import render - - -from .models import Gig, Invoice, InvoiceItem - - -@admin.register(InvoiceItem) -class InvoiceItemAdmin(admin.ModelAdmin): - list_display = ('time_start', 'time_end', 'work_done') - - -@admin.register(Invoice) -class InvoiceAdmin(admin.ModelAdmin): - list_display = ('title', 'admin_link', 'date_start', 'date_end') - - -@admin.register(Gig) -class GigAdmin(OSMGeoAdmin): - list_display = ('title', 'status', 'due_date', 'payment_status', 'payment', 'publisher', 'word_count') - list_filter = ('publisher', 'status', 'payment_status') - fieldsets = ( - ('Gig', { - 'fields': ( - 'title', - 'pitch', - ('created', 'due_date'), - ('payment', 'pay_type', 'payment_status', 'invoice_date'), - ('status', 'pub_date', 'word_count'), - 'publisher', - 'pub_item' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - - def get_urls(self): - urls = super(GigAdmin, self).get_urls() - custom_urls = [ - url( - r'^monthly/$', - self.admin_site.admin_view(self.get_monthly), - name='monthly_admin' - ) - ] - return custom_urls + urls - - def get_monthly(self, request): - context = { - 'title': ("This month's income"), - 'app_label': self.model._meta.app_label, - 'opts': self.model._meta, - 'has_change_permission': self.has_change_permission(request) - } - try: - year = request.GET["m"].split("-")[0] - month = request.GET["m"].split("-")[1] - except: - year = datetime.datetime.now().strftime('%Y') - month = datetime.datetime.now().strftime('%m') - qs = self.model.objects.filter( - created__year=year, - created__month=month, - status__in=[1, 2, 3] - ) - context['pitched'] = self.model.objects.filter( - created__year=year, - created__month=month, - status=0 - ) - context['date'] = datetime.datetime.now() - context['billed'] = qs.filter(payment_status=1) - context['billed_total'] = qs.filter(payment_status=1).aggregate(total_payment=Sum('payment')) - context['unbilled'] = qs.filter(payment_status=0) - context['unbilled_total'] = qs.filter(payment_status=0).aggregate(total_payment=Sum('payment')) - context['total_outstanding'] = qs.aggregate(total_payment=Sum('payment')) - context['months'] = self.model.objects.dates('created', 'month') - return render(request, 'admin/income_month.html', context) - diff --git a/app/unused_apps/income/migrations/0001_initial.py b/app/unused_apps/income/migrations/0001_initial.py deleted file mode 100644 index 3a1e926..0000000 --- a/app/unused_apps/income/migrations/0001_initial.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-02-10 08:48 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('resume', '0003_auto_20151211_1925'), - ] - - operations = [ - migrations.CreateModel( - name='Gig', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('pitch', models.TextField(blank=True, null=True)), - ('created', models.DateTimeField(default=django.utils.timezone.now)), - ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), - ('status', models.IntegerField(choices=[(0, 'Pitched'), (1, 'Accepted'), (2, 'Submitted'), (3, 'Published'), (4, 'Rejected'), (5, 'TO PITCH')], default=1)), - ('invoice_date', models.DateTimeField(blank=True, null=True)), - ('payment', models.DecimalField(decimal_places=2, max_digits=10)), - ('payment_status', models.IntegerField(choices=[(0, 'NOT SUBMITTED'), (1, 'Invoiced'), (2, 'Paid')], default=1)), - ('pay_type', models.IntegerField(choices=[(0, 'Flat Rate'), (1, 'Per Word'), (2, 'Hourly')], default=1)), - ('word_count', models.DecimalField(blank=True, decimal_places=0, max_digits=7, null=True)), - ('pub_item', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='resume.PubItem')), - ('publisher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='resume.Publisher')), - ], - ), - ] diff --git a/app/unused_apps/income/migrations/0002_gig_due_date.py b/app/unused_apps/income/migrations/0002_gig_due_date.py deleted file mode 100644 index ccd0f73..0000000 --- a/app/unused_apps/income/migrations/0002_gig_due_date.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-02-10 08:49 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('income', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='gig', - name='due_date', - field=models.DateField(default=django.utils.timezone.now), - ), - ] diff --git a/app/unused_apps/income/migrations/0003_auto_20161213_1038.py b/app/unused_apps/income/migrations/0003_auto_20161213_1038.py deleted file mode 100644 index 559cd5a..0000000 --- a/app/unused_apps/income/migrations/0003_auto_20161213_1038.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-13 10:38 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('income', '0002_gig_due_date'), - ] - - operations = [ - migrations.AlterField( - model_name='gig', - name='due_date', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='gig', - name='pub_date', - field=models.DateTimeField(blank=True, null=True), - ), - ] diff --git a/app/unused_apps/income/migrations/0004_invoice_invoiceitem.py b/app/unused_apps/income/migrations/0004_invoice_invoiceitem.py deleted file mode 100644 index 59f389c..0000000 --- a/app/unused_apps/income/migrations/0004_invoice_invoiceitem.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.1 on 2018-09-03 17:58 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('income', '0003_auto_20161213_1038'), - ] - - operations = [ - migrations.CreateModel( - name='Invoice', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('date_start', models.DateField(blank=True, null=True)), - ('date_end', models.DateField(blank=True, null=True)), - ], - ), - migrations.CreateModel( - name='InvoiceItem', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time_start', models.DateTimeField(blank=True, null=True)), - ('time_end', models.DateTimeField(blank=True, null=True)), - ('work_done', models.TextField(blank=True, null=True)), - ], - ), - ] diff --git a/app/unused_apps/income/migrations/0005_invoice_slug.py b/app/unused_apps/income/migrations/0005_invoice_slug.py deleted file mode 100644 index 3b6dfb2..0000000 --- a/app/unused_apps/income/migrations/0005_invoice_slug.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.1.1 on 2018-09-03 19:02 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('income', '0004_invoice_invoiceitem'), - ] - - operations = [ - migrations.AddField( - model_name='invoice', - name='slug', - field=models.SlugField(default='slug'), - preserve_default=False, - ), - ] diff --git a/app/unused_apps/income/migrations/0006_auto_20190131_2351.py b/app/unused_apps/income/migrations/0006_auto_20190131_2351.py deleted file mode 100644 index 1c8f64c..0000000 --- a/app/unused_apps/income/migrations/0006_auto_20190131_2351.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 23:51 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('income', '0005_invoice_slug'), - ] - - operations = [ - migrations.AlterModelOptions( - name='invoiceitem', - options={'ordering': ('time_start',)}, - ), - ] diff --git a/app/unused_apps/income/migrations/__init__.py b/app/unused_apps/income/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/income/models.py b/app/unused_apps/income/models.py deleted file mode 100644 index e5a351b..0000000 --- a/app/unused_apps/income/models.py +++ /dev/null @@ -1,103 +0,0 @@ -import datetime -from datetime import timedelta -from django.db import models -from django.utils import timezone -from django.urls import reverse -from django.utils.html import format_html - -from resume.models import PubItem, Publisher - - -class Gig(models.Model): - title = models.CharField(max_length=200) - pitch = models.TextField(null=True, blank=True) - created = models.DateTimeField(default=timezone.now) - pub_date = models.DateTimeField(blank=True, null=True) - due_date = models.DateField(blank=True, null=True) - STATUS = ( - (0, "Pitched"), - (1, "Accepted"), - (2, "Submitted"), - (3, "Published"), - (4, "Rejected"), - (5, "TO PITCH"), - ) - status = models.IntegerField(choices=STATUS, default=1) - invoice_date = models.DateTimeField(null=True, blank=True) - payment = models.DecimalField(max_digits=10, decimal_places=2) - PAY_STATUS = ( - (0, "NOT SUBMITTED"), - (1, "Invoiced"), - (2, "Paid"), - ) - payment_status = models.IntegerField(choices=PAY_STATUS, default=1) - PAY_TYPE = ( - (0, "Flat Rate"), - (1, "Per Word"), - (2, "Hourly"), - ) - pay_type = models.IntegerField(choices=PAY_TYPE, default=1) - word_count = models.DecimalField(max_digits=7, decimal_places=0, blank=True, null=True) - publisher = models.ForeignKey(Publisher, on_delete=models.CASCADE, blank=True, null=True) - pub_item = models.ForeignKey(PubItem, on_delete=models.CASCADE, blank=True, null=True) - - def __str__(self): - return self.title - - def get_pay_date(self): - days = self.publisher.payment_time * 7 - if self.invoice_date: - return self.invoice_date + datetime.timedelta(float(days)) - - -class Invoice(models.Model): - title = models.CharField(max_length=200) - slug = models.SlugField() - date_start = models.DateField(null=True, blank=True) - date_end = models.DateField(null=True, blank=True) - - def __str__(self): - return self.title - - def admin_link(self): - return format_html('View Invoice' % (self.slug)) - admin_link.short_description = 'Invoice' - - -class InvoiceItem(models.Model): - time_start = models.DateTimeField(null=True, blank=True) - time_end = models.DateTimeField(null=True, blank=True) - work_done = models.TextField(null=True, blank=True) - - class Meta: - ordering = ('time_start',) - - def __str__(self): - return str(self.time_start) - - @property - def total(self): - return self.time_end - self.time_start - - @property - def rounded_total(self): - """ - Rounds the given timedelta by the given timedelta period - :param td: `timedelta` to round - :param period: `timedelta` period to round by. - """ - period = timedelta(minutes=15) - td = self.total - period_seconds = period.total_seconds() - half_period_seconds = period_seconds / 2 - remainder = td.total_seconds() % period_seconds - if remainder >= half_period_seconds: - tdr = timedelta(seconds=td.total_seconds() + (period_seconds - remainder)) - hours, remainder = divmod(tdr.total_seconds(), 3600) - r = remainder/3600 - return float(hours)+r - else: - tdr = timedelta(seconds=td.total_seconds() - remainder) - hours, remainder = divmod(tdr.total_seconds(), 3600) - r = remainder/3600 - return float(hours)+r diff --git a/app/unused_apps/income/parser.py b/app/unused_apps/income/parser.py deleted file mode 100644 index b19d039..0000000 --- a/app/unused_apps/income/parser.py +++ /dev/null @@ -1,23 +0,0 @@ -import csv -import datetime -from .models import InvoiceItem - - -def read_timesheet(): - with open('timesheet.csv', newline='') as csvfile: - reader = csv.reader(csvfile, delimiter=';') - counter = 0 - f = "%Y-%m-%d %H:%M:%S" - for row in reader: - if counter > 0: - print(row[4]) - timer = row[0]+' '+row[1] - timerer = row[0]+' '+row[2] - time_start = datetime.datetime.strptime(timer, f) - time_end = datetime.datetime.strptime(timerer, f) - InvoiceItem.objects.get_or_create( - time_start=time_start, - time_end=time_end, - work_done=row[4] - ) - counter = counter + 1 diff --git a/app/unused_apps/income/views.py b/app/unused_apps/income/views.py deleted file mode 100644 index 1c34068..0000000 --- a/app/unused_apps/income/views.py +++ /dev/null @@ -1,53 +0,0 @@ -import datetime -from django.views.generic.detail import DetailView -from django.template.loader import render_to_string -from django.http import HttpResponse -from django.conf import settings - -#from weasyprint import HTML, CSS - -from .models import Invoice, InvoiceItem - - -class MonthlyInvoiceView(DetailView): - model = Invoice - template_name = "admin/income/monthly.html" - slug_field = "slug" - - def get_context_data(self, **kwargs): - context = super(MonthlyInvoiceView, self).get_context_data(**kwargs) - context['object_list'] = InvoiceItem.objects.filter(time_start__range=[self.object.date_start, self.object.date_end]) - total_time = [] - for item in context['object_list']: - total_time.append(item.rounded_total) - hours = (sum(total_time)) - context['total_hours'] = hours - context['total_billed'] = int(hours * 100) - context['invoice_number'] = self.object.id+21 - return context - - -class DownloadMonthlyInvoiceView(MonthlyInvoiceView): - model = Invoice - slug_field = "slug" - - def get(self, *args, **kwargs): - import logging - logger = logging.getLogger('weasyprint') - logger.addHandler(logging.FileHandler('weasyprint.log')) - self.object = self.get_object() # assign the object to the view - context = self.get_context_data() - c = { - 'object': self.object, - 'object_list': context['object_list'], - 'total_hours': context['total_hours'], - 'total_billed': context['total_billed'], - 'invoice_number': self.object.id+23 - } - t = render_to_string('details/invoice.html', c).encode('utf-8') - #html = HTML(string=t, base_url=self.request.build_absolute_uri()) - #pdf = html.write_pdf(stylesheets=[CSS(settings.MEDIA_ROOT + '/pdf_gen.css')], presentational_hints=True) - #response = HttpResponse(pdf, content_type='application/pdf') - #response['Content-Disposition'] = 'inline; filename="invoice.pdf"' - response = HttpResponse('', content_type='application/pdf') - return response diff --git a/app/unused_apps/jrnl/__init__.py b/app/unused_apps/jrnl/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/jrnl/admin.py b/app/unused_apps/jrnl/admin.py deleted file mode 100644 index 32ef69b..0000000 --- a/app/unused_apps/jrnl/admin.py +++ /dev/null @@ -1,129 +0,0 @@ -from django.contrib import admin -from django import forms -from django.contrib.gis.admin import OSMGeoAdmin -from django.contrib.contenttypes.admin import GenericStackedInline - -from utils.widgets import AdminImageWidget, LGEntryForm -from .models import Entry, HomepageCurrator, Home #, RelatedPost - -from photos.forms import GalleryForm -from photos.models import LuxImage -from utils.util import get_latlon - - -#@admin.register(RelatedPost) -#class RelatedPostAdmin(admin.ModelAdmin): -# pass - - -@admin.register(Entry) -class EntryAdmin(OSMGeoAdmin): - form = LGEntryForm - - def get_queryset(self, request): - test_model_qs = super(EntryAdmin, self).get_queryset(request) - test_model_qs = test_model_qs.prefetch_related('related').prefetch_related('books') - - return test_model_qs - - def render_change_form(self, request, context, *args, **kwargs): - #context['adminform'].form.fields['featured_image'].queryset = LuxImage.objects.all()[:200] - return super(EntryAdmin, self).render_change_form(request, context, *args, **kwargs) - - def formfield_for_dbfield(self, db_field, **kwargs): - if db_field.name == 'thumbnail' or db_field.name == 'image': - field = forms.FileField(widget=AdminImageWidget) - elif db_field.name == 'meta_description': - field = forms.CharField(widget=forms.Textarea(attrs={'rows': 4, 'cols': 75})) - field.required = False - else: - field = super(EntryAdmin, self).formfield_for_dbfield(db_field, **kwargs) - return field - - list_display = ('title', 'pub_date', 'template_name', 'status', 'location', 'photo_gallery') - search_fields = ['title', 'body_markdown'] - prepopulated_fields = {"slug": ('title',)} - list_filter = ('pub_date', 'enable_comments', 'status', 'location__state__country__lux_region') - filter_horizontal = ('field_notes', 'books', 'related') - fieldsets = ( - ('Entry', { - 'fields': ( - 'title', - 'subtitle', - 'body_markdown', - ('pub_date', 'status'), - 'slug', - 'point' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ('Formatting data', { - 'fields': ( - 'dek', - 'meta_description', - 'template_name', - 'enable_comments', - 'featured_image', - ), - }), - ('Extra', { - 'fields': ( - 'field_notes', - #'old_field_notes', - 'books', - 'related', - #'oldrelated', - ), - 'classes': ( - 'collapse', - 'extrapretty', - 'wide' - ) - }), - ) - # options for OSM map Using custom ESRI topo map - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 10 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - openlayers_url = '/static/admin/js/OpenLayers.js' - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - css = { - "all": ("my_styles.css",) - } - - -@admin.register(HomepageCurrator) -class HomepageCurratorAdmin(admin.ModelAdmin): - form = GalleryForm - filter_horizontal = ('popular',) - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - css = { - "all": ("my_styles.css",) - } - - -@admin.register(Home) -class HomeAdmin(admin.ModelAdmin): - form = LGEntryForm - filter_horizontal = ('popular',) - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - css = { - "all": ("my_styles.css",) - } diff --git a/app/unused_apps/jrnl/build.py b/app/unused_apps/jrnl/build.py deleted file mode 100644 index dcebace..0000000 --- a/app/unused_apps/jrnl/build.py +++ /dev/null @@ -1,100 +0,0 @@ -from django.urls import reverse -from django.apps import apps -from builder.base import BuildNew -from itertools import chain - -from django.conf import settings - - -class BuildJrnl(BuildNew): - - def build(self): - self.build_list_view( - base_path=reverse("jrnl:list"), - paginate_by=24 - ) - self.build_year_view("jrnl:list_year") - self.build_month_view("jrnl:list_month") - self.build_detail_view() - self.build_location_view() - self.build_feed("jrnl:feed") - self.build_latest() - - def build_arc(self): - self.build_list_view( - base_path=reverse("jrnl:list"), - paginate_by=24 - ) - self.build_year_view("jrnl:list_year") - self.build_month_view("jrnl:list_month") - self.build_location_view() - - def build_location_view(self): - c = apps.get_model('locations', 'Country') - r = apps.get_model('locations', 'Region') - countries = c.objects.filter(visited=True) - regions = r.objects.all() - locations = list(chain(countries, regions)) - for c in locations: - try: - qs = self.model.objects.filter( - status__exact=1, - location__state__country=c - ) - except: - qs = self.model.objects.filter( - status__exact=1, - location__state__country__lux_region=c.id - ) - print(c) - pages = self.get_pages(qs, 24) - for page in range(pages): - base_path = reverse("jrnl:list_country", kwargs={'slug': c.slug, 'page': page + 1}) - response = self.client.get(base_path) - print(response.content) - if page == 0: - self.write_file(base_path, response.content) - else: - self.write_file(base_path, response.content) - - def build_homepage(self): - response = self.client.get('/') - self.write_file('', response.content) - - def build_latest(self): - response = self.client.get('/jrnl/latest/') - self.write_file(reverse("jrnl:latest"), response.content) - - def build_map(self): - self.build_list_view( - base_path=reverse("map:maplist"), - paginate_by=1000000 - ) - response = self.client.get(reverse("map:mapdata")) - self.write_file("media/js/mainmap", response.content, 'js', '') - - -def archive_builder(): - j = BuildJrnl("jrnl", "entry") - j.build_arc() - - -def detail_builder(): - j = BuildJrnl("jrnl", "entry") - j.build_latest() - j.build_detail_view() - - -def home_builder(): - j = BuildJrnl("jrnl", "entry") - j.build_homepage() - - -def rss_builder(): - j = BuildJrnl("jrnl", "entry") - j.build_feed("jrnl:feed") - - -def map_builder(): - j = BuildJrnl("jrnl", "entry") - j.build_map() diff --git a/app/unused_apps/jrnl/export.py b/app/unused_apps/jrnl/export.py deleted file mode 100644 index 6407491..0000000 --- a/app/unused_apps/jrnl/export.py +++ /dev/null @@ -1,20 +0,0 @@ -from django.template.loader import render_to_string -from django.template import Context - - -def write_file(entry): - body = '' - lines = entry.body_markdown.split('\n') - for line in lines: - if line.strip(): - if line.startswith(''): - pass - else: - body += line.strip()+'\n\n' - img = entry.image.name[19:] - c = Context({'object': entry, 'body': body, 'image': img},) - t = render_to_string('details/jrnl-export.html', c).encode('utf-8') - filepath = 'temp/%s-%s.txt' % (entry.pub_date.strftime("%Y-%m-%d").lower(), entry.slug) - f = open(filepath, 'wb') - f.write(t) - f.close() diff --git a/app/unused_apps/jrnl/fields.py b/app/unused_apps/jrnl/fields.py deleted file mode 100644 index 8df2f5e..0000000 --- a/app/unused_apps/jrnl/fields.py +++ /dev/null @@ -1,7 +0,0 @@ -from django import forms - -from .widgets import AdminImageWidget - - -class FileUploadForm(forms.ModelForm): - upload = forms.FileField(widget=AdminImageWidget) diff --git a/app/unused_apps/jrnl/migrations/0001_initial.py b/app/unused_apps/jrnl/migrations/0001_initial.py deleted file mode 100644 index a3660ab..0000000 --- a/app/unused_apps/jrnl/migrations/0001_initial.py +++ /dev/null @@ -1,75 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-09 10:13 -from __future__ import unicode_literals - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import jrnl.models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - #('locations', '__first__'), - ('photos', '0003_luxgallery_caption_style'), - ] - - operations = [ - migrations.CreateModel( - name='Entry', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('dek', models.TextField(blank=True, null=True)), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('enable_comments', models.BooleanField(default=False)), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)), - ('image', models.FileField(blank=True, help_text='should be 205px high', null=True, upload_to=jrnl.models.get_upload_path)), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('template_name', models.IntegerField(choices=[(0, 'single'), (1, 'double'), (2, 'single-dark'), (3, 'double-dark'), (4, 'bigimg'), (5, 'bigimg-dark')], default=0)), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('photo_gallery', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.PhotoGallery', verbose_name='photo set')), - ], - options={ - 'verbose_name_plural': 'entries', - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date',), - }, - ), - migrations.CreateModel( - name='EntryAside', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('body', models.TextField(blank=True, null=True)), - ('entry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jrnl.Entry')), - ], - ), - migrations.CreateModel( - name='HomepageCurrator', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('alt_text', models.CharField(max_length=200)), - ('image_base_url', models.CharField(max_length=200)), - ('tag_line', models.CharField(max_length=200)), - ('template_name', models.CharField(help_text='full path', max_length=200)), - ('banner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='banner', to='jrnl.Entry')), - ('entry_list', models.ManyToManyField(to='jrnl.Entry')), - ], - ), - migrations.CreateModel( - name='PostImage', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=100)), - ('image', models.ImageField(upload_to='/Users/sng/Sites/luxagraf/site/media/images/2016')), - ], - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0001_squashed_0019_remove_entry_thumbnail.py b/app/unused_apps/jrnl/migrations/0001_squashed_0019_remove_entry_thumbnail.py deleted file mode 100644 index 7b1b247..0000000 --- a/app/unused_apps/jrnl/migrations/0001_squashed_0019_remove_entry_thumbnail.py +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by Django 2.0.1 on 2018-07-07 15:30 - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import jrnl.models - - -class Migration(migrations.Migration): - - replaces = [('jrnl', '0001_initial'), ('jrnl', '0002_entrytitlesong'), ('jrnl', '0003_auto_20160309_1018'), ('jrnl', '0004_auto_20160309_1031'), ('jrnl', '0005_auto_20160514_2151'), ('jrnl', '0006_auto_20160715_0703'), ('jrnl', '0007_delete_postimage'), ('jrnl', '0008_auto_20160906_0845'), ('jrnl', '0009_homepagecurrator_image_offset_vertical'), ('jrnl', '0010_auto_20161102_0916'), ('jrnl', '0011_auto_20161102_0925'), ('jrnl', '0012_auto_20161102_0930'), ('jrnl', '0013_entry_featured_image'), ('jrnl', '0014_homepagecurrator'), ('jrnl', '0015_entry_has_video'), ('jrnl', '0016_auto_20161219_1058'), ('jrnl', '0017_entry_field_notes'), ('jrnl', '0018_auto_20180303_1037'), ('jrnl', '0019_remove_entry_thumbnail')] - - initial = True - - dependencies = [ - ('photos', '0016_auto_20161022_1411'), - ('books', '0005_auto_20171214_2239'), - ('photos', '0010_auto_20160517_0906'), - ('photos', '0003_luxgallery_caption_style'), - ] - - operations = [ - migrations.CreateModel( - name='Entry', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('dek', models.TextField(blank=True, null=True)), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('enable_comments', models.BooleanField(default=False)), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)), - ('image', models.FileField(blank=True, help_text='should be 205px high by 364px wide', null=True, upload_to=jrnl.models.get_upload_path)), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('template_name', models.IntegerField(choices=[(0, 'single'), (1, 'double'), (2, 'single-dark'), (3, 'double-dark'), (4, 'single-black'), (5, 'double-black')], default=0)), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('photo_gallery', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.PhotoGallery', verbose_name='photo set')), - ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.LuxImage')), - ], - options={ - 'verbose_name_plural': 'entries', - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date',), - }, - ), - migrations.CreateModel( - name='HomepageCurrator', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('image_offset_vertical', models.CharField(help_text='add negative top margin to shift image (include css unit)', max_length=20)), - ('tag_line', models.CharField(max_length=200)), - ('template_name', models.CharField(help_text='full path', max_length=200)), - ('featured', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='banner', to='jrnl.Entry')), - ('images', models.ManyToManyField(to='photos.LuxImage')), - ('popular', models.ManyToManyField(to='jrnl.Entry')), - ], - ), - migrations.AddField( - model_name='entry', - name='has_video', - field=models.BooleanField(default=False), - ), - migrations.AlterField( - model_name='entry', - name='image', - field=models.FileField(blank=True, help_text='should be 520 by 290', null=True, upload_to=jrnl.models.get_upload_path), - ), - migrations.AddField( - model_name='entry', - name='field_notes', - field=models.ManyToManyField(blank=True, to='fieldnotes.FieldNote'), - ), - migrations.AddField( - model_name='entry', - name='books', - field=models.ManyToManyField(blank=True, to='books.Book'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0002_entrytitlesong.py b/app/unused_apps/jrnl/migrations/0002_entrytitlesong.py deleted file mode 100644 index 66a75a6..0000000 --- a/app/unused_apps/jrnl/migrations/0002_entrytitlesong.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-09 10:13 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='EntryTitleSong', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('pub_date', models.DateField(verbose_name='Date published')), - ('entry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jrnl.Entry')), - ], - options={ - 'ordering': ('-pub_date',), - 'get_latest_by': 'pub_date', - 'verbose_name_plural': 'Entry Title Songs', - }, - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0003_auto_20160309_1018.py b/app/unused_apps/jrnl/migrations/0003_auto_20160309_1018.py deleted file mode 100644 index 49a3f6f..0000000 --- a/app/unused_apps/jrnl/migrations/0003_auto_20160309_1018.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-09 10:18 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0002_entrytitlesong'), - ] - - operations = [ - migrations.AddField( - model_name='entrytitlesong', - name='album', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AddField( - model_name='entrytitlesong', - name='band', - field=models.CharField(default='none', max_length=200), - preserve_default=False, - ), - migrations.AddField( - model_name='entrytitlesong', - name='song', - field=models.CharField(blank=True, max_length=200, null=True), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0004_auto_20160309_1031.py b/app/unused_apps/jrnl/migrations/0004_auto_20160309_1031.py deleted file mode 100644 index 33bbe05..0000000 --- a/app/unused_apps/jrnl/migrations/0004_auto_20160309_1031.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-09 10:31 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0003_auto_20160309_1018'), - ] - - operations = [ - migrations.AddField( - model_name='entrytitlesong', - name='body_markdown', - field=models.TextField(blank=True), - ), - migrations.AddField( - model_name='entrytitlesong', - name='listen_link', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AlterField( - model_name='entrytitlesong', - name='slug', - field=models.SlugField(blank=True, unique_for_date='pub_date'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0005_auto_20160514_2151.py b/app/unused_apps/jrnl/migrations/0005_auto_20160514_2151.py deleted file mode 100644 index 701c8c3..0000000 --- a/app/unused_apps/jrnl/migrations/0005_auto_20160514_2151.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-05-14 21:51 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0004_auto_20160309_1031'), - ] - - operations = [ - migrations.AlterField( - model_name='entrytitlesong', - name='title', - field=models.CharField(blank=True, max_length=200), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0006_auto_20160715_0703.py b/app/unused_apps/jrnl/migrations/0006_auto_20160715_0703.py deleted file mode 100644 index 42efc43..0000000 --- a/app/unused_apps/jrnl/migrations/0006_auto_20160715_0703.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.7 on 2016-07-15 07:03 -from __future__ import unicode_literals - -from django.db import migrations, models -import jrnl.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0010_auto_20160517_0906'), - ('jrnl', '0005_auto_20160514_2151'), - ] - - operations = [ - migrations.AddField( - model_name='homepagecurrator', - name='images', - field=models.ManyToManyField(to='photos.LuxImage'), - ), - migrations.AlterField( - model_name='entry', - name='image', - field=models.FileField(blank=True, help_text='should be 205px high by 364px wide', null=True, upload_to=jrnl.models.get_upload_path), - ), - migrations.AlterField( - model_name='entry', - name='template_name', - field=models.IntegerField(choices=[(0, 'single'), (1, 'double'), (2, 'single-dark'), (3, 'double-dark'), (4, 'single-black'), (5, 'double-black')], default=0), - ), - migrations.AlterField( - model_name='postimage', - name='image', - field=models.ImageField(upload_to='/home/lxf/Sites/luxagraf/site/media/images/2016'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0007_delete_postimage.py b/app/unused_apps/jrnl/migrations/0007_delete_postimage.py deleted file mode 100644 index cc481e8..0000000 --- a/app/unused_apps/jrnl/migrations/0007_delete_postimage.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9.7 on 2016-07-15 07:05 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0006_auto_20160715_0703'), - ] - - operations = [ - migrations.DeleteModel( - name='PostImage', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0008_auto_20160906_0845.py b/app/unused_apps/jrnl/migrations/0008_auto_20160906_0845.py deleted file mode 100644 index 4ac5ebf..0000000 --- a/app/unused_apps/jrnl/migrations/0008_auto_20160906_0845.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-09-06 08:45 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0007_delete_postimage'), - ] - - operations = [ - migrations.RenameField( - model_name='homepagecurrator', - old_name='banner', - new_name='featured', - ), - migrations.RenameField( - model_name='homepagecurrator', - old_name='entry_list', - new_name='popular', - ), - migrations.RemoveField( - model_name='homepagecurrator', - name='alt_text', - ), - migrations.RemoveField( - model_name='homepagecurrator', - name='image_base_url', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py b/app/unused_apps/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py deleted file mode 100644 index 5dfbbad..0000000 --- a/app/unused_apps/jrnl/migrations/0009_homepagecurrator_image_offset_vertical.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-09-06 09:01 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0008_auto_20160906_0845'), - ] - - operations = [ - migrations.AddField( - model_name='homepagecurrator', - name='image_offset_vertical', - field=models.CharField(default='160px', help_text='add negative top margin to shift image (include css unit)', max_length=20), - preserve_default=False, - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0010_auto_20161102_0916.py b/app/unused_apps/jrnl/migrations/0010_auto_20161102_0916.py deleted file mode 100644 index a2d9eb8..0000000 --- a/app/unused_apps/jrnl/migrations/0010_auto_20161102_0916.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-02 09:16 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0009_homepagecurrator_image_offset_vertical'), - ] - - operations = [ - migrations.RemoveField( - model_name='entryaside', - name='entry', - ), - migrations.DeleteModel( - name='EntryAside', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0011_auto_20161102_0925.py b/app/unused_apps/jrnl/migrations/0011_auto_20161102_0925.py deleted file mode 100644 index e11c1ba..0000000 --- a/app/unused_apps/jrnl/migrations/0011_auto_20161102_0925.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-02 09:25 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0010_auto_20161102_0916'), - ] - - operations = [ - migrations.RemoveField( - model_name='entrytitlesong', - name='entry', - ), - migrations.DeleteModel( - name='EntryTitleSong', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0012_auto_20161102_0930.py b/app/unused_apps/jrnl/migrations/0012_auto_20161102_0930.py deleted file mode 100644 index d1a65dd..0000000 --- a/app/unused_apps/jrnl/migrations/0012_auto_20161102_0930.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-02 09:30 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0011_auto_20161102_0925'), - ] - - operations = [ - migrations.RemoveField( - model_name='homepagecurrator', - name='featured', - ), - migrations.RemoveField( - model_name='homepagecurrator', - name='images', - ), - migrations.RemoveField( - model_name='homepagecurrator', - name='popular', - ), - migrations.DeleteModel( - name='HomepageCurrator', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0013_entry_featured_image.py b/app/unused_apps/jrnl/migrations/0013_entry_featured_image.py deleted file mode 100644 index c607ca7..0000000 --- a/app/unused_apps/jrnl/migrations/0013_entry_featured_image.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-02 09:31 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0016_auto_20161022_1411'), - ('jrnl', '0012_auto_20161102_0930'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='featured_image', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.LuxImage'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0014_homepagecurrator.py b/app/unused_apps/jrnl/migrations/0014_homepagecurrator.py deleted file mode 100644 index 2d34866..0000000 --- a/app/unused_apps/jrnl/migrations/0014_homepagecurrator.py +++ /dev/null @@ -1,29 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-02 09:31 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0016_auto_20161022_1411'), - ('jrnl', '0013_entry_featured_image'), - ] - - operations = [ - migrations.CreateModel( - name='HomepageCurrator', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('image_offset_vertical', models.CharField(help_text='add negative top margin to shift image (include css unit)', max_length=20)), - ('tag_line', models.CharField(max_length=200)), - ('template_name', models.CharField(help_text='full path', max_length=200)), - ('featured', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='banner', to='jrnl.Entry')), - ('images', models.ManyToManyField(to='photos.LuxImage')), - ('popular', models.ManyToManyField(to='jrnl.Entry')), - ], - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0015_entry_has_video.py b/app/unused_apps/jrnl/migrations/0015_entry_has_video.py deleted file mode 100644 index b643342..0000000 --- a/app/unused_apps/jrnl/migrations/0015_entry_has_video.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-02 09:31 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - dependencies = [ - ('photos', '0016_auto_20161022_1411'), - ('jrnl', '0014_homepagecurrator'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='has_video', - field=models.BooleanField(blank=True, default=False), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0016_auto_20161219_1058.py b/app/unused_apps/jrnl/migrations/0016_auto_20161219_1058.py deleted file mode 100644 index f9a3fc8..0000000 --- a/app/unused_apps/jrnl/migrations/0016_auto_20161219_1058.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-12-19 10:58 -from __future__ import unicode_literals - -from django.db import migrations, models -import jrnl.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0015_entry_has_video'), - ] - - operations = [ - migrations.AlterField( - model_name='entry', - name='image', - field=models.FileField(blank=True, help_text='should be 520 by 290', null=True, upload_to=jrnl.models.get_upload_path), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0017_entry_field_notes.py b/app/unused_apps/jrnl/migrations/0017_entry_field_notes.py deleted file mode 100644 index f131183..0000000 --- a/app/unused_apps/jrnl/migrations/0017_entry_field_notes.py +++ /dev/null @@ -1,13 +0,0 @@ -# Generated by Django 2.0.1 on 2018-02-08 07:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0016_auto_20161219_1058'), - ] - - operations = [ - ] diff --git a/app/unused_apps/jrnl/migrations/0018_auto_20180303_1037.py b/app/unused_apps/jrnl/migrations/0018_auto_20180303_1037.py deleted file mode 100644 index 2b4baa6..0000000 --- a/app/unused_apps/jrnl/migrations/0018_auto_20180303_1037.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.0.1 on 2018-03-03 10:37 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('books', '0005_auto_20171214_2239'), - ('jrnl', '0017_entry_field_notes'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='books', - field=models.ManyToManyField(blank=True, to='books.Book'), - ), - migrations.AlterField( - model_name='entry', - name='field_notes', - field=models.ManyToManyField(blank=True, to='sketches.Sketch'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0019_remove_entry_thumbnail.py b/app/unused_apps/jrnl/migrations/0019_remove_entry_thumbnail.py deleted file mode 100644 index 971cb03..0000000 --- a/app/unused_apps/jrnl/migrations/0019_remove_entry_thumbnail.py +++ /dev/null @@ -1,13 +0,0 @@ -# Generated by Django 2.0.1 on 2018-06-06 10:58 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0018_auto_20180303_1037'), - ] - - operations = [ - ] diff --git a/app/unused_apps/jrnl/migrations/0020_auto_20180606_1058.py b/app/unused_apps/jrnl/migrations/0020_auto_20180606_1058.py deleted file mode 100644 index 7575d4f..0000000 --- a/app/unused_apps/jrnl/migrations/0020_auto_20180606_1058.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.0.1 on 2018-06-06 10:58 - -from django.db import migrations, models -import jrnl.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0019_remove_entry_thumbnail'), - ] - - operations = [ - migrations.AlterField( - model_name='entry', - name='image', - field=models.FileField(blank=True, help_text='should be 520 by 290', upload_to=jrnl.models.get_upload_path), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0021_auto_20180606_1058.py b/app/unused_apps/jrnl/migrations/0021_auto_20180606_1058.py deleted file mode 100644 index ab42290..0000000 --- a/app/unused_apps/jrnl/migrations/0021_auto_20180606_1058.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.0.1 on 2018-06-06 10:58 - -from django.db import migrations, models -import jrnl.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0020_auto_20180606_1058'), - ] - - operations = [ - migrations.AlterField( - model_name='entry', - name='image', - field=models.FileField(blank=True, help_text='should be 520 by 290', null=True, upload_to=jrnl.models.get_upload_path), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0022_auto_20180707_0958.py b/app/unused_apps/jrnl/migrations/0022_auto_20180707_0958.py deleted file mode 100644 index 809f562..0000000 --- a/app/unused_apps/jrnl/migrations/0022_auto_20180707_0958.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.0.1 on 2018-07-07 09:58 - -from django.db import migrations, models -import jrnl.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0021_auto_20180606_1058'), - ] - - operations = [ - migrations.AlterField( - model_name='entry', - name='image', - field=models.FileField(blank=True, help_text='should be 520 by 290', upload_to=jrnl.models.get_upload_path), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0023_auto_20180902_1210.py b/app/unused_apps/jrnl/migrations/0023_auto_20180902_1210.py deleted file mode 100644 index 0ce3853..0000000 --- a/app/unused_apps/jrnl/migrations/0023_auto_20180902_1210.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1 on 2018-09-02 12:10 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0022_auto_20180707_0958'), - ] - - operations = [ - migrations.AlterField( - model_name='entry', - name='has_video', - field=models.BooleanField(blank=True, default=False), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0024_auto_20180902_1217.py b/app/unused_apps/jrnl/migrations/0024_auto_20180902_1217.py deleted file mode 100644 index 314c8c6..0000000 --- a/app/unused_apps/jrnl/migrations/0024_auto_20180902_1217.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 2.1 on 2018-09-02 12:17 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('photos', '0018_auto_20161130_1218'), - ('jrnl', '0023_auto_20180902_1210'), - ] - - operations = [ - migrations.CreateModel( - name='Home', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('image_offset_vertical', models.CharField(help_text='add negative top margin to shift image (include css unit)', max_length=20)), - ('tag_line', models.CharField(max_length=200)), - ('template_name', models.CharField(help_text='full path', max_length=200)), - ('featured', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='banner', to='jrnl.Entry')), - ('featured_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='photos.LuxImage')), - ('popular', models.ManyToManyField(to='jrnl.Entry')), - ], - ), - migrations.AlterField( - model_name='homepagecurrator', - name='featured', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='oldbanner', to='jrnl.Entry'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0025_auto_20190131_2335.py b/app/unused_apps/jrnl/migrations/0025_auto_20190131_2335.py deleted file mode 100644 index 60b9a8c..0000000 --- a/app/unused_apps/jrnl/migrations/0025_auto_20190131_2335.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 23:35 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0024_auto_20180902_1217'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='location_name', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AddField( - model_name='entry', - name='region_name', - field=models.CharField(blank=True, max_length=200, null=True), - ), - migrations.AddField( - model_name='entry', - name='state_name', - field=models.CharField(blank=True, max_length=200, null=True), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0026_entry_country_name.py b/app/unused_apps/jrnl/migrations/0026_entry_country_name.py deleted file mode 100644 index 22d07f9..0000000 --- a/app/unused_apps/jrnl/migrations/0026_entry_country_name.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 23:35 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0025_auto_20190131_2335'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='country_name', - field=models.CharField(blank=True, max_length=200, null=True), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0027_entry_country_slug.py b/app/unused_apps/jrnl/migrations/0027_entry_country_slug.py deleted file mode 100644 index 4560497..0000000 --- a/app/unused_apps/jrnl/migrations/0027_entry_country_slug.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-15 21:37 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0026_entry_country_name'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='country_slug', - field=models.CharField(blank=True, max_length=200, null=True), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0028_auto_20190218_1614.py b/app/unused_apps/jrnl/migrations/0028_auto_20190218_1614.py deleted file mode 100644 index aff2331..0000000 --- a/app/unused_apps/jrnl/migrations/0028_auto_20190218_1614.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-18 16:14 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0027_entry_country_slug'), - ] - - operations = [ - migrations.RemoveField( - model_name='entry', - name='country_name', - ), - migrations.RemoveField( - model_name='entry', - name='country_slug', - ), - migrations.RemoveField( - model_name='entry', - name='location_name', - ), - migrations.RemoveField( - model_name='entry', - name='region_name', - ), - migrations.RemoveField( - model_name='entry', - name='state_name', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0029_home_more_popular.py b/app/unused_apps/jrnl/migrations/0029_home_more_popular.py deleted file mode 100644 index 2adc219..0000000 --- a/app/unused_apps/jrnl/migrations/0029_home_more_popular.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.2 on 2019-02-20 11:33 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0028_auto_20190218_1614'), - ] - - operations = [ - migrations.AddField( - model_name='home', - name='more_popular', - field=models.ManyToManyField(related_name='morepopular', to='jrnl.Entry'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0030_remove_home_popular.py b/app/unused_apps/jrnl/migrations/0030_remove_home_popular.py deleted file mode 100644 index 8ac7408..0000000 --- a/app/unused_apps/jrnl/migrations/0030_remove_home_popular.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.2 on 2019-02-20 11:35 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0029_home_more_popular'), - ] - - operations = [ - migrations.RemoveField( - model_name='home', - name='popular', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0031_auto_20190220_1136.py b/app/unused_apps/jrnl/migrations/0031_auto_20190220_1136.py deleted file mode 100644 index 621b692..0000000 --- a/app/unused_apps/jrnl/migrations/0031_auto_20190220_1136.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.1.2 on 2019-02-20 11:36 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0030_remove_home_popular'), - ] - - operations = [ - migrations.RemoveField( - model_name='home', - name='more_popular', - ), - migrations.AddField( - model_name='home', - name='popular', - field=models.ManyToManyField(related_name='popular', to='jrnl.Entry'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0032_entry_subtitle.py b/app/unused_apps/jrnl/migrations/0032_entry_subtitle.py deleted file mode 100644 index d5ccc80..0000000 --- a/app/unused_apps/jrnl/migrations/0032_entry_subtitle.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-02-28 09:41 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0031_auto_20190220_1136'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='subtitle', - field=models.CharField(blank=True, max_length=200), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0033_entry_field_notes_two.py b/app/unused_apps/jrnl/migrations/0033_entry_field_notes_two.py deleted file mode 100644 index b90e86b..0000000 --- a/app/unused_apps/jrnl/migrations/0033_entry_field_notes_two.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 15:25 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('fieldnotes', '0002_auto_20190303_1222'), - ('jrnl', '0032_entry_subtitle'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='field_notes_two', - field=models.ManyToManyField(blank=True, to='fieldnotes.FieldNote'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0034_remove_entry_field_notes.py b/app/unused_apps/jrnl/migrations/0034_remove_entry_field_notes.py deleted file mode 100644 index a0e93b0..0000000 --- a/app/unused_apps/jrnl/migrations/0034_remove_entry_field_notes.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 16:10 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0033_entry_field_notes_two'), - ] - - operations = [ - migrations.RemoveField( - model_name='entry', - name='field_notes', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0035_auto_20190303_1610.py b/app/unused_apps/jrnl/migrations/0035_auto_20190303_1610.py deleted file mode 100644 index 7b51186..0000000 --- a/app/unused_apps/jrnl/migrations/0035_auto_20190303_1610.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 16:10 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0034_remove_entry_field_notes'), - ] - - operations = [ - migrations.RenameField( - model_name='entry', - old_name='field_notes_two', - new_name='field_notes', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0036_enjoyitem.py b/app/unused_apps/jrnl/migrations/0036_enjoyitem.py deleted file mode 100644 index aaa8596..0000000 --- a/app/unused_apps/jrnl/migrations/0036_enjoyitem.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-14 23:42 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), - ('jrnl', '0035_auto_20190303_1610'), - ] - - operations = [ - migrations.CreateModel( - name='EnjoyItem', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('object_id', models.PositiveIntegerField()), - ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), - ], - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0037_enjoyitem_entry.py b/app/unused_apps/jrnl/migrations/0037_enjoyitem_entry.py deleted file mode 100644 index 733f94c..0000000 --- a/app/unused_apps/jrnl/migrations/0037_enjoyitem_entry.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-15 00:13 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0036_enjoyitem'), - ] - - operations = [ - migrations.AddField( - model_name='enjoyitem', - name='entry', - field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='jrnl.Entry'), - preserve_default=False, - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0038_remove_enjoyitem_entry.py b/app/unused_apps/jrnl/migrations/0038_remove_enjoyitem_entry.py deleted file mode 100644 index 0eec153..0000000 --- a/app/unused_apps/jrnl/migrations/0038_remove_enjoyitem_entry.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-15 00:20 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0037_enjoyitem_entry'), - ] - - operations = [ - migrations.RemoveField( - model_name='enjoyitem', - name='entry', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0039_enjoyitem_order.py b/app/unused_apps/jrnl/migrations/0039_enjoyitem_order.py deleted file mode 100644 index 41c5324..0000000 --- a/app/unused_apps/jrnl/migrations/0039_enjoyitem_order.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-15 18:48 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0038_remove_enjoyitem_entry'), - ] - - operations = [ - migrations.AddField( - model_name='enjoyitem', - name='order', - field=models.IntegerField(default=1), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0040_auto_20190315_1906.py b/app/unused_apps/jrnl/migrations/0040_auto_20190315_1906.py deleted file mode 100644 index 9ce813b..0000000 --- a/app/unused_apps/jrnl/migrations/0040_auto_20190315_1906.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-15 19:06 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0039_enjoyitem_order'), - ] - - operations = [ - migrations.RemoveField( - model_name='enjoyitem', - name='content_type', - ), - migrations.DeleteModel( - name='EnjoyItem', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0041_auto_20190315_2240.py b/app/unused_apps/jrnl/migrations/0041_auto_20190315_2240.py deleted file mode 100644 index 06b9697..0000000 --- a/app/unused_apps/jrnl/migrations/0041_auto_20190315_2240.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-15 22:40 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), - ('jrnl', '0040_auto_20190315_1906'), - ] - - operations = [ - migrations.CreateModel( - name='RelatedPost', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('slug', models.SlugField()), - ('post_model', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='contenttypes.ContentType')), - ], - ), - migrations.AddField( - model_name='entry', - name='related', - field=models.ManyToManyField(blank=True, to='jrnl.RelatedPost'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0042_auto_20190412_1805.py b/app/unused_apps/jrnl/migrations/0042_auto_20190412_1805.py deleted file mode 100644 index 71c0d51..0000000 --- a/app/unused_apps/jrnl/migrations/0042_auto_20190412_1805.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.1.7 on 2019-04-12 18:05 - -import django.contrib.postgres.indexes -import django.contrib.postgres.search -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0041_auto_20190315_2240'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='search_document', - field=django.contrib.postgres.search.SearchVectorField(null=True), - ), - migrations.AddIndex( - model_name='entry', - index=django.contrib.postgres.indexes.GinIndex(fields=['search_document'], name='jrnl_entry_search__a7a10f_gin'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0043_auto_20190704_0903.py b/app/unused_apps/jrnl/migrations/0043_auto_20190704_0903.py deleted file mode 100644 index 758499a..0000000 --- a/app/unused_apps/jrnl/migrations/0043_auto_20190704_0903.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.1.7 on 2019-07-04 09:03 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0042_auto_20190412_1805'), - ] - - operations = [ - migrations.RemoveIndex( - model_name='entry', - name='jrnl_entry_search__a7a10f_gin', - ), - migrations.RemoveField( - model_name='entry', - name='search_document', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0044_auto_20190917_1703.py b/app/unused_apps/jrnl/migrations/0044_auto_20190917_1703.py deleted file mode 100644 index c6e5d6c..0000000 --- a/app/unused_apps/jrnl/migrations/0044_auto_20190917_1703.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.7 on 2019-09-17 17:03 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), - ('jrnl', '0043_auto_20190704_0903'), - ] - - operations = [ - migrations.RenameModel( - old_name='RelatedPost', - new_name='OldRelatedPost', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0045_entry_books_new.py b/app/unused_apps/jrnl/migrations/0045_entry_books_new.py deleted file mode 100644 index a941088..0000000 --- a/app/unused_apps/jrnl/migrations/0045_entry_books_new.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.6 on 2019-11-10 08:45 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('books', '0009_book_afflink'), - ('jrnl', '0044_auto_20190917_1703'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='books_new', - field=models.ManyToManyField(blank=True, related_name='luxbooks', to='books.Book'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0046_remove_entry_books.py b/app/unused_apps/jrnl/migrations/0046_remove_entry_books.py deleted file mode 100644 index bad9813..0000000 --- a/app/unused_apps/jrnl/migrations/0046_remove_entry_books.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.6 on 2019-11-10 08:57 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0045_entry_books_new'), - ] - - operations = [ - migrations.RemoveField( - model_name='entry', - name='books', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0047_auto_20191110_0859.py b/app/unused_apps/jrnl/migrations/0047_auto_20191110_0859.py deleted file mode 100644 index 28d3866..0000000 --- a/app/unused_apps/jrnl/migrations/0047_auto_20191110_0859.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.6 on 2019-11-10 08:59 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0046_remove_entry_books'), - ] - - operations = [ - migrations.RenameField( - model_name='entry', - old_name='books_new', - new_name='books', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0048_auto_20191205_1720.py b/app/unused_apps/jrnl/migrations/0048_auto_20191205_1720.py deleted file mode 100644 index 51be2f1..0000000 --- a/app/unused_apps/jrnl/migrations/0048_auto_20191205_1720.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.6 on 2019-12-05 17:20 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0047_auto_20191110_0859'), - ] - - operations = [ - migrations.RenameField( - model_name='entry', - old_name='related', - new_name='oldrelated', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0049_entry_newrelated.py b/app/unused_apps/jrnl/migrations/0049_entry_newrelated.py deleted file mode 100644 index 3bd8dee..0000000 --- a/app/unused_apps/jrnl/migrations/0049_entry_newrelated.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.6 on 2019-12-05 17:22 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('normalize', '0001_initial'), - ('jrnl', '0048_auto_20191205_1720'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='newrelated', - field=models.ManyToManyField(blank=True, to='normalize.RelatedPost'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0050_auto_20191206_0741.py b/app/unused_apps/jrnl/migrations/0050_auto_20191206_0741.py deleted file mode 100644 index b732b68..0000000 --- a/app/unused_apps/jrnl/migrations/0050_auto_20191206_0741.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.6 on 2019-12-06 07:41 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0049_entry_newrelated'), - ] - - operations = [ - migrations.RenameField( - model_name='entry', - old_name='newrelated', - new_name='related', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0051_auto_20201027_2102.py b/app/unused_apps/jrnl/migrations/0051_auto_20201027_2102.py deleted file mode 100644 index 09d0dea..0000000 --- a/app/unused_apps/jrnl/migrations/0051_auto_20201027_2102.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1 on 2020-10-27 21:02 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0050_auto_20191206_0741'), - ] - - operations = [ - migrations.RenameField( - model_name='entry', - old_name='field_notes', - new_name='old_field_notes', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0052_entry_new_field_notes.py b/app/unused_apps/jrnl/migrations/0052_entry_new_field_notes.py deleted file mode 100644 index 3ec3167..0000000 --- a/app/unused_apps/jrnl/migrations/0052_entry_new_field_notes.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 3.1 on 2020-10-27 21:04 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('posts', '0011_remove_post_jrnl'), - ('jrnl', '0051_auto_20201027_2102'), - ] - - operations = [ - migrations.AddField( - model_name='entry', - name='new_field_notes', - field=models.ManyToManyField(blank=True, to='posts.Post'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0053_auto_20201027_2105.py b/app/unused_apps/jrnl/migrations/0053_auto_20201027_2105.py deleted file mode 100644 index 904b6c2..0000000 --- a/app/unused_apps/jrnl/migrations/0053_auto_20201027_2105.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1 on 2020-10-27 21:05 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('jrnl', '0052_entry_new_field_notes'), - ] - - operations = [ - migrations.RenameField( - model_name='entry', - old_name='new_field_notes', - new_name='field_notes', - ), - ] diff --git a/app/unused_apps/jrnl/migrations/0054_auto_20201111_2148.py b/app/unused_apps/jrnl/migrations/0054_auto_20201111_2148.py deleted file mode 100644 index bdeb63f..0000000 --- a/app/unused_apps/jrnl/migrations/0054_auto_20201111_2148.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.1 on 2020-11-11 21:48 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('posts', '0012_remove_post_field_notes'), - ('jrnl', '0053_auto_20201027_2105'), - ] - - operations = [ - migrations.RemoveField( - model_name='entry', - name='old_field_notes', - ), - migrations.AlterField( - model_name='entry', - name='field_notes', - field=models.ManyToManyField(blank=True, limit_choices_to={'post_type': 5}, to='posts.Post'), - ), - ] diff --git a/app/unused_apps/jrnl/migrations/__init__.py b/app/unused_apps/jrnl/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/jrnl/models.py b/app/unused_apps/jrnl/models.py deleted file mode 100644 index f3c0626..0000000 --- a/app/unused_apps/jrnl/models.py +++ /dev/null @@ -1,309 +0,0 @@ -import datetime -import os - -from django.dispatch import receiver -from django.contrib.gis.db import models -from django.db.models.signals import post_save -from django.contrib.contenttypes.fields import GenericRelation, GenericForeignKey -from django.contrib.contenttypes.models import ContentType -from django.urls import reverse -from django.utils.functional import cached_property -from django.apps import apps -from django.conf import settings -from django.contrib.sitemaps import Sitemap -from django import forms - -import urllib.request -import urllib.parse -import urllib.error -from django_gravatar.helpers import get_gravatar_url, has_gravatar, calculate_gravatar_hash -from django_comments.signals import comment_was_posted -from django_comments.models import Comment -from django_comments.moderation import CommentModerator, moderator - -from photos.models import PhotoGallery, LuxImage, LuxImageSize -from locations.models import Location -from books.models import Book -from posts.models import Post -from normalize.models import RelatedPost - -from utils.util import render_images, parse_video, markdown_to_html - - -def get_upload_path(self, filename): - return "images/post-images/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -def image_url_replace(s): - s = s.replace('[[base_url]]', settings.IMAGES_URL) - return s - - -class OldRelatedPost(models.Model): - post_model = models.ForeignKey(ContentType, null=True, on_delete=models.SET_NULL) - slug = models.SlugField() - - def __str__(self): - return self.slug - - -class Entry(models.Model): - title = models.CharField(max_length=200) - subtitle = models.CharField(max_length=200, blank=True) - slug = models.SlugField(unique_for_date='pub_date') - body_html = models.TextField(blank=True) - body_markdown = models.TextField() - dek = models.TextField(null=True, blank=True) - pub_date = models.DateTimeField('Date published') - enable_comments = models.BooleanField(default=False) - point = models.PointField(null=True, blank=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - photo_gallery = models.ForeignKey(PhotoGallery, on_delete=models.CASCADE, blank=True, null=True, verbose_name='photo set') - image = models.FileField(upload_to=get_upload_path, blank=True, help_text="should be 520 by 290") - meta_description = models.CharField(max_length=256, null=True, blank=True) - TEMPLATES = ( - (0, 'single'), - (1, 'double'), - (2, 'single-dark'), - (3, 'double-dark'), - (4, 'single-black'), - (5, 'double-black'), - ) - template_name = models.IntegerField(choices=TEMPLATES, default=0) - featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) - has_video = models.BooleanField(blank=True, default=False) - #old_field_notes = models.ManyToManyField(FieldNote, blank=True) - field_notes = models.ManyToManyField(Post, blank=True, limit_choices_to={'post_type': 5}) - books = models.ManyToManyField(Book, related_name="luxbooks", blank=True) - oldrelated = models.ManyToManyField(OldRelatedPost, blank=True) - related = models.ManyToManyField(RelatedPost, blank=True) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - verbose_name_plural = 'entries' - - def __str__(self): - return self.title - - def get_absolute_url(self): - # return "/jrnl/%s/%s" % (self.pub_date.strftime("%Y/%m").lower(), self.slug) - return reverse("jrnl:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - def get_absolute_url_old(self): - return "/%s/%s/" % (self.pub_date.strftime("%Y/%b/%d").lower(), self.slug) - - def comment_period_open(self): - return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date - - def get_thumbnail_url(self): - image_dir, img = self.image.url.split('post-thumbnail/')[1].split('/') - return '%spost-thumbnail/%s/%s' % (settings.IMAGES_URL, image_dir, img) - - def get_image_url(self): - try: - image_dir, img = self.image.url.split('post-images/')[1].split('/') - return '%spost-images/%s/%s' % (settings.IMAGES_URL, image_dir, img) - except ValueError: - pass - - def get_image_wide_url(self): - img = self.image.url.split('post-images/')[1].split('/')[1] - # return '%shome-images/%s' % (settings.IMAGES_URL, img) - return '%shome-images/%s' % (settings.IMAGES_URL, img) - - def get_image_hero_url(self): - img = self.image.url.split('post-images/')[1].split('/')[1] - return '/media/images/home-images/hero%s' % (img) - - def get_image_hero_url_sm(self): - img = self.image.url.split('post-images/')[1].split('/')[1] - img = os.path.splitext(img)[0] - return '/media/images/home-images/hero%s_sm.jpg' % (img) - - def get_featured_image(self): - if self.featured_image: - return "%s%s" % (settings.IMAGES_URL, self.featured_image.image.url[14:]) - else: - return self.image.url - - def get_featured_image_thumb(self): - if self.featured_image: - return self.featured_image.get_image_by_size("tn") - else: - print(self.image.url) - image_dir, img = self.image.url.split('post-images/')[1].split('/') - print(image_dir, img) - return '%spost-images/%s/%s' % (settings.IMAGES_URL, image_dir, img) - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - def get_image_name(self): - return self.image.url.split("post-images/")[1][5:-4] - - def get_image_ext(self): - return self.image.url[-3:] - - def get_content_type(self): - return ContentType.objects.get(app_label="jrnl", model="entry") - - def save(self, *args, **kwargs): - created = self.pk is None - if not created: - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - self.has_video = parse_video(self.body_html) - try: - self.location = Location.objects.filter(geometry__contains=self.point).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - if created and not self.featured_image: - self.featured_image = LuxImage.objects.latest() - old = type(self).objects.get(pk=self.pk) if self.pk else None - if old and old.featured_image != self.featured_image: # Field has changed - s = LuxImageSize.objects.get(name="featured_jrnl") - ss = LuxImageSize.objects.get(name="picwide-med") - self.featured_image.sizes.add(s) - self.featured_image.sizes.add(ss) - self.featured_image.save() - if old and old.title != self.title or old and old.slug != self.slug: - related, c = RelatedPost.objects.get_or_create(model_name=self.get_content_type(), entry_id = self.id, pub_date=self.pub_date) - related.title = self.title - related.slug = self.slug - related.save() - - super(Entry, self).save(*args, **kwargs) - - -class HomepageCurrator(models.Model): - """ - simple model to control the featured article on the homepage - also allows me to fudge the "popular" section to be what I want - """ - image_offset_vertical = models.CharField(max_length=20, help_text="add negative top margin to shift image (include css unit)") - images = models.ManyToManyField(LuxImage) - #featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) - tag_line = models.CharField(max_length=200) - featured = models.ForeignKey(Entry, on_delete=models.CASCADE, related_name="oldbanner") - popular = models.ManyToManyField(Entry) - template_name = models.CharField(max_length=200, help_text="full path") - - -class Home(models.Model): - """ - simple model to control the featured article on the homepage - also allows me to fudge the "popular" section to be what I want - """ - image_offset_vertical = models.CharField(max_length=20, help_text="add negative top margin to shift image (include css unit)") - featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True) - tag_line = models.CharField(max_length=200) - featured = models.ForeignKey(Entry, on_delete=models.CASCADE, related_name="banner") - popular = models.ManyToManyField(Entry, related_name="popular") - template_name = models.CharField(max_length=200, help_text="full path") - - -class BlogSitemap(Sitemap): - changefreq = "never" - priority = 1.0 - protocol = "https" - - def items(self): - return Entry.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date - - -class EntryModerator(CommentModerator): - ''' - Moderate everything except people with multiple approvals - ''' - email_notification = True - - def moderate(self, comment, content_object, request): - previous_approvals = Comment.objects.filter(user_email=comment.email, is_public=True) - for approval in previous_approvals: - if approval.submit_date <= datetime.datetime.today() - datetime.timedelta(21): - approve = True - if previous_approvals.count() > 2 and approve: - return False - # do entry build right here so it goes to live site - return True - - -moderator.register(Entry, EntryModerator) - - -@receiver(comment_was_posted, sender=Comment) -def cache_gravatar(sender, comment, **kwargs): - gravatar_exists = has_gravatar(comment.email) - grav_dir = settings.IMAGES_ROOT + '/gravcache/' - if gravatar_exists: - url = get_gravatar_url(comment.email, size=60) - if not os.path.isdir(grav_dir): - os.makedirs(grav_dir) - local_grav = '%s/%s.jpg' % (grav_dir, calculate_gravatar_hash(comment.email)) - urllib.request.urlretrieve(url, local_grav) - - -@receiver(post_save, sender=Entry) -def post_save_events(sender, update_fields, created, instance, **kwargs): - """ - Creates a generic related entry when a new post is added - """ - if created: - related, c = RelatedPost.objects.get_or_create(model_name=instance.get_content_type(), entry_id = instance.id, pub_date=instance.pub_date, title=instance.title, slug=instance.slug) - -# from django_comments.signals import comment_will_be_posted -# from django_comments import akismet - - -# @receiver(comment_will_be_posted, sender=Comment) -# def spam_check(sender, comment, request, **kwargs): -# akismet.USERAGENT = "David Lynch's Python library/1.0" -# try: -# real_key = akismet.verify_key(settings.AKISMET_KEY, "https://luxagraf.net/") -# if real_key: -# is_spam = akismet.comment_check(settings.AKISMET_KEY, "https://luxagraf.net/", request.META['REMOTE_ADDR'], request.META['HTTP_USER_AGENT'], comment_content=comment.comment) -# if is_spam: -# return False -# else: -# return True -# except akismet.AkismetError as e: -# print('Something went wrong, allowing comment') -# print(e.response, e.statuscode) -# return True diff --git a/app/unused_apps/jrnl/templates/horizontal_select.html b/app/unused_apps/jrnl/templates/horizontal_select.html deleted file mode 100644 index 61dcfd8..0000000 --- a/app/unused_apps/jrnl/templates/horizontal_select.html +++ /dev/null @@ -1,17 +0,0 @@ -{% with id=widget.attrs.id %} - - {% for group, options, index in widget.optgroups %} - {% if group %} -
  • {{ group }} - - {% endif %} - {% for option in options %} -
  • {% include option.template_name with widget=option %}
  • - {% endfor %} - {% if group %} - - - {% endif %} - {% endfor %} - -{% endwith %} diff --git a/app/unused_apps/jrnl/templates/jrnl/entry_detail.html b/app/unused_apps/jrnl/templates/jrnl/entry_detail.html deleted file mode 100644 index 0904178..0000000 --- a/app/unused_apps/jrnl/templates/jrnl/entry_detail.html +++ /dev/null @@ -1,240 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load comments %} - -{% block pagetitle %}{{object.title|title|smartypants|safe}} - by Scott Gilbertson{% endblock %} - -{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %} -{%block extrahead%} - - - - - - - - - - - - - - - - - - - - - - -{%endblock%} -{%block htmlclass%}{% with object.template_name as t %} -class="detail {%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t == 2 or t == 3 %} dark{%endif%}{%if t == 4 or t == 5 %} black{%endif%}"{%endwith%}{%endblock%} - - {% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %} -
    -
    -
    -

    {%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|safe}}{%endif%}

    - {% if object.subtitle %}

    {{object.subtitle|smartypants|safe}}

    {%endif%} -
    - {% if object.location %}
    -

    {% if object.location.country_name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.location.state_name|safe}}, U.S.{%else%}{{object.location.name|smartypants|safe}}, {{object.location.country_name|safe}}{%endif%}

    - – Map -
    {%endif%} - - -
    -
    -
    - {{object.body_html|safe|smartypants}} -
    - {%if wildlife or object.field_notes.all or object.books.all %}{%endif%} -
    - {% with object.get_next_published as next %} - {% with object.get_previous_published as prev %} - - {% if object.related.all %}
    - -
    {%endif%} - - {% comment %}
    -
    If you enjoyed this, you should join the mailing list…
    - {% include 'mailing_list.html' %} -
    {% endcomment %} - {% if object.enable_comments %} -{% get_comment_count for object as comment_count %} -{%if comment_count > 0 %} -

    {{comment_count}} Comment{{ comment_count|pluralize }}

    -{% render_comment_list for object %} -{%endif%} -
    -{% render_comment_form for object %} -
    -{% else %} -

    Sorry, comments have been disabled for this post.

    -{%endif%} -
    -{% endblock %} -{% block js %} - -{%endblock%} diff --git a/app/unused_apps/jrnl/templates/jrnl/entry_detail.txt b/app/unused_apps/jrnl/templates/jrnl/entry_detail.txt deleted file mode 100644 index 547ce79..0000000 --- a/app/unused_apps/jrnl/templates/jrnl/entry_detail.txt +++ /dev/null @@ -1,8 +0,0 @@ -{{object.title|safe}} -{% for letter in object.title %}={%endfor%} - - by Scott Gilbertson - <{{SITE_URL}}{{object.get_absolute_url}}> - {{object.pub_date|date:"l, d F Y"}} - -{{object.body_markdown|safe}} diff --git a/app/unused_apps/jrnl/templates/jrnl/entry_list.html b/app/unused_apps/jrnl/templates/jrnl/entry_list.html deleted file mode 100644 index 6eefe10..0000000 --- a/app/unused_apps/jrnl/templates/jrnl/entry_list.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load pagination_tags %} -{% block pagetitle %}Luxagraf | {% if region %}Travel Writing from {{region.name|title|smartypants|safe}}{%else%}Travel Writing from Around the World {%endif%}{% if page != "1" %} -- Page {{page}}{%endif%}{% endblock %} -{% block metadescription %}{% if region %}Travel writing, essays and dispatches from {{region.name|title|smartypants|safe}}{%else%}Travel writing, essays and dispatches from around the world{%endif%} Page {{page}}{% endblock %} -{%block bodyid%}id="writing" class="archive"{%endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
    -

    {% if region %}Journal entries from {%if region.name == 'United States'%}the United States{%else%}{{region.name|title|smartypants|safe}}{%endif%}{%else%}Journal {%endif%}

    {% autopaginate object_list 24 %} {% for object in object_list %} -
    -
    - {% if object.featured_image %} - {% include "lib/img_archive.html" with image=object.featured_image %} - {%else%} - {{ object.title }}{%endif%} -
    -

    {{object.title|safe|smartypants|widont}}

    - - -

    - - {% if object.location.country_name == "United States" %}{{object.location.name|smartypants|safe}}, {{object.location.state_name}}, U.S.{%else%}{{object.location.name|smartypants|safe}}, {{object.location.country_name}}{%endif%} - – - - {{object.dek|safe}} - -

    -
    {% endfor %} -
    - -{% endblock %} diff --git a/app/unused_apps/jrnl/urls.py b/app/unused_apps/jrnl/urls.py deleted file mode 100644 index caf1935..0000000 --- a/app/unused_apps/jrnl/urls.py +++ /dev/null @@ -1,61 +0,0 @@ -from django.urls import path, re_path -from django.views.generic.base import RedirectView - -from . import views - -app_name = "jrnl" - -urlpatterns = [ - path( - r'feed.xml', - views.JrnlRSSFeedView(), - name="feed" - ), - re_path( - r'^(?P\d{4})/(?P\d{2})/(?P[-\w]+).txt$', - views.EntryDetailViewTXT.as_view(), - name="detail-txt" - ), - re_path( - r'^(?P\d{4})/(?P\d{2})/(?P[-\w]+)$', - views.EntryDetailView.as_view(), - name="detail" - ), - re_path( - r'^(?P[0-9]{4})/(?P[0-9]{2})/$', - views.EntryMonthArchiveView.as_view(month_format='%m'), - name="list_month" - ), - re_path( - r'(?P\d{4})/$', - views.EntryYearArchiveView.as_view(), - name="list_year" - ), - re_path( - r'^(?P\d+)/$', - views.EntryList.as_view(), - name="list" - ), - path( - r'latest/', - views.JrnlLatestView.as_view(), - name="latest" - ), - re_path( - r'(?P[-\w]+)/(?P\d+)/$', - views.EntryCountryList.as_view(), - name="list_country" - ), - re_path( - r'^(?P[-\w]+)/$', - views.EntryCountryList.as_view(), - {'page':1}, - name="list_country" - ), - re_path( - r'', - views.EntryList.as_view(), - {'page':1}, - name="list" - ), -] diff --git a/app/unused_apps/jrnl/views.py b/app/unused_apps/jrnl/views.py deleted file mode 100644 index 6b7cc8d..0000000 --- a/app/unused_apps/jrnl/views.py +++ /dev/null @@ -1,165 +0,0 @@ -from django.views.generic import ListView -from django.views.generic.detail import DetailView -from django.views.generic.dates import DateDetailView -from django.urls import reverse -from django.views.generic.dates import YearArchiveView, MonthArchiveView -from django.contrib.syndication.views import Feed -from django.apps import apps -from django.shortcuts import get_object_or_404 -from django.conf import settings -from django.db.models import Q - -from utils.views import PaginatedListView - -from .models import Entry, HomepageCurrator, Home -from locations.models import LuxCheckIn, Country, Region, Location -from sightings.models import Sighting - - -class EntryList(PaginatedListView): - """ - Return a list of Entries in reverse chronological order - """ - model = Entry - - def get_queryset(self): - queryset = super(EntryList, self).get_queryset() - print(queryset) - return queryset.filter(status__exact=1).order_by('-pub_date').prefetch_related('location').prefetch_related('featured_image') - - -class EntryCountryList(PaginatedListView): - """ - Return a list of Entries by Country in reverse chronological order - """ - model = Entry - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(EntryCountryList, self).get_context_data(**kwargs) - try: - context['region'] = Country.objects.get(slug__exact=self.kwargs['slug']) - except: - context['region'] = Region.objects.get(slug__exact=self.kwargs['slug']) - return context - - def get_queryset(self): - try: - region = Country.objects.get(slug__exact=self.kwargs['slug']) - qs = Entry.objects.filter( - status__exact=1, - location__state__country=region - ).order_by('-pub_date') - except: - region = Region.objects.get(slug__exact=self.kwargs['slug']) - qs = Entry.objects.filter( - status__exact=1, - location__state__country__lux_region=region.id - ).order_by('-pub_date') - return qs - - -class EntryYearArchiveView(YearArchiveView): - queryset = Entry.objects.filter(status__exact=1).select_related() - date_field = "pub_date" - make_object_list = True - allow_future = True - template_name = "archives/writing_date.html" - - -class EntryMonthArchiveView(MonthArchiveView): - queryset = Entry.objects.filter(status__exact=1).select_related() - date_field = "pub_date" - allow_future = True - template_name = "archives/writing_date.html" - - -class EntryDetailView(DateDetailView): - model = Entry - date_field = 'pub_date' - slug_field = "slug" - - def get_queryset(self): - queryset = super(EntryDetailView, self).get_queryset() - return queryset.select_related('location').prefetch_related('field_notes').prefetch_related('books') - - def get_object(self, queryset=None): - obj = get_object_or_404( - self.model, - slug=self.kwargs['slug'], - pub_date__month=self.kwargs['month'], - pub_date__year=self.kwargs['year'] - ) - self.location = obj.location - return obj - - def get_context_data(self, **kwargs): - context = super(EntryDetailView, self).get_context_data(**kwargs) - context['wildlife'] = Sighting.objects.filter( - Q(location=self.location) | - Q(location__in=Location.objects.filter(parent=self.location)) - ).select_related().order_by('ap_id', 'ap__apclass__kind').distinct("ap") - related = [] - for obj in self.object.related.all(): - model = apps.get_model(obj.model_name.app_label, obj.model_name.model) - related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date)) - context['related'] = related - context['breadcrumbs'] = ("jrnl",) - context['crumb_url'] = reverse('jrnl:list') - return context - - -class EntryDetailViewTXT(EntryDetailView): - template_name = "jrnl/entry_detail.txt" - - -class HomepageList(ListView): - """ - Return a main entry and list of Entries in reverse chronological order - """ - model = Entry - - def get_home(self): - return Home.objects.filter(pk=1).prefetch_related('featured_image').select_related('featured').select_related('featured__location').get() - - def get_queryset(self): - queryset = super(HomepageList, self).get_queryset() - self.home = self.get_home() - return queryset.filter(status__exact=1).order_by('-pub_date').exclude().select_related('location').select_related('featured_image')[1:9] - - def get_template_names(self): - return ['%s' % self.home.template_name] - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(HomepageList, self).get_context_data(**kwargs) - context['homepage'] = self.home - context['location'] = LuxCheckIn.objects.latest() - context['IMAGES_URL'] = settings.IMAGES_URL - return context - - -class JrnlLatestView(EntryDetailView): - template_name = "details/entry_latest.html" - - def get_object(self, queryset=None): - obj = self.model.objects.filter(status=1).latest() - self.location = obj.location - return obj - - -class JrnlRSSFeedView(Feed): - title = "Luxagraf: Topographical Writings" - link = "/jrnl/" - description = "Latest postings to luxagraf.net" - description_template = 'feeds/blog_description.html' - - def items(self): - return Entry.objects.filter(status__exact=1).order_by('-pub_date')[:10] - - def item_pubdate(self, item): - """ - Takes an item, as returned by items(), and returns the item's - pubdate. - """ - return item.pub_date diff --git a/app/unused_apps/notes/__init__.py b/app/unused_apps/notes/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/notes/admin.py b/app/unused_apps/notes/admin.py deleted file mode 100644 index eafd0dc..0000000 --- a/app/unused_apps/notes/admin.py +++ /dev/null @@ -1,28 +0,0 @@ -from django.contrib import admin -from notes.models import Note -from utils.widgets import LGEntryForm, OLAdminBase - - -@admin.register(Note) -class NoteAdmin(OLAdminBase): - form = LGEntryForm - prepopulated_fields = {"slug": ('title',)} - list_display = ('slug', 'pub_date') - fieldsets = ( - ('Note', { - 'fields': ( - ('title', 'slug'), - 'body_markdown', - 'pub_date', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - - class Media: - js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/unused_apps/notes/build.py b/app/unused_apps/notes/build.py deleted file mode 100644 index dc0654e..0000000 --- a/app/unused_apps/notes/build.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - - -class BuildNotes(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("notes:live_redirect"), - paginate_by=24 - ) - self.build_year_view("notes:list_year") - self.build_month_view("notes:list_month") - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildNotes("notes", "luxnote") - j.build() diff --git a/app/unused_apps/notes/migrations/0001_initial.py b/app/unused_apps/notes/migrations/0001_initial.py deleted file mode 100644 index ea67ad1..0000000 --- a/app/unused_apps/notes/migrations/0001_initial.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 2.0.1 on 2018-05-09 09:35 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Note', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(blank=True, max_length=250, null=True)), - ('slug', models.SlugField(blank=True, unique_for_date='pub_date')), - ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField(verbose_name='Note')), - ], - ), - ] diff --git a/app/unused_apps/notes/migrations/__init__.py b/app/unused_apps/notes/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/notes/models.py b/app/unused_apps/notes/models.py deleted file mode 100644 index 8735056..0000000 --- a/app/unused_apps/notes/models.py +++ /dev/null @@ -1,50 +0,0 @@ -from django import forms -from django.contrib.gis.db import models -from django.utils import timezone -from django.conf import settings -from django.urls import reverse -from locations.models import Location - -from locations.models import CheckIn -from utils.util import markdown_to_html, render_images - - -class Note(models.Model): - title = models.CharField(max_length=250, null=True, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - pub_date = models.DateTimeField(default=timezone.now) - body_html = models.TextField(blank=True) - body_markdown = models.TextField('Note') - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("notes:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - @property - def region(self): - return self.location.state.country.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return round(self.point.x, 2) - - @property - def latitude(self): - '''Get the site's latitude.''' - return round(self.point.y, 2) - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date() - - @property - def get_next_published(self): - return self.get_next_by_pub_date() - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - super(Note, self).save() diff --git a/app/unused_apps/notes/urls.py b/app/unused_apps/notes/urls.py deleted file mode 100644 index 3c47c3d..0000000 --- a/app/unused_apps/notes/urls.py +++ /dev/null @@ -1,55 +0,0 @@ -from django.conf.urls import url -from django.views.generic.base import RedirectView - -from . import views - -app_name = "notes" - -urlpatterns = [ - url( - r'(?P\d{4})/(?P\d{2})/(?P[-\w]+).txt$', - views.NoteDetailViewTXT.as_view(), - name="detail-txt" - ), - url( - r'(?P\d{4})/(?P\d{2})/(?P[-\w]+)$', - views.NoteDetailView.as_view(), - name="detail" - ), - url( - r'^(?P[0-9]{4})/(?P[0-9]{2})/$', - views.NoteMonthArchiveView.as_view(month_format='%m'), - name="list_month" - ), - url( - r'(?P\d{4})/$', - views.NoteYearArchiveView.as_view(), - name="list_year" - ), - url( - r'(?P\d{4})/(?P\d{2})/$', - views.date_list, - name="notes_by_month" - ), - url( - r'(?P\d{4})/$', - views.date_list, - name="notes_by_year" - ), - url( - r'(?P\d+)/$', - views.NoteList.as_view(), - name="list" - ), - # redirect / to /1/ for live server - url( - r'', - RedirectView.as_view(url="/field-notes/1/", permanent=False), - name="live_redirect" - ), - url( - r'^$', - views.entry_list, - name="notes_archive" - ), -] diff --git a/app/unused_apps/notes/views.py b/app/unused_apps/notes/views.py deleted file mode 100644 index 05fe18e..0000000 --- a/app/unused_apps/notes/views.py +++ /dev/null @@ -1,39 +0,0 @@ -from django.views.generic.dates import YearArchiveView, MonthArchiveView -from django.views.generic.detail import DetailView - -from utils.views import PaginatedListView - -from notes.models import Note - - -class NoteList(PaginatedListView): - """ - Return a list of Notes in reverse chronological order - """ - queryset = Note.objects.all().order_by('-pub_date') - template_name = "archives/notes.html" - - -class NoteDetailView(DetailView): - model = Note - template_name = "details/note.html" - slug_field = "slug" - - -class NoteDetailViewTXT(NoteDetailView): - template_name = "details/entry.txt" - - -class NoteYearArchiveView(YearArchiveView): - queryset = Note.objects.all() - date_field = "pub_date" - make_object_list = True - allow_future = True - template_name = "archives/notes_date.html" - - -class NoteMonthArchiveView(MonthArchiveView): - queryset = Note.objects.all() - date_field = "pub_date" - allow_future = True - template_name = "archives/notes_date.html" diff --git a/app/unused_apps/people/__init__.py b/app/unused_apps/people/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/people/admin.py b/app/unused_apps/people/admin.py deleted file mode 100644 index ea0b463..0000000 --- a/app/unused_apps/people/admin.py +++ /dev/null @@ -1,8 +0,0 @@ -from django.contrib import admin -from .models import Person - - -@admin.register(Person) -class PersonAdmin(admin.ModelAdmin): - list_display = ('last_name', 'first_name', 'location_met', ) - diff --git a/app/unused_apps/people/build.py b/app/unused_apps/people/build.py deleted file mode 100644 index 35fdb19..0000000 --- a/app/unused_apps/people/build.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - - -class BuildBooks(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("books:live_redirect"), - paginate_by=24 - ) - print("building books") - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildBooks("books", "book") - j.build() diff --git a/app/unused_apps/people/migrations/0001_initial.py b/app/unused_apps/people/migrations/0001_initial.py deleted file mode 100644 index 6f21bea..0000000 --- a/app/unused_apps/people/migrations/0001_initial.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 2.0.1 on 2018-04-05 09:06 - -from django.db import migrations, models -import django.db.models.deletion -import taggit.managers - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('locations', '0003_auto_20180307_1027'), - ('taggit', '0002_auto_20150616_2121'), - ] - - operations = [ - migrations.CreateModel( - name='Person', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('first_name', models.CharField(max_length=200)), - ('last_name', models.CharField(max_length=200)), - ('email', models.EmailField(blank=True, max_length=120, null=True)), - ('street', models.CharField(blank=True, max_length=355, null=True)), - ('city', models.CharField(blank=True, max_length=200, null=True)), - ('state', models.CharField(blank=True, max_length=200, null=True)), - ('postal_code', models.CharField(blank=True, max_length=20, null=True)), - ('country', models.CharField(max_length=200, null=True)), - ('phone', models.CharField(blank=True, max_length=22, null=True)), - ('slug', models.CharField(blank=True, max_length=50)), - ('body_markdown', models.TextField(blank=True, null=True)), - ('body_html', models.TextField(blank=True, null=True)), - ('next_contact_date', models.DateField(blank=True, null=True)), - ('location_met', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), - ], - options={ - 'ordering': ('-last_name',), - }, - ), - ] diff --git a/app/unused_apps/people/migrations/__init__.py b/app/unused_apps/people/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/people/models.py b/app/unused_apps/people/models.py deleted file mode 100644 index 1a07b16..0000000 --- a/app/unused_apps/people/models.py +++ /dev/null @@ -1,54 +0,0 @@ -from django.db import models -from django.template.defaultfilters import slugify - -from taggit.managers import TaggableManager -from locations.models import Location -from utils.util import markdown_to_html - - -class Person(models.Model): - first_name = models.CharField(max_length=200) - last_name = models.CharField(max_length=200) - email = models.EmailField(max_length=120, null=True, blank=True) - street = models.CharField(max_length=355, null=True, blank=True) - city = models.CharField(max_length=200, null=True, blank=True) - state = models.CharField(max_length=200, null=True, blank=True) - postal_code = models.CharField(max_length=20, null=True, blank=True) - country = models.CharField(max_length=200, null=True) - phone = models.CharField(max_length=22, blank=True, null=True) - slug = models.CharField(max_length=50, blank=True) - body_markdown = models.TextField(null=True, blank=True) - body_html = models.TextField(null=True, blank=True) - tags = TaggableManager(blank=True) - location_met = models.ForeignKey(Location, on_delete=models.CASCADE, null=True, blank=True) - next_contact_date = models.DateField(null=True, blank=True) - - class Meta: - ordering = ('-last_name',) - - def __str__(self): - return "%s %s" %(self.first_name, self.last_name) - - def get_absolute_url(self): - return reverse("people:detail", kwargs={"slug": self.slug}) - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - def save(self, *args, **kwargs): - if not self.slug: - self.slug = slugify(("%s-%s")[:50] %(self.last_name, self.first_name)) - if self.body_markdown: - self.body_html = markdown_to_html(self.body_markdown) - super(Person, self).save() - diff --git a/app/unused_apps/people/urls.py b/app/unused_apps/people/urls.py deleted file mode 100644 index 0ae38eb..0000000 --- a/app/unused_apps/people/urls.py +++ /dev/null @@ -1,36 +0,0 @@ -from django.urls import path, re_path -from django.views.generic.base import RedirectView - -from . import views - -app_name = "people" - -urlpatterns = [ - re_path( - r'^tag/(?P[-\w]+)/$', - views.PersonTagListView.as_view(), - {'page':1}, - name='list-tag' - ), - re_path( - r'tag/(?P[-\w]+)/(?P\d+)/$', - views.PersonTagListView.as_view(), - name='list-tag' - ), - re_path( - r'^(?P\d+)/$', - views.PersonListView.as_view(), - name="list" - ), - path( - r'', - views.PersonListView.as_view(), - {'page':1}, - name="list" - ), - path( - r'/', - views.PersonDetailView.as_view(), - name='detail', - ), -] diff --git a/app/unused_apps/people/views.py b/app/unused_apps/people/views.py deleted file mode 100644 index 36c0657..0000000 --- a/app/unused_apps/people/views.py +++ /dev/null @@ -1,38 +0,0 @@ -from django.views.generic.detail import DetailView -from utils.views import PaginatedListView - -from taggit.models import Tag -from .models import Person - - -class PersonListView(PaginatedListView): - model = Person - template_name = 'archives/people.html' - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(PersonListView, self).get_context_data(**kwargs) - context['tags'] = Person.tags.all() - return context - - -class PersonDetailView(DetailView): - model = Person - template_name = "details/person.html" - slug_field = "slug" - - -class PersonTagListView(PaginatedListView): - model = Person - template_name = 'archives/people.html' - - def get_queryset(self): - print(self.kwargs['slug']) - return Person.objects.filter(tags__slug=self.kwargs['slug']) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(PersonTagListView, self).get_context_data(**kwargs) - context['tag'] = Tag.objects.get(slug__exact=self.kwargs['slug']) - context['tags'] = Person.tags.all() - return context diff --git a/app/unused_apps/projects/__init__.py b/app/unused_apps/projects/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/projects/admin.py b/app/unused_apps/projects/admin.py deleted file mode 100644 index 040b867..0000000 --- a/app/unused_apps/projects/admin.py +++ /dev/null @@ -1,135 +0,0 @@ -from django.contrib import admin -from django.contrib.gis.admin import OSMGeoAdmin - -from projects.models.base import Project -from projects.models.fiveby import FiveBy -from projects.models.natparks import NationalParks -from projects.models.gifs import AnimatedGif -from projects.models.self_experiments import Experiment - - -class ProjectAdmin(OSMGeoAdmin): - list_display = ('title', 'pub_date', 'status',) - search_fields = ['title', 'body_markdown'] - prepopulated_fields = {"slug": ('title',)} - list_filter = ('pub_date', 'status') - fieldsets = ( - ('Project', { - 'fields': ( - 'title', - 'subtitle', - 'lede', - 'pub_date', - 'model_name', - ('status', 'image'), - 'slug', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - }), - ) - - class Media: - js = ['/media/admin/custom/model.js'] - - -class FiveByAdmin(OSMGeoAdmin): - list_display = ('title', 'pub_date', 'status',) - search_fields = ['title'] - prepopulated_fields = {"slug": ('title',)} - list_filter = ('pub_date', 'status') - fieldsets = ( - ('Project', {'fields': ('title', 'lede', 'pub_date', 'status', ('image', 'videoh264', 'videoogg'), 'slug', ('vimeo_link', 'youtube_link'), ('point', 'location', 'region')), 'classes': ('show', 'extrapretty', 'wide')}), - ) - - # options for OSM map Using custom ESRI topo map - default_lon = -9285175 - default_lat = 4025046 - default_zoom = 6 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - - -class NationalParksAdmin(OSMGeoAdmin): - list_display = ('unit_name', 'type', 'state', 'name', 'visited', 'size') - list_filter = ('state', 'type') - search_fields = ['name'] - fieldsets = ( - ('Project', { - 'fields': ( - 'name', - 'tag_line', - ('state', 'visited'), - 'dek', - 'date_visited_begin', - 'date_visited_end', - 'mpoly', - 'image', - ('post', 'gallery'), - ('url', 'size', 'fee', 'camping_fee', 'date_park_created'), - 'zoom' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - }), - ) - - # options for OSM map Using custom ESRI topo map - default_lon = -9285175 - default_lat = 4025046 - default_zoom = 6 - units = True - scrollable = False - map_width = 700 - map_height = 425 - map_template = 'gis/admin/osm.html' - - -class AnimatedGifAdmin(admin.ModelAdmin): - list_display = ('title', 'date_created') - search_fields = ['title'] - fieldsets = ( - (None, { - 'fields': ( - 'title', - 'gif', - 'date_created', - 'slug', - 'music_ogg', - 'music_mp3' - ) - }), - ) - - -class ExperimentAdmin(admin.ModelAdmin): - list_display = ('title', 'date_start', 'date_end_projected', 'days_remaining') - search_fields = ['title'] - fieldsets = ( - (None, { - 'fields': ( - 'title', - 'slug', - 'body_markdown', - ('date_start', 'duration', 'date_end_projected'), - 'date_end_actual', - 'status' - ) - }), - ) - - -admin.site.register(Experiment, ExperimentAdmin) -admin.site.register(AnimatedGif, AnimatedGifAdmin) -admin.site.register(Project, ProjectAdmin) -admin.site.register(FiveBy, FiveByAdmin) -admin.site.register(NationalParks, NationalParksAdmin) diff --git a/app/unused_apps/projects/models/__init__.py b/app/unused_apps/projects/models/__init__.py deleted file mode 100644 index 3230ff4..0000000 --- a/app/unused_apps/projects/models/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .base import Project -from .fiveby import FiveBy -from .natparks import NationalParks -from .gifs import AnimatedGif -from .self_experiments import Experiment diff --git a/app/unused_apps/projects/models/base.py b/app/unused_apps/projects/models/base.py deleted file mode 100644 index aa795d2..0000000 --- a/app/unused_apps/projects/models/base.py +++ /dev/null @@ -1,67 +0,0 @@ -import datetime -from django.contrib.gis.db import models -from django.contrib.sitemaps import Sitemap -from django.conf import settings - - -def get_upload_path(self, filename): - return "images/project-thumbs/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -class Project(models.Model): - title = models.CharField(max_length=200) - subtitle = models.CharField(max_length=200, null=True, blank=True) - slug = models.CharField(max_length=50) - lede = models.TextField(blank=True) - pub_date = models.DateTimeField('Date published') - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - image = models.FileField(upload_to=get_upload_path, null=True, blank=True) - model_name = models.CharField(max_length=200, null=True) - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y - - @property - def get_project_image(self): - return "%s%s" % (settings.IMAGES_URL, self.image.name[7:]) - - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - app_label = 'projects' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return "/%s/" % (self.slug) - - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - -class ProjectSitemap(Sitemap): - changefreq = "monthly" - priority = 0.5 - protocol = "https" - - def items(self): - return Project.objects.filter(status=1) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/projects/models/fiveby.py b/app/unused_apps/projects/models/fiveby.py deleted file mode 100644 index 473c095..0000000 --- a/app/unused_apps/projects/models/fiveby.py +++ /dev/null @@ -1,53 +0,0 @@ -import datetime -from django.contrib.gis.db import models -from locations.models import Location, Region - - -def get_upload_path(self, filename): - return "images/projects/videos/5x5/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -def get_image_upload_path(self, filename): - return "images/projects/5x5/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -class FiveBy(models.Model): - title = models.CharField(max_length=200) - slug = models.SlugField(unique_for_date='pub_date') - lede = models.TextField(blank=True) - image = models.FileField(upload_to=get_image_upload_path, null=True, blank=True) - videoh264 = models.FileField(upload_to=get_upload_path, null=True, blank=True) - videoogg = models.FileField(upload_to=get_upload_path, null=True, blank=True) - vimeo_link = models.CharField(max_length=200) - youtube_link = models.CharField(max_length=200) - pub_date = models.DateTimeField('Date published') - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - point = models.PointField(null=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, null=True) - region = models.ForeignKey(Region, on_delete=models.CASCADE, null=True) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - app_label = 'projects' - verbose_name_plural = '5x5' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return "/%s/%s/%s/" % ('projects', '5x5', self.slug) - - @property - def longitude(self): - '''Get the site's longitude.''' - return self.point.x - - @property - def latitude(self): - '''Get the site's latitude.''' - return self.point.y diff --git a/app/unused_apps/projects/models/gifs.py b/app/unused_apps/projects/models/gifs.py deleted file mode 100644 index 25b8734..0000000 --- a/app/unused_apps/projects/models/gifs.py +++ /dev/null @@ -1,26 +0,0 @@ -import datetime -from django.db import models - - -def get_upload_path(self, filename): - return "images/projects/gifs/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -class AnimatedGif(models.Model): - title = models.CharField(max_length=254) - gif = models.ImageField(upload_to=get_upload_path) - slug = models.SlugField() - date_created = models.DateField('Date Created') - music_ogg = models.FileField(upload_to=get_upload_path, blank=True, null=True) - music_mp3 = models.FileField(upload_to=get_upload_path, blank=True, null=True) - - class Meta: - verbose_name_plural = "Animated Gifs" - app_label = 'projects' - ordering = ('-date_created',) - - def __str__(self): - return self.slug - - def get_absolute_url(self): - return '/projects/gifs/%s/' % (self.slug) diff --git a/app/unused_apps/projects/models/natparks.py b/app/unused_apps/projects/models/natparks.py deleted file mode 100644 index 980d9fa..0000000 --- a/app/unused_apps/projects/models/natparks.py +++ /dev/null @@ -1,55 +0,0 @@ -import datetime -from PIL import Image -from django.contrib.gis.db import models -from django.conf import settings -from jrnl.models import Entry -from photos.models import PhotoGallery -from locations.models import State - - -def get_upload_path(self, filename): - return "images/projects/np/%s/%s" % (datetime.datetime.today().strftime("%Y"), filename) - - -class NationalParks(models.Model): - type = models.CharField(max_length=50) - name = models.CharField(max_length=254) - state = models.ForeignKey(State, on_delete=models.CASCADE, null=True) - size = models.CharField(max_length=10, null=True) - fee = models.CharField(max_length=5, null=True) - camping_fee = models.CharField(max_length=10, null=True) - url = models.CharField(max_length=250, null=True) - code = models.CharField(max_length=16) - unit_name = models.CharField(max_length=254) - date_visited_begin = models.DateField('Date Visited', null=True) - date_visited_end = models.DateField('Date Visited', null=True) - date_park_created = models.DateField('Date Park Created', null=True) - zoom = models.IntegerField(null=True) - mpoly = models.MultiPolygonField(null=True) - visited = models.BooleanField(default=False) - dek = models.TextField(null=True, blank=True) - tag_line = models.CharField(max_length=254, null=True) - post = models.ForeignKey(Entry, on_delete=models.CASCADE, null=True) - gallery = models.ForeignKey(PhotoGallery, on_delete=models.CASCADE, blank=True, null=True, verbose_name='photo set') - image = models.FileField(upload_to=get_upload_path, null=True, blank=True, - help_text="width: 980px, height: > 450px") - image_height = models.CharField(max_length=20, null=True, blank=True) - image_width = models.CharField(max_length=20, null=True, blank=True) - - class Meta: - verbose_name_plural = "National Parks" - app_label = 'projects' - ordering = ('-visited', 'unit_name',) - - def __str__(self): - return self.unit_name - - @property - def get_image_url(self): - return "%s%s" % (settings.IMAGES_URL, self.image.name[7:]) - - def save(self): - #get image dimensions - img = Image.open(self.image) - self.image_width, self.image_height = img.size - super(NationalParks, self).save() diff --git a/app/unused_apps/projects/models/self_experiments.py b/app/unused_apps/projects/models/self_experiments.py deleted file mode 100644 index be9d0b7..0000000 --- a/app/unused_apps/projects/models/self_experiments.py +++ /dev/null @@ -1,56 +0,0 @@ -import datetime -from django.db import models - -import markdown - -PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), -) - - -def markdown_processor(md): - return markdown.markdown(md, ['footnotes'], safe_mode=False) - - -class Experiment(models.Model): - title = models.CharField(max_length=254) - slug = models.SlugField() - date_created = models.DateField(auto_now_add=True) - date_start = models.DateField() - date_end_actual = models.DateField(blank=True, null=True) - date_end_projected = models.DateField(blank=True) - duration = models.PositiveSmallIntegerField(default=30) - status = models.IntegerField(choices=PUB_STATUS, default=0) - body_html = models.TextField(blank=True) - body_markdown = models.TextField() - - class Meta: - app_label = 'projects' - ordering = ('-date_start',) - - # Returns the string representation of the model. - def __str__(self): - return self.title - - def get_absolute_url(self): - return "/projects/experiments/%s/%s/" % (self.pub_date.strftime("%Y").lower(), self.slug) - - def days_remaining(self): - return self.date_end_projected - datetime.date.today() - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - def comment_period_open(self): - return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date - - def save(self): - self.body_html = markdown_processor(self.body_markdown) - self.date_end_projected = self.date_start + datetime.timedelta(self.duration) - super(Experiment, self).save() diff --git a/app/unused_apps/projects/natparks.js b/app/unused_apps/projects/natparks.js deleted file mode 100644 index 8481408..0000000 --- a/app/unused_apps/projects/natparks.js +++ /dev/null @@ -1,94 +0,0 @@ -//Utility functions for map info window -function mapit(lat,lon,zoom,id) { - map = L.map(document.getElementById("map-wrapper-"+id)); - centerCoord = new L.LatLng(lat, lon); - zoom = zoom; - L.tileLayer.provider('Esri.WorldTopoMap', {maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Tiles © Esri and the GIS User Community'}).addTo(map); - map.setView(centerCoord, zoom); - ////get the geojson for this map - $.ajax({ - url: "/projects/data/natparks/"+id+".json", - dataType: "json", - success: function(data, text, request) { draw_poly(data, map); } - //complete: function(xhr, status) {console.log(status); return false; }, - }); - //draw the polygon - function draw_poly(data, map) { - var myStyle = { - "color": "#201a11", - "weight": 2, - "opacity": 0.65 - }; - L.geoJson(data, { - style: myStyle - }).addTo(map); - } -} - -// utility functions to create/remove map container -function create_map(obj) { - var lat = parseFloat(obj.attr('data-latitude')); - var lon = parseFloat(obj.attr('data-longitude')); - var zoom= parseInt(obj.attr('data-zoom')); - var id= obj.attr('data-id'); - - //create container divs - $(obj).parents().eq(3).append('
    '); - $('#map-container-'+id).append('
    '); - mapit(lat,lon,zoom,id); -} -function remove_map(id) { - $(id).remove(); -} - -//functions to handle the "more" link -// utility functions to create/remove camera info container -function get_exif(obj,id) { - //$(obj).parents().eq(2).append('
    '); - $(obj).parents().eq(3).append('
    '); $(obj).parents().eq(2).children('.meta').clone().appendTo('#'+id).css('visibility', 'visible'); - - - - //deal with the variable height of div.legend - $('#exif-container').css({ - bottom: function(index, value) { - return parseFloat($(obj).parent().parent().css("height"))-14; - } - }); -} -function remove_exif(id) { - $('#'+id).remove(); -} -$(document).ready(function(){ -//set up click events for map button - $('.map-link').click( function() { - var more_id = 'more-container-'+$(this).parent().next().children('.more-link').attr('id').split('-')[1]; - var id = '#map-container-'+$(this).attr('data-id'); - if ($('#'+more_id).is(":visible")){ - remove_exif(more_id); - } - if ($(id).is(":visible")) { - remove_map(id); - } else { - create_map($(this)); - } - return false; - - }); - - //set up click events for more info button - $('.more-link').click( function() { - var map_id = '#map-container-'+$(this).parent().prev().children('.map-link').attr('data-id'); - var id = 'more-container-'+this.id.split('-')[1]; - if ($(map_id).is(":visible")){ - remove_map(map_id); - } - if ($('#'+id).is(":visible")) { - remove_exif(id); - } else { - get_exif(this, id); - } - return false; - }); - -}); diff --git a/app/unused_apps/projects/shortcuts.py b/app/unused_apps/projects/shortcuts.py deleted file mode 100644 index 90b1bb6..0000000 --- a/app/unused_apps/projects/shortcuts.py +++ /dev/null @@ -1,235 +0,0 @@ -from django.contrib.gis.db.models.fields import GeometryField -#from django.contrib.gis.gdal import Envelope -from django.contrib.gis.geos import Polygon -import json -from django.http import HttpResponse -#from django.db.models.fields.related import ManyRelatedManager - -# also need to check out: -# http://code.google.com/p/dojango/source/browse/trunk/dojango/util/__init__.py#82 - - -# example usages: - -""" - -def a_shapes(request): - ids = request.GET.get('ids').split(',') - mimetype = 'text/plain' #'application/javascript; charset=utf8' - pretty_print = True - if ids: - qs = WorldBorders.objects.filter(affiliates__in=ids).annotate(num_a=Count('affiliates')).filter(num_a__gt=0) - else: - qs = WorldBorders.objects.none() - return render_to_geojson(qs, - extra_attributes=['num_a','affiliates_set'], - geom_attribute='point', - included_fields=['id','name'], - mimetype=mimetype, - proj_transform=900913, - pretty_print=pretty_print - ) - -def responses(qs,type_='countries',pretty_print=True,mimetype='text/plain'): - if type_ == 'locations': - qs = qs.geolocations() - return render_to_geojson(qs, - excluded_fields=['json'], - geom_field='point', - proj_transform=900913, - mimetype=mimetype, - pretty_print=pretty_print - ) - elif type_ == 'affiliates': - qs = qs.exclude(geokeywords='').attach_locations() - return render_to_geojson(qs, - included_fields=['id','_geokeywords_cache'], - geom_attribute='point', - extra_attributes=['name'], - proj_transform=900913, - mimetype=mimetype, - pretty_print=pretty_print - ) - elif type_ == 'countries': - qs2 = W.objects.filter(affiliates__in=qs).annotate(num_a=Count('affiliates')).filter(num_a__gt=0) - return render_to_geojson(qs2, - extra_attributes=['num_a'], - #geom_attribute='point', - mimetype=mimetype, - pretty_print=pretty_print - ) - else:# type_ == 'countries' or type is None: - if len(qs) > 10: - # this is a limit, weird huh? - # requires another all() otherwise it - # returns a list! - qs = qs.all()[:10] - return render_to_geojson(qs, - included_fields=['id','_geokeywords_cache'], - geom_attribute='countries.unionagg', - extra_attributes=['name'], - mimetype=mimetype, - pretty_print=pretty_print - ) -""" - - - -def render_to_geojson(query_set, geom_field=None, geom_attribute=None, extra_attributes=[],mimetype='text/plain', pretty_print=False, excluded_fields=[],included_fields=[],proj_transform=None): - ''' - - Shortcut to render a GeoJson FeatureCollection from a Django QuerySet. - Currently computes a bbox and adds a crs member as a sr.org link - - ''' - excluded_fields.append('_state') - collection = {} - if hasattr(query_set,'_meta'): # its a model instance - fields = query_set._meta.fields - query_set = [query_set] - else: - fields = query_set.model._meta.fields - - if geom_attribute: - geometry_name = geom_attribute - geo_field = None - if '.' in geom_attribute: - prop, meth = geom_attribute.split('.') - if len(query_set): - p = getattr(query_set[0],prop) - geo_field = getattr(p,meth) - if callable(geo_field): - geo_field = geo_field() - else: - if len(query_set): - geo_field = getattr(query_set[0],geom_attribute) - if callable(geo_field): - geo_field = geo_field() - if not geo_field: - srid = 4326 - else: - srid = geo_field.srid - - else: - geo_fields = [f for f in fields if isinstance(f, GeometryField)] - - #attempt to assign geom_field that was passed in - if geom_field: - #import pdb;pdb.set_trace() - geo_fieldnames = [x.name for x in geo_fields] - try: - geo_field = geo_fields[geo_fieldnames.index(geom_field)] - except: - raise Exception('%s is not a valid geometry on this model' % geom_field) - else: - if not len(geo_fields): - raise Exception('There appears to be no valid geometry on this model') - geo_field = geo_fields[0] # no support yet for multiple geometry fields - - - #remove other geom fields from showing up in attributes - if len(geo_fields) > 1: - for field in geo_fields: - if field.name not in excluded_fields: - excluded_fields.append(field.name) - - geometry_name = geo_field.name - - - srid = geo_field.srid - - if proj_transform: - to_srid = proj_transform - else: - to_srid = srid - # Gather the projection information - crs = {} - crs['type'] = "link" - crs_properties = {} - crs_properties['href'] = 'http://spatialreference.org/ref/epsg/%s/' % to_srid - crs_properties['type'] = 'proj4' - crs['properties'] = crs_properties - collection['crs'] = crs - collection['srid'] = to_srid - - # Build list of features - features = [] - if query_set.distinct(): - for item in query_set: - feat = {} - feat['type'] = 'Feature' - if included_fields: - d = {} - for f in included_fields: - if hasattr(item,f): - d[f] = getattr(item,f) - else: - d = item.__dict__.copy() - for field in excluded_fields: - if field in d.keys(): - d.pop(field) - if geometry_name in d: - d.pop(geometry_name) - - for attr in extra_attributes: - a = getattr(item,attr) - # crappy way of trying to figure out it this is a - # m2m, aka 'ManyRelatedManager' - if hasattr(a,'values_list'): - a = list(a.values_list('id',flat=True)) - if callable(a): - d[attr] = a() - else: - d[attr] = a - if '.' in geometry_name: - prop, meth = geometry_name.split('.') - a = getattr(item,prop) - g = getattr(a,meth) - if callable(g): - g = g() - else: - g = getattr(item,geometry_name) - if g: - if proj_transform: - g.transform(proj_transform) - feat['geometry'] = json.loads(g.geojson) - feat['properties'] = d - features.append(feat) - else: - pass #features.append({'type':'Feature','geometry': {},'properties':{}}) - - # Label as FeatureCollection and add Features - collection['type'] = "FeatureCollection" - collection['features'] = features - - # Attach extent of all features - if query_set: - ex = None - query_set.query.distinct = False - if hasattr(query_set,'agg_extent'): - ex = [x for x in query_set.agg_extent.tuple] - elif '.' in geometry_name: - prop, meth = geometry_name.split('.') - a = getattr(item,prop) - if a: - ex = [x for x in a.extent()] - else: - # make sure qs does not have .distinct() in it... - ex = [x for x in query_set.extent()] - if ex: - if proj_transform: - poly = Polygon.from_bbox(ex) - poly.srid = srid - poly.transform(proj_transform) - ex = poly.extent - collection['bbox'] = ex - - # Return response - response = HttpResponse() - if pretty_print: - response.write('%s' % json.dumps(collection, indent=1)) - else: - response.write('%s' % json.dumps(collection)) - response['Content-length'] = str(len(response.content)) - response['Content-Type'] = mimetype - return response diff --git a/app/unused_apps/projects/urls.py b/app/unused_apps/projects/urls.py deleted file mode 100644 index 8e56b16..0000000 --- a/app/unused_apps/projects/urls.py +++ /dev/null @@ -1,29 +0,0 @@ -from django.conf.urls import url -from django.views.generic import ListView -from projects.models.base import Project - -from . import views - -app_name = "project" - -urlpatterns = [ - url( - r'data/(?P\d+)/$', - views.data_json - ), - url( - r'gifs/(?P[-\w]+)/$', - views.gif_detail - ), - url( - r'(?P[-\w]+)/$', - views.detail - ), - url( - r'^$', - ListView.as_view( - queryset=Project.objects.filter(status__exact=1).order_by('-pub_date'), - template_name="archives/projects.html", - ) - ), -] diff --git a/app/unused_apps/projects/views.py b/app/unused_apps/projects/views.py deleted file mode 100644 index ad5f167..0000000 --- a/app/unused_apps/projects/views.py +++ /dev/null @@ -1,45 +0,0 @@ -from django.shortcuts import render, get_object_or_404 -from django.template import RequestContext -from django.apps import apps - -from projects.shortcuts import render_to_geojson -from projects.models.natparks import NationalParks -from projects.models.gifs import AnimatedGif - -projects = { - '5x5': 'FiveBy', - '6x6': 'SixBy', - 'national-parks': 'NationalParks', - 'code': 'Code' -} - - -def detail(request, slug): - """Projects by slug""" - name = projects[slug] - model = apps.get_model('projects', name) - if slug == 'national-parks': - qs = model.objects.filter(visited__exact=True).order_by("-date_visited_begin") - else: - qs = model.objects.filter(status__exact=1) - context = { - "object_list": qs, - } - template = 'details/%s.html' % (slug) - return render(request, template, context) - - -def gif_detail(request, slug): - obj = get_object_or_404(AnimatedGif, slug__exact=slug) - return render(request, 'details/gifs.html', {'object': obj}) - - -def data_json(request, id): - qs = NationalParks.objects.filter(pk=id) - return render_to_geojson( - qs, - included_fields=['id'], - geom_attribute='mpoly', - mimetype='application/json', - pretty_print=True - ) diff --git a/app/unused_apps/prompts/__init__.py b/app/unused_apps/prompts/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/prompts/admin.py b/app/unused_apps/prompts/admin.py deleted file mode 100644 index f12c904..0000000 --- a/app/unused_apps/prompts/admin.py +++ /dev/null @@ -1,30 +0,0 @@ -from django.contrib import admin - -from utils.widgets import LGEntryForm -from .models import Prompt - - -@admin.register(Prompt) -class PromptAdmin(admin.ModelAdmin): - form = LGEntryForm - prepopulated_fields = {"slug": ('title',)} - list_display = ('title', 'source', 'prompt_type') - list_filter = ('source', 'prompt_type') - fieldsets = ( - ('Prompt', { - 'fields': ( - 'title', - 'subtitle', - 'body_markdown', - ('pub_date', 'prompt_type'), - ('slug','source'), - 'meta_description' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) diff --git a/app/unused_apps/prompts/migrations/0001_initial.py b/app/unused_apps/prompts/migrations/0001_initial.py deleted file mode 100644 index c5a24ec..0000000 --- a/app/unused_apps/prompts/migrations/0001_initial.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-20 22:52 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Prompt', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('subtitle', models.CharField(max_length=200)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('source', models.CharField(max_length=350)), - ], - options={ - 'ordering': ('-pub_date',), - 'get_latest_by': 'pub_date', - }, - ), - ] diff --git a/app/unused_apps/prompts/migrations/0002_auto_20190228_0941.py b/app/unused_apps/prompts/migrations/0002_auto_20190228_0941.py deleted file mode 100644 index 5b66a99..0000000 --- a/app/unused_apps/prompts/migrations/0002_auto_20190228_0941.py +++ /dev/null @@ -1,34 +0,0 @@ -# Generated by Django 2.1.7 on 2019-02-28 09:41 - -import datetime -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('prompts', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='prompt', - name='pub_date', - field=models.DateTimeField(default=datetime.datetime.now), - ), - migrations.AlterField( - model_name='prompt', - name='slug', - field=models.SlugField(blank=True, unique_for_date='pub_date'), - ), - migrations.AlterField( - model_name='prompt', - name='source', - field=models.CharField(blank=True, max_length=350), - ), - migrations.AlterField( - model_name='prompt', - name='subtitle', - field=models.CharField(blank=True, max_length=200), - ), - ] diff --git a/app/unused_apps/prompts/migrations/0003_prompt_prompt_type.py b/app/unused_apps/prompts/migrations/0003_prompt_prompt_type.py deleted file mode 100644 index d027c6e..0000000 --- a/app/unused_apps/prompts/migrations/0003_prompt_prompt_type.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.2 on 2020-07-05 22:04 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('prompts', '0002_auto_20190228_0941'), - ] - - operations = [ - migrations.AddField( - model_name='prompt', - name='prompt_type', - field=models.IntegerField(choices=[(0, 'Meditation'), (1, 'Writing'), (2, 'Kids Writing')], default=0), - ), - ] diff --git a/app/unused_apps/prompts/migrations/__init__.py b/app/unused_apps/prompts/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/prompts/models.py b/app/unused_apps/prompts/models.py deleted file mode 100644 index 7b5dc71..0000000 --- a/app/unused_apps/prompts/models.py +++ /dev/null @@ -1,94 +0,0 @@ -import datetime -from django.contrib.gis.db import models -from django.urls import reverse -from django.apps import apps - -from utils.util import render_images, markdown_to_html - - -class Source(models.Model): - name = models.CharField(max_length=200) - link = models.CharField(max_length=400) - SOURCE_TYPE = ( - (0, 'Book'), - (1, 'Website'), - (2, 'Other'), - ) - source_type = models.IntegerField(choices=SOURCE_TYPE, default=0) - - class Meta: - ordering = ('name',) - - def __str__(self): - return self.name - - -class Prompt(models.Model): - title = models.CharField(max_length=200) - subtitle = models.CharField(max_length=200, blank=True) - meta_description = models.CharField(max_length=256, null=True, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - body_markdown = models.TextField() - body_html = models.TextField(blank=True) - pub_date = models.DateTimeField(default=datetime.datetime.now) - source = models.CharField(max_length=350, blank=True) - PROMPT_TYPE = ( - (0, 'Meditation'), - (1, 'Writing'), - (2, 'Kids Writing'), - ) - prompt_type = models.IntegerField(choices=PROMPT_TYPE, default=0) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("prompt:detail", kwargs={"slug": self.slug}) - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' % (self._meta.app_label, self._meta.model_name), args=[n.id]) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' % (self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk]) - except model.DoesNotExist: - return '' - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - super(Prompt, self).save(*args, **kwargs) - - - -class Source(models.Model): - name = models.CharField(max_length=200) - link = models.CharField(max_length=400) - SOURCE_TYPE = ( - (0, 'Book'), - (1, 'Website'), - (2, 'Other'), - ) - source_type = models.IntegerField(choices=SOURCE_TYPE, default=0) - - class Meta: - ordering = ('name',) - - def __str__(self): - return self.name diff --git a/app/unused_apps/prompts/urls.py b/app/unused_apps/prompts/urls.py deleted file mode 100644 index 7cbe09a..0000000 --- a/app/unused_apps/prompts/urls.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.urls import path - -from . import views - -app_name = "prompts" - -urlpatterns = [ - path( - r'', - views.RandomList.as_view(), - name="random-prompt" - ), -] diff --git a/app/unused_apps/prompts/views.py b/app/unused_apps/prompts/views.py deleted file mode 100644 index 4744299..0000000 --- a/app/unused_apps/prompts/views.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.views.generic.detail import DetailView - -from .models import Prompt - - -class PromptList(DetailView): - model = Prompt - - def get_object(self, queryset): - """ This might be faster: random.choice(Prompt.objects.all())""" - return Prompt.objects.order_by('?').first() diff --git a/app/unused_apps/publications/__init__.py b/app/unused_apps/publications/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/publications/admin.py b/app/unused_apps/publications/admin.py deleted file mode 100644 index 15456d5..0000000 --- a/app/unused_apps/publications/admin.py +++ /dev/null @@ -1,85 +0,0 @@ -from django.contrib import admin -from utils.widgets import LGEntryForm - -from .models import Publication, Editor, Pitch, Section, PitchIdea - - -@admin.register(Publication) -class PublicationAdmin(admin.ModelAdmin): - form = LGEntryForm - list_display = ('name', 'status') - list_filter = ('status',) - search_fields = ['name'] - fieldsets = ( - ('', { - 'fields': ( - 'name', - 'url', - 'notes', - ('section', 'tags'), - ('pays', 'pays_amount'), - ('submission_period_start', 'submission_period_end'), - 'status' - ), - 'classes': ('show', 'extrapretty', 'wide') - }), - ) - - -@admin.register(Editor) -class EditorAdmin(admin.ModelAdmin): - list_display = ('last_name', 'first_name', 'publication', 'sections') - list_filter = ('publication', 'section') - search_fields = ['first_name', 'last_name', 'publication__name', 'section'] - filter_horizontal = ('section',) - - def sections(self, obj): - return [section for section in obj.section.all()] - sections.boolean = False - - fieldsets = ( - ('', { - 'fields': ('first_name', 'last_name', 'email', 'publication', 'section', 'notes', 'phone', 'twitter'), - 'classes': ('show', 'extrapretty', 'wide') - }), - ) - - -@admin.register(Pitch) -class PitchAdmin(admin.ModelAdmin): - list_display = ('title', 'date_sent', 'accepted', 'editor', 'publication') - list_filter = ('editor__publication', 'editor__section') - - def publication(self, obj): - return obj.editor.publication - publication.boolean = False - - fieldsets = ( - ('', { - 'fields': ('title', 'pitch', 'editor', 'accepted', 'date_sent'), - 'classes': ('show', 'extrapretty', 'wide') - }), - ) - - -@admin.register(PitchIdea) -class PitchIdeaAdmin(admin.ModelAdmin): - list_display = ('title', ) - - fieldsets = ( - ('', { - 'fields': ('title', 'pitch', 'publication'), - 'classes': ('show', 'extrapretty', 'wide') - }), - ) - - -@admin.register(Section) -class SectionAdmin(admin.ModelAdmin): - list_display = ('name',) - fieldsets = ( - ('', { - 'fields': ('name',), - 'classes': ('show', 'extrapretty', 'wide') - }), - ) diff --git a/app/unused_apps/publications/migrations/0001_initial.py b/app/unused_apps/publications/migrations/0001_initial.py deleted file mode 100644 index 9212571..0000000 --- a/app/unused_apps/publications/migrations/0001_initial.py +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 08:56 - -from django.db import migrations, models -import django.db.models.deletion -import taggit.managers - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('taxonomy', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Editor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('first_name', models.CharField(max_length=250)), - ('last_name', models.CharField(max_length=250)), - ('email', models.CharField(blank=True, max_length=250)), - ('phone', models.CharField(blank=True, max_length=250)), - ('twitter', models.CharField(blank=True, max_length=250)), - ('slug', models.SlugField(blank=True)), - ('notes', models.TextField(blank=True)), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ], - options={ - 'ordering': ('-last_name', '-date_created'), - }, - ), - migrations.CreateModel( - name='Pitch', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=250)), - ('pitch', models.TextField()), - ('slug', models.SlugField(blank=True)), - ('accepted', models.BooleanField(blank=True, null=True)), - ('date_sent', models.DateTimeField(blank=True, null=True)), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ('editor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='publications.Editor')), - ], - options={ - 'ordering': ('-title', '-date_sent'), - }, - ), - migrations.CreateModel( - name='Publication', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=250)), - ('slug', models.SlugField(blank=True, unique_for_date='pub_date')), - ('notes', models.TextField(blank=True)), - ('status', models.IntegerField(choices=[(0, 'Have Published With'), (1, 'Published')], default=0)), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ('tags', taggit.managers.TaggableManager(blank=True, help_text='Topics Covered', through='taxonomy.TaggedItems', to='taxonomy.LuxTag', verbose_name='Tags')), - ], - options={ - 'ordering': ('-name', '-date_created'), - }, - ), - migrations.AddField( - model_name='editor', - name='publication', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='publications.Publication'), - ), - ] diff --git a/app/unused_apps/publications/migrations/0002_editor_section.py b/app/unused_apps/publications/migrations/0002_editor_section.py deleted file mode 100644 index a4675ae..0000000 --- a/app/unused_apps/publications/migrations/0002_editor_section.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 09:00 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('publications', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='editor', - name='section', - field=models.CharField(blank=True, max_length=50), - ), - ] diff --git a/app/unused_apps/publications/migrations/0003_auto_20190131_0923.py b/app/unused_apps/publications/migrations/0003_auto_20190131_0923.py deleted file mode 100644 index 6844c55..0000000 --- a/app/unused_apps/publications/migrations/0003_auto_20190131_0923.py +++ /dev/null @@ -1,37 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 09:23 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('publications', '0002_editor_section'), - ] - - operations = [ - migrations.CreateModel( - name='Section', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=250)), - ('slug', models.SlugField(blank=True)), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ], - ), - migrations.RemoveField( - model_name='editor', - name='section', - ), - migrations.AlterField( - model_name='publication', - name='status', - field=models.IntegerField(choices=[(0, 'Not Published'), (1, 'Published')], default=0), - ), - migrations.AddField( - model_name='editor', - name='section', - field=models.ManyToManyField(blank=True, to='publications.Section'), - ), - ] diff --git a/app/unused_apps/publications/migrations/0004_pitchidea.py b/app/unused_apps/publications/migrations/0004_pitchidea.py deleted file mode 100644 index db72d58..0000000 --- a/app/unused_apps/publications/migrations/0004_pitchidea.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 10:46 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('publications', '0003_auto_20190131_0923'), - ] - - operations = [ - migrations.CreateModel( - name='PitchIdea', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=250)), - ('pitch', models.TextField()), - ('date_created', models.DateTimeField(auto_now_add=True)), - ('date_updated', models.DateTimeField(auto_now=True)), - ('publication', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='publications.Publication')), - ], - options={ - 'ordering': ('-title', '-date_created'), - }, - ), - ] diff --git a/app/unused_apps/publications/migrations/0005_auto_20190131_1100.py b/app/unused_apps/publications/migrations/0005_auto_20190131_1100.py deleted file mode 100644 index a800dcf..0000000 --- a/app/unused_apps/publications/migrations/0005_auto_20190131_1100.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.1 on 2019-01-31 11:00 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('publications', '0004_pitchidea'), - ] - - operations = [ - migrations.AddField( - model_name='publication', - name='section', - field=models.ManyToManyField(blank=True, to='publications.Section'), - ), - migrations.AddField( - model_name='publication', - name='url', - field=models.CharField(blank=True, max_length=250), - ), - ] diff --git a/app/unused_apps/publications/migrations/0006_auto_20190222_1819.py b/app/unused_apps/publications/migrations/0006_auto_20190222_1819.py deleted file mode 100644 index 8c779dd..0000000 --- a/app/unused_apps/publications/migrations/0006_auto_20190222_1819.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 2.1.5 on 2019-02-22 18:19 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('publications', '0005_auto_20190131_1100'), - ] - - operations = [ - migrations.AddField( - model_name='publication', - name='pays', - field=models.BooleanField(default=True), - ), - migrations.AddField( - model_name='publication', - name='pays_amount', - field=models.CharField(blank=True, max_length=100), - ), - migrations.AddField( - model_name='publication', - name='submission_period_end', - field=models.DateField(blank=True, null=True), - ), - migrations.AddField( - model_name='publication', - name='submission_period_start', - field=models.DateField(blank=True, null=True), - ), - ] diff --git a/app/unused_apps/publications/migrations/__init__.py b/app/unused_apps/publications/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/publications/models.py b/app/unused_apps/publications/models.py deleted file mode 100644 index 05f7267..0000000 --- a/app/unused_apps/publications/models.py +++ /dev/null @@ -1,133 +0,0 @@ -from django.contrib.gis.db import models -from django.utils import timezone -from django.utils.text import slugify -from django.urls import reverse - -from taggit.managers import TaggableManager - -from taxonomy.models import TaggedItems - - -class Section(models.Model): - """ Generic model for Categories """ - name = models.CharField(max_length=250) - slug = models.SlugField(blank=True) - date_created = models.DateTimeField(blank=True, auto_now_add=True, editable=False) - date_updated = models.DateTimeField(blank=True, auto_now=True, editable=False) - - def __str__(self): - return self.name - - def save(self, *args, **kwargs): - if self._state.adding: - self.slug = slugify(self.name)[:50] - super(Section, self).save() - - -class Publication(models.Model): - name = models.CharField(max_length=250) - url = models.CharField(max_length=250, blank=True) - section = models.ManyToManyField(Section, blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - notes = models.TextField(blank=True) - tags = TaggableManager(through=TaggedItems, blank=True, help_text='Topics Covered') - PUB_STATUS = ( - (0, 'Not Published'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - date_created = models.DateTimeField(blank=True, auto_now_add=True, editable=False) - date_updated = models.DateTimeField(blank=True, auto_now=True, editable=False) - pays = models.BooleanField(default=True) - pays_amount = models.CharField(max_length=100, blank=True) - submission_period_start = models.DateField(blank=True, null=True) - submission_period_end = models.DateField(blank=True, null=True) - - class Meta: - ordering = ('-name', '-date_created') - - def __str__(self): - return self.name - - def get_absolute_url(self): - return reverse("publications:pub-detail", kwargs={"slug": self.slug}) - - def save(self, *args, **kwargs): - if not self.id: - self.date_created = timezone.now() - self.date_updated = timezone.now() - super(Publication, self).save() - - -class Editor(models.Model): - first_name = models.CharField(max_length=250) - last_name = models.CharField(max_length=250) - email = models.CharField(max_length=250, blank=True) - phone = models.CharField(max_length=250, blank=True) - twitter = models.CharField(max_length=250, blank=True) - slug = models.SlugField(blank=True) - notes = models.TextField(blank=True) - publication = models.ForeignKey(Publication, on_delete=models.SET_NULL, blank=True, null=True) - section = models.ManyToManyField(Section, blank=True) - date_created = models.DateTimeField(blank=True, auto_now_add=True, editable=False) - date_updated = models.DateTimeField(blank=True, auto_now=True, editable=False) - - class Meta: - ordering = ('-last_name', '-date_created') - - def __str__(self): - return "{0} {1}".format(self.first_name, self.last_name) - - def get_absolute_url(self): - return reverse("publications:pub-detail", kwargs={"slug": self.slug}) - - def save(self, *args, **kwargs): - if self._state.adding: - self.slug = slugify('%s %s' % (self.first_name, self.last_name))[:50] - self.date_created = timezone.now() - self.date_updated = timezone.now() - super(Editor, self).save() - - -class Pitch(models.Model): - title = models.CharField(max_length=250) - pitch = models.TextField() - slug = models.SlugField(blank=True) - editor = models.ForeignKey(Editor, on_delete=models.SET_NULL, blank=True, null=True) - accepted = models.BooleanField(null=True, blank=True) - date_sent = models.DateTimeField(blank=True, null=True) - date_created = models.DateTimeField(blank=True, auto_now_add=True, editable=False) - date_updated = models.DateTimeField(blank=True, auto_now=True, editable=False) - - class Meta: - ordering = ('-title', '-date_sent') - - def __str__(self): - return self.title - - def save(self, *args, **kwargs): - if self._state.adding: - self.slug = slugify(self.title)[:50] - self.date_created = timezone.now() - self.date_updated = timezone.now() - super(Pitch, self).save() - - -class PitchIdea(models.Model): - title = models.CharField(max_length=250) - pitch = models.TextField() - publication = models.ForeignKey(Publication, on_delete=models.SET_NULL, blank=True, null=True) - date_created = models.DateTimeField(blank=True, auto_now_add=True, editable=False) - date_updated = models.DateTimeField(blank=True, auto_now=True, editable=False) - - class Meta: - ordering = ('-title', '-date_created') - - def __str__(self): - return self.title - - def save(self, *args, **kwargs): - if self._state.adding: - self.date_created = timezone.now() - self.date_updated = timezone.now() - super(PitchIdea, self).save() diff --git a/app/unused_apps/publications/urls.py b/app/unused_apps/publications/urls.py deleted file mode 100644 index 3f43b32..0000000 --- a/app/unused_apps/publications/urls.py +++ /dev/null @@ -1,24 +0,0 @@ -from django.urls import path - -from . import views - -app_name = "publications" - -urlpatterns = [ - path( - r'', - views.PubListView.as_view(), - {'page': 1}, - name="list" - ), - path( - r'/', - views.PubListView.as_view(), - name="list" - ), - path( - r'', - views.PubsDetailView.as_view(), - name="pub-detail" - ), -] diff --git a/app/unused_apps/publications/views.py b/app/unused_apps/publications/views.py deleted file mode 100644 index 0398dcb..0000000 --- a/app/unused_apps/publications/views.py +++ /dev/null @@ -1,20 +0,0 @@ -from django.views.generic.detail import DetailView - -from utils.views import PaginatedListView - -from .models import Publication - - -class PubListView(PaginatedListView): - """ - Return a list of Publications - """ - queryset = Publication.objects.all() - - -class PubDetailView(DetailView): - """ - Return a detail view of Publication - """ - model = Publication - slug_field = "slug" diff --git a/app/unused_apps/sketches/__init__.py b/app/unused_apps/sketches/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/sketches/admin.py b/app/unused_apps/sketches/admin.py deleted file mode 100644 index 0c59867..0000000 --- a/app/unused_apps/sketches/admin.py +++ /dev/null @@ -1,42 +0,0 @@ -from django.contrib import admin -from django.contrib.gis.admin import OSMGeoAdmin -from django.contrib.contenttypes.admin import GenericTabularInline - -from .models import Sketch -from utils.widgets import LGEntryForm, OLAdminBase -from utils.util import get_latlon - - -@admin.register(Sketch) -class SketchAdmin(OLAdminBase): - form = LGEntryForm - prepopulated_fields = {"slug": ('title',)} - list_display = ('title', 'slug', 'pub_date', 'location') - fieldsets = ( - ('Note', { - 'fields': ( - 'title', - 'subtitle', - 'body_markdown', - 'slug', - ('pub_date', 'status'), - 'point' - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - lat, lon = get_latlon() - default_lon = lon - default_lat = lat - default_zoom = 10 - - class Media: - js = ('image-loader.js', 'next-prev-links.js') - - - diff --git a/app/unused_apps/sketches/build.py b/app/unused_apps/sketches/build.py deleted file mode 100644 index e75b6fd..0000000 --- a/app/unused_apps/sketches/build.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -from django.urls import reverse -from builder.base import BuildNew - - -class BuildSketches(BuildNew): - - def build(self): - self.build_detail_view() - self.build_list_view( - base_path=reverse("sketches:list"), - paginate_by=24 - ) - self.build_year_view("sketches:list_year") - self.build_month_view("sketches:list_month") - - def get_model_queryset(self): - return self.model.objects.all() - - def build_detail_view(self): - ''' - write out all the expenses for each trip - ''' - for obj in self.get_model_queryset(): - url = obj.get_absolute_url() - path, slug = os.path.split(url) - path = '%s/' % path - # write html - response = self.client.get(url) - print(path, slug) - self.write_file(path, response.content, filename=slug) - - -def builder(): - j = BuildSketches("sketches", "sketch") - j.build() diff --git a/app/unused_apps/sketches/migrations/0001_initial.py b/app/unused_apps/sketches/migrations/0001_initial.py deleted file mode 100644 index 1e034b4..0000000 --- a/app/unused_apps/sketches/migrations/0001_initial.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 2.0.1 on 2018-02-01 20:56 - -import django.contrib.gis.db.models.fields -from django.db import migrations, models -import django.db.models.deletion -import django.utils.timezone - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('locations', '0002_checkin'), - ] - - operations = [ - migrations.CreateModel( - name='Sketch', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(blank=True, max_length=250, null=True)), - ('slug', models.SlugField(blank=True, unique_for_date='pub_date')), - ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField(verbose_name='Note')), - ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=1)), - ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')), - ], - ), - ] diff --git a/app/unused_apps/sketches/migrations/0002_auto_20180208_0743.py b/app/unused_apps/sketches/migrations/0002_auto_20180208_0743.py deleted file mode 100644 index 664fcbc..0000000 --- a/app/unused_apps/sketches/migrations/0002_auto_20180208_0743.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.0.1 on 2018-02-08 07:43 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('sketches', '0001_initial'), - ] - - operations = [ - migrations.AlterModelOptions( - name='sketch', - options={'get_latest_by': 'pub_date', 'ordering': ('-pub_date',), 'verbose_name_plural': 'sketches'}, - ), - ] diff --git a/app/unused_apps/sketches/migrations/0003_auto_20190303_1057.py b/app/unused_apps/sketches/migrations/0003_auto_20190303_1057.py deleted file mode 100644 index 87cfbf1..0000000 --- a/app/unused_apps/sketches/migrations/0003_auto_20190303_1057.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.1.7 on 2019-03-03 10:57 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('sketches', '0002_auto_20180208_0743'), - ] - - operations = [ - migrations.AddField( - model_name='sketch', - name='subtitle', - field=models.CharField(blank=True, max_length=250), - ), - migrations.AlterField( - model_name='sketch', - name='title', - field=models.CharField(blank=True, default='', max_length=250), - preserve_default=False, - ), - ] diff --git a/app/unused_apps/sketches/migrations/__init__.py b/app/unused_apps/sketches/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/sketches/models.py b/app/unused_apps/sketches/models.py deleted file mode 100644 index f6df269..0000000 --- a/app/unused_apps/sketches/models.py +++ /dev/null @@ -1,89 +0,0 @@ -import re -from django.contrib.gis.db import models -from django.utils import timezone -from django.conf import settings -from django import forms -from locations.models import Location -from django.urls import reverse - -from utils.util import render_images, parse_image, markdown_to_html -from locations.models import CheckIn - -def render_images(s): - s = re.sub('', parse_image, s) - return s - -class Sketch(models.Model): - title = models.CharField(max_length=250, blank=True) - subtitle = models.CharField(max_length=250,blank=True) - slug = models.SlugField(unique_for_date='pub_date', blank=True) - pub_date = models.DateTimeField(default=timezone.now) - body_html = models.TextField(blank=True) - body_markdown = models.TextField('Note') - point = models.PointField(blank=True, null=True) - location = models.ForeignKey(Location, on_delete=models.CASCADE, blank=True, null=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=1) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - verbose_name_plural = 'sketches' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse("sketches:detail", kwargs={"year": self.pub_date.year, "month": self.pub_date.strftime("%m"), "slug": self.slug}) - - @property - def region(self): - return self.location.state.country.lux_region - - @property - def longitude(self): - '''Get the site's longitude.''' - return round(self.point.x, 2) - - @property - def latitude(self): - '''Get the site's latitude.''' - return round(self.point.y, 2) - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date() - - @property - def get_next_published(self): - return self.get_next_by_pub_date() - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_pub_date() - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[n.id] ) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' %(self._meta.app_label, self._meta.model_name), args=[self.get_next_by_pub_date().pk] ) - except model.DoesNotExist: - return '' - - def save(self, *args, **kwargs): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - if not self.point: - self.point = CheckIn.objects.latest().point - try: - self.location = Location.objects.filter(geometry__contains=self.point).get() - except Location.DoesNotExist: - raise forms.ValidationError("There is no location associated with that point, add it: %sadmin/locations/location/add/" % (settings.BASE_URL)) - if not self.id: - self.pub_date= timezone.now() - self.date_last_updated = timezone.now() - super(Sketch, self).save() diff --git a/app/unused_apps/sketches/urls.py b/app/unused_apps/sketches/urls.py deleted file mode 100644 index 465a0d2..0000000 --- a/app/unused_apps/sketches/urls.py +++ /dev/null @@ -1,39 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "sketches" - -urlpatterns = [ - re_path( - r'(?P[0-9]{4})/$', - views.SketchYearArchiveView.as_view(), - name="list_year" - ), - path( - r'', - views.SketchListView.as_view(), - {'page': 1}, - name="list" - ), - path( - r'/', - views.SketchListView.as_view(), - name="list" - ), - path( - r'//.txt', - views.SketchDetailViewTXT.as_view(), - name="detail-txt" - ), - path( - r'//', - views.SketchDetailView.as_view(), - name="detail" - ), - path( - r'//', - views.SketchMonthArchiveView.as_view(month_format='%m'), - name="list_month" - ), -] diff --git a/app/unused_apps/sketches/views.py b/app/unused_apps/sketches/views.py deleted file mode 100644 index b696932..0000000 --- a/app/unused_apps/sketches/views.py +++ /dev/null @@ -1,40 +0,0 @@ -from django.views.generic.dates import YearArchiveView, MonthArchiveView -from django.views.generic.detail import DetailView - -from utils.views import PaginatedListView - -from .models import Sketch - - -class SketchListView(PaginatedListView): - """ - Return a list of Notes in reverse chronological order - """ - queryset = Sketch.objects.all().order_by('-pub_date') - template_name = "archives/sketches.html" - - -class SketchDetailView(DetailView): - model = Sketch - template_name = "details/note.html" - slug_field = "slug" - - -class SketchDetailViewTXT(SketchDetailView): - template_name = "details/entry.txt" - - -class SketchYearArchiveView(YearArchiveView): - queryset = Sketch.objects.all() - date_field = "pub_date" - make_object_list = True - allow_future = True - template_name = "archives/notes_date.html" - - -class SketchMonthArchiveView(MonthArchiveView): - queryset = Sketch.objects.all() - date_field = "pub_date" - allow_future = True - template_name = "archives/notes_date.html" - diff --git a/app/unused_apps/src/__init__.py b/app/unused_apps/src/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/src/admin.py b/app/unused_apps/src/admin.py deleted file mode 100644 index f354b15..0000000 --- a/app/unused_apps/src/admin.py +++ /dev/null @@ -1,62 +0,0 @@ -from django.contrib import admin -from .models import Topic, SrcPost, Book -from utils.widgets import LGEntryForm - - -@admin.register(Topic) -class TopicAdmin(admin.ModelAdmin): - prepopulated_fields = {"slug": ('name',), "pluralized_name": ('name',)} - - -@admin.register(Book) -class BookAdmin(admin.ModelAdmin): - prepopulated_fields = {"slug": ('title', )} - list_display = ('title', 'pub_date', 'status') - fieldsets = ( - ('Entry', { - 'fields': ( - 'title', - 'body_markdown', - 'image', - ('pub_date', 'status'), - ('price', 'price_sale'), - 'meta_description', - ('slug', 'template_name', 'pages'), - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - - -@admin.register(SrcPost) -class PostAdmin(admin.ModelAdmin): - form = LGEntryForm - list_display = ('title', 'pub_date', 'enable_comments', 'status') - list_filter = ('pub_date', 'enable_comments', 'status') - prepopulated_fields = {"slug": ('title',)} - fieldsets = ( - ('Entry', { - 'fields': ( - 'title', - 'body_markdown', - ('pub_date', 'status'), - 'topics', - 'meta_description', - ('slug', 'enable_comments', 'has_code', 'template_name'), - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ) - - class Media: - js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/unused_apps/src/build.py b/app/unused_apps/src/build.py deleted file mode 100644 index a16bdaf..0000000 --- a/app/unused_apps/src/build.py +++ /dev/null @@ -1,62 +0,0 @@ -import os -from builder.base import BuildNew -from django.urls import reverse -from . import models - - -class BuildSrc(BuildNew): - - def build(self): - self.build_list_view( - base_path=reverse("src:list"), - paginate_by=99999 - ) - self.build_list_view( - base_path=reverse("src:list_books"), - paginate_by=99999 - ) - self.build_detail_view() - # These are the unique classes for this model: - # self.build_books_view() - self.build_topic_view() - self.build_feed("src:feed") - - def build_topic_view(self): - for topic in models.Topic.objects.all(): - ctype = ContentType.objects.get(app_label='posts', model='post') - for cat in Category.objects.all(): - - url = reverse("src:list_topics", kwargs={'slug': topic.slug, }) - path, slug = os.path.split(url) - response = self.client.get(url, HTTP_HOST='127.0.0.1') - self.write_file('%s/' % path, response.content, filename=slug) - - def build_books_view(self): - for obj in models.Book.objects.all(): - url = reverse("src:detail_book", kwargs={'slug': obj.slug, }) - path, slug = os.path.split(url) - response = self.client.get(url, HTTP_HOST='127.0.0.1') - self.write_file('%s/' % path, response.content, filename=slug) - - -def builder(): - j = BuildSrc("src", "srcpost") - j.build() - - -""" - - - - - def build_books(self): - path = 'src/books/' - c = Context({ - 'object_list': Book.objects.filter(status__exact=1), - 'MEDIA_URL': settings.BAKED_MEDIA_URL, - 'IMAGES_URL': settings.BAKED_IMAGES_URL - }) - t = render_to_string('archives/src_books.html', c).encode('utf-8') - self.write_file(path, t) - -""" diff --git a/app/unused_apps/src/migrations/0001_initial.py b/app/unused_apps/src/migrations/0001_initial.py deleted file mode 100644 index 1f672ee..0000000 --- a/app/unused_apps/src/migrations/0001_initial.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-29 21:06 -from __future__ import unicode_literals - -from django.db import migrations, models -import src.models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='Book', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('image', models.FileField(blank=True, null=True, upload_to=src.models.get_upload_path)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('last_updated', models.DateTimeField(auto_now=True)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)), - ('price', models.FloatField()), - ('price_sale', models.FloatField()), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('pages', models.DecimalField(blank=True, decimal_places=0, max_digits=3, null=True)), - ('template_name', models.CharField(choices=[('details/src_book.html', 'Default'), ('details/src_book_2.html', 'Book Two')], default='details/src_book.html', max_length=200)), - ], - options={ - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date',), - }, - ), - migrations.CreateModel( - name='Entry', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=200)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('body_html', models.TextField(blank=True)), - ('body_markdown', models.TextField()), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('last_updated', models.DateTimeField(auto_now=True)), - ('enable_comments', models.BooleanField(default=False)), - ('has_code', models.BooleanField(default=False)), - ('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Published')], default=0)), - ('meta_description', models.CharField(blank=True, max_length=256, null=True)), - ('template_name', models.IntegerField(choices=[(0, 'default')], default=0)), - ], - options={ - 'get_latest_by': 'pub_date', - 'ordering': ('-pub_date',), - 'verbose_name_plural': 'entries', - }, - ), - migrations.CreateModel( - name='Topic', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=60)), - ('slug', models.SlugField()), - ('pluralized_name', models.CharField(max_length=60)), - ], - ), - migrations.AddField( - model_name='entry', - name='topics', - field=models.ManyToManyField(blank=True, to='src.Topic'), - ), - ] diff --git a/app/unused_apps/src/migrations/0002_auto_20160329_2107.py b/app/unused_apps/src/migrations/0002_auto_20160329_2107.py deleted file mode 100644 index 25f5e4e..0000000 --- a/app/unused_apps/src/migrations/0002_auto_20160329_2107.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-29 21:07 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('src', '0001_initial'), - ] - - operations = [ - migrations.RenameModel( - old_name='Entry', - new_name='Post', - ), - ] diff --git a/app/unused_apps/src/migrations/0003_auto_20180707_0958.py b/app/unused_apps/src/migrations/0003_auto_20180707_0958.py deleted file mode 100644 index f619888..0000000 --- a/app/unused_apps/src/migrations/0003_auto_20180707_0958.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.0.1 on 2018-07-07 09:58 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('src', '0002_auto_20160329_2107'), - ] - - operations = [ - migrations.AlterModelOptions( - name='post', - options={'get_latest_by': 'pub_date', 'ordering': ('-pub_date',), 'verbose_name_plural': 'posts'}, - ), - ] diff --git a/app/unused_apps/src/migrations/0004_auto_20191007_0905.py b/app/unused_apps/src/migrations/0004_auto_20191007_0905.py deleted file mode 100644 index 6c223a0..0000000 --- a/app/unused_apps/src/migrations/0004_auto_20191007_0905.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.6 on 2019-10-07 09:05 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('src', '0003_auto_20180707_0958'), - ] - - operations = [ - migrations.RenameModel( - old_name='Post', - new_name='SrcPost', - ), - ] diff --git a/app/unused_apps/src/migrations/__init__.py b/app/unused_apps/src/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/src/models.py b/app/unused_apps/src/models.py deleted file mode 100644 index 69d85a5..0000000 --- a/app/unused_apps/src/models.py +++ /dev/null @@ -1,171 +0,0 @@ -import re -from django.db import models -from django.urls import reverse -from django.contrib.sitemaps import Sitemap -from django.conf import settings -import datetime -from itertools import chain - -from utils.util import parse_image, markdown_to_html - - -def render_images(s): - s = re.sub('', parse_image, s) - return s - - -class Topic(models.Model): - name = models.CharField(max_length=60) - slug = models.SlugField() - pluralized_name = models.CharField(max_length=60) - - def __str__(self): - return self.name - - def get_absolute_url(self): - return reverse('src:list_topics', kwargs={"slug": self.slug}) - - @property - def pub_date(self): - return datetime.datetime.now() - - -class SrcPost(models.Model): - title = models.CharField(max_length=200) - slug = models.SlugField(unique_for_date='pub_date') - body_html = models.TextField(blank=True) - body_markdown = models.TextField() - pub_date = models.DateTimeField('Date published') - topics = models.ManyToManyField(Topic, blank=True) - last_updated = models.DateTimeField(auto_now=True) - enable_comments = models.BooleanField(default=False) - has_code = models.BooleanField(default=False) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - meta_description = models.CharField(max_length=256, null=True, blank=True) - TEMPLATES = ( - (0, 'default'), - ) - template_name = models.IntegerField(choices=TEMPLATES, default=0) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - verbose_name_plural = 'posts' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse('src:detail', kwargs={"slug": self.slug}) - - def comment_period_open(self): - return self.enable_comments and datetime.datetime.today() - datetime.timedelta(30) <= self.pub_date - - @property - def get_previous_published(self): - return self.get_previous_by_pub_date(status__exact=1) - - @property - def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) - - def save(self): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - super(SrcPost, self).save() - - -def get_upload_path(self, filename): - return "images/src/%s" % filename - - -class Book(models.Model): - title = models.CharField(max_length=200) - image = models.FileField(blank=True, null=True, upload_to=get_upload_path) - slug = models.SlugField(unique_for_date='pub_date') - body_html = models.TextField(blank=True) - body_markdown = models.TextField() - pub_date = models.DateTimeField('Date published') - last_updated = models.DateTimeField(auto_now=True) - PUB_STATUS = ( - (0, 'Draft'), - (1, 'Published'), - ) - status = models.IntegerField(choices=PUB_STATUS, default=0) - price = models.FloatField() - price_sale = models.FloatField() - meta_description = models.CharField(max_length=256, null=True, blank=True) - pages = models.DecimalField(max_digits=3, decimal_places=0, null=True, blank=True) - DEFAULT = 'details/src_book.html' - BOOK2 = 'details/src_book_2.html' - TEMPLATES = ( - (DEFAULT, 'Default'), - (BOOK2, 'Book Two'), - ) - template_name = models.CharField( - max_length=200, - choices=TEMPLATES, - default=DEFAULT - ) - - class Meta: - ordering = ('-pub_date',) - get_latest_by = 'pub_date' - - def __str__(self): - return self.title - - def get_absolute_url(self): - return reverse('src:detail_book', kwargs={"slug": self.slug}) - - def get_image_url(self): - img = self.image.url.split('src/')[1] - return '%ssrc/%s' % (settings.IMAGES_URL, img) - - def save(self): - md = render_images(self.body_markdown) - self.body_html = markdown_to_html(md) - super(Book, self).save() - - -'''class SrcDemo(models.Model): - title = models.CharField(max_length=254) - slug = models.SlugField() - body = models.TextField(blank=True, null=True) - head = models.TextField(blank=True, null=True) - DEMO_TEMPLATES = ( - (0, 'Blank'), - (1, 'Basic_light'), - ) - template = models.IntegerField(choices=DEMO_TEMPLATES, default=0) - pub_date = models.DateTimeField('Date published', blank=True) - - class Meta: - verbose_name_plural = "Demos" - app_label = 'projects' - ordering = ('-pub_date',) - - def save(self): - if not self.id: - self.pub_date = datetime.datetime.now() - super(SrcDemo, self).save() -''' - - -class SrcSitemap(Sitemap): - changefreq = "never" - priority = 0.7 - protocol = "https" - - def items(self): - return list(chain( - SrcPost.objects.filter(status=1), - Topic.objects.all() - )) - - def lastmod(self, obj): - return obj.pub_date diff --git a/app/unused_apps/src/templates/src/srcpost_detail.html b/app/unused_apps/src/templates/src/srcpost_detail.html deleted file mode 100644 index 733f586..0000000 --- a/app/unused_apps/src/templates/src/srcpost_detail.html +++ /dev/null @@ -1,112 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load comments %} -{% block pagetitle %}{{object.title|striptags}} - by Scott Gilbertson{% endblock %} -{% block metadescription %}{% autoescape on %}{{object.meta_description|striptags|safe}}{% endautoescape %}{% endblock %} -{%block extrahead%} - - - - - - - - - - - - - - -{%endblock%} - -{% block bodyid %}class="src detail single"{% endblock %} -{%block sitesubtitle %}Code Slowly{% endblock%} -{% block breadcrumbs %}{% endblock %} -{% block primary %}
    -
    -
    -

    {%if object.template_name == 1 or object.template_name == 3 %}{{object.title|safe|smartypants}}{%else%}{{object.title|safe|smartypants|widont}}{%endif%}

    -

    {{object.meta_description|smartypants|safe}}

    -
    - {% if object.originally_published_by %}

    Originally Published By: {{object.originally_published_by}}

    {%endif%} - {% if object.topics.all %}

    Topics: {% for topic in object.topics.all%} {{topic.name}}{%if forloop.last%}{%else%}, {%endif%}{%endfor%}

    {%endif%} - - -
    -
    - - -
    - {{object.body_html|safe|smartypants|widont}} -
    -
    - {% if object.slug != 'about' %} - {% with object.get_next_published as next %} - {% with object.get_previous_published as prev %} - {%endwith%}{%endwith%} - {%endif%} -
    - {% if object.slug != 'about' %} - {% if object.enable_comments %} -{% get_comment_count for object as comment_count %} -{%if comment_count > 0 %} -

    {{comment_count}} Comment{{ comment_count|pluralize }}

    -{% render_comment_list for object %} -{%endif%} -
    -{% render_comment_form for object %} -
    -{% else %} -

    Sorry, comments have been disabled for this post.

    -{%endif%} -{%endif%} -{% endblock %} -{% block js %} - -{% if object.has_code %} -{%endif %} -{% endblock %} diff --git a/app/unused_apps/src/templates/src/srcpost_list.html b/app/unused_apps/src/templates/src/srcpost_list.html deleted file mode 100644 index dd5d410..0000000 --- a/app/unused_apps/src/templates/src/srcpost_list.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load comments %} - -{% block pagetitle %}Tutorials and tools for building great things{% endblock %} -{% block metadescription %}Tutorials and tools for building great things on the web - by Scott Gilbertson.{% endblock %} -{%block sitesubtitle %}Code Slowly{% endblock%} -{% block breadcrumbs %}{% include "lib/breadcrumbs.html" with breadcrumbs=breadcrumbs %}{% endblock %} -{% block primary %}
    -
    -

    Tutorials and tools for building great things on the web.

    -

    The indie web is an amazing democratic publishing platform unlike anything in history. The catch is, to avoid serving at the pleasure of the corporate king, you need to know how to publish. That's what these articles are here for, to help you learn how to use independent, community supported open source tools. The web won't last forever, let's build something cool while we can.

    -

    Topics include HTML, CSS, Django, Linux, Nginx, Python, Postgresql, free software, and, once, the evil that is Google AMP.

    -

    A few of the articles below were previously published in: Ars Technica, Wired, and The Register

    -
    -

    Articles

    - - - - -
    -{%endblock%} diff --git a/app/unused_apps/src/templates/src/topic_list.html b/app/unused_apps/src/templates/src/topic_list.html deleted file mode 100644 index 7149823..0000000 --- a/app/unused_apps/src/templates/src/topic_list.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends 'base.html' %} -{% load typogrify_tags %} -{% load comments %} - -{% block pagetitle %}Tutorials and tools for building great things{% endblock %} - -{% block metadescription %}Tutorials about {{topic}} - by Scott Gilbertson.{% endblock %} -{%block sitesubtitle %}Code Slowly{% endblock%} -{% block primary %} -
    -
    -

    Tutorials and tools for building great things on the web.

    -

    The indie web is an amazing democratic publishing platform unlike anything in history. The catch is, to avoid serving at the pleasure of the corporate king, you need to know how to publish. That's what these articles are here for, to help you learn how to use independent, community supported open source tools. The web won't last forever, let's build something cool while we can.

    -

    A few of the articles below were previously published in: Ars Technica, Wired, and The Register

    -
    -

    Tutorials about {{topic}}

    - - - - -
    -{%endblock%} diff --git a/app/unused_apps/src/urls.py b/app/unused_apps/src/urls.py deleted file mode 100644 index 0ac6897..0000000 --- a/app/unused_apps/src/urls.py +++ /dev/null @@ -1,49 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "src" - -urlpatterns = [ - path( - r'feed.xml', - views.SrcRSSFeedView(), - name="feed" - ), - path( - r'topic/', - views.TopicListView.as_view(), - name="list_topics" - ), - path( - r'books/', - views.BookDetailView.as_view(), - name='detail_book' - ), - path( - r'books/', - views.BookListView.as_view(), - name='list_books' - ), - path( - r'.txt', - views.EntryDetailViewTXT.as_view(), - name="detail-txt" - ), - path( - r'', - views.EntryDetailView.as_view(), - name="detail" - ), - re_path( - r'', - views.SrcListView.as_view(), - name="list" - ), - path( - r'', - views.SrcListView.as_view(), - {'page':1}, - name="list" - ), -] diff --git a/app/unused_apps/src/views.py b/app/unused_apps/src/views.py deleted file mode 100644 index 7540e02..0000000 --- a/app/unused_apps/src/views.py +++ /dev/null @@ -1,89 +0,0 @@ -from django.views.generic import ListView -from django.views.generic.detail import DetailView -from django.contrib.syndication.views import Feed -from django.urls import reverse -from django.conf import settings - -#from paypal.standard.forms import PayPalPaymentsForm -from utils.views import PaginatedListView -from .models import SrcPost, Topic, Book - - -class BookListView(ListView): - template_name = "archives/src_books.html" - - def queryset(self): - return Book.objects.filter(status__exact=1) - - -class BookDetailView(DetailView): - model = Book - - def get_template_names(self): - book = self.get_object() - return [book.template_name] - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(BookDetailView, self).get_context_data(**kwargs) - book = self.get_object() - if book.price_sale < book.price: - price = book.price_sale - else: - price = book.price - #paypal_dict = { - # "business": settings.PAYPAL_RECEIVER_EMAIL, - # "amount": price, - # "item_name": book.title, - # "invoice": "unique-invoice-id", - # "notify_url": "https://luxagraf.net/src/paypal/" + reverse('src:paypal-ipn'), - # "return_url": "https://luxagraf.net/src/thank-you", - # "cancel_return": "https://luxagraf.net/src/books/", - #} - #context['paypal_form'] = PayPalPaymentsForm(initial=paypal_dict) - return context - - -class SrcListView(PaginatedListView): - model = SrcPost - - def get_queryset(self): - return SrcPost.objects.filter(status__exact=1) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(SrcListView, self).get_context_data(**kwargs) - context['topics'] = Topic.objects.all() - return context - - -class EntryDetailView(DetailView): - model = SrcPost - slug_field = "slug" - - -class EntryDetailViewTXT(EntryDetailView): - template_name = "jrnl/entry_detail.txt" - - -class TopicListView(ListView): - template_name = 'src/topic_list.html' - - def get_queryset(self): - return SrcPost.objects.filter(topics__slug=self.kwargs['slug']) - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(TopicListView, self).get_context_data(**kwargs) - context['topic'] = Topic.objects.get(slug__exact=self.kwargs['slug']) - return context - - -class SrcRSSFeedView(Feed): - title = "luxagraf:src Code and Technology" - link = "/src/" - description = "Latest postings to luxagraf.net/src" - description_template = 'feeds/blog_description.html' - - def items(self): - return SrcPost.objects.filter(status__exact=1).order_by('-pub_date')[:10] diff --git a/app/unused_apps/stuff/__init__.py b/app/unused_apps/stuff/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/stuff/admin.py b/app/unused_apps/stuff/admin.py deleted file mode 100644 index 135b17b..0000000 --- a/app/unused_apps/stuff/admin.py +++ /dev/null @@ -1,56 +0,0 @@ -from django.contrib import admin -from .models import Item - - -@admin.register(Item) -class ItemAdmin(admin.ModelAdmin): - list_display = ( - 'title', - 'admin_thumbnail', - 'item_type', - 'creator', - 'purchase_price', - 'item_format', - 'isbn' - ) - list_filter = ['item_format', 'item_type'] - - fieldsets = ( - ('Item', { - 'fields': ( - 'title', - ('date_purchased', 'date_added'), - 'item_format', - 'purchase_price', - 'image', - 'item_type', - 'creator', - 'serial_number', - 'isbn', - ), - 'classes': ( - 'show', - 'extrapretty', - 'wide' - ) - } - ), - ('Extra', { - 'fields': ( - 'creator_sort_last_name', - 'creator_sort_first_name', - 'current_price', - 'retail_price', - 'amazon_url', - 'image_url', - ), - 'classes': ( - 'collapse', - 'extrapretty', - 'wide' - ) - }), - ) - - class Media: - js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/unused_apps/stuff/models.py b/app/unused_apps/stuff/models.py deleted file mode 100644 index 05a7f4f..0000000 --- a/app/unused_apps/stuff/models.py +++ /dev/null @@ -1,65 +0,0 @@ -from django.db import models -from django.urls import reverse -from django.utils.html import format_html -from django.utils import timezone -from django.conf import settings - - -class Item(models.Model): - isbn = models.CharField(max_length=100, blank=True, null=True) - serial_number = models.CharField(max_length=100, blank=True, null=True) - ITEM_TYPES = ( - (0, 'Book'), - (1, 'Apparel'), - (2, 'Gadget'), - (3, 'Furniture'), - ) - item_type = models.IntegerField(choices=ITEM_TYPES, default=0) - title = models.CharField(max_length=200) - creator = models.CharField(max_length=200, blank=True, null=True) - creator_sort_last_name = models.CharField(max_length=200, blank=True, null=True) - creator_sort_first_name = models.CharField(max_length=200, blank=True, null=True) - current_price = models.DecimalField(max_digits=8, decimal_places=2, blank=True, null=True) - retail_price = models.DecimalField(max_digits=8, decimal_places=2, blank=True, null=True) - purchase_price = models.DecimalField(max_digits=8, decimal_places=2, blank=True, null=True) - amazon_url = models.CharField(max_length=400, blank=True, null=True) - image_url = models.CharField(max_length=400, blank=True, null=True) - image = models.FileField(upload_to='stuff/', null=True, blank=True) - item_format = models.CharField(max_length=255, blank=True, null=True) - date_released = models.DateTimeField(blank=True, null=True) - date_purchased = models.DateTimeField(blank=True, null=True, default=timezone.now) - date_added = models.DateTimeField(blank=True, null=True, default=timezone.now) - - class Meta: - ordering = ['-date_added'] - - def __str__(self): - return self.title - - @property - def get_previous_published(self): - return self.get_previous_by_date_added(status__exact=1) - - @property - def get_next_published(self): - return self.get_next_by_date_added(status__exact=1) - - @property - def get_previous_admin_url(self): - n = self.get_previous_by_date_added() - return reverse('admin:%s_%s_change' % (self._meta.app_label, self._meta.model_name), args=[n.id]) - - @property - def get_next_admin_url(self): - model = apps.get_model(app_label=self._meta.app_label, model_name=self._meta.model_name) - try: - return reverse('admin:%s_%s_change' % (self._meta.app_label, self._meta.model_name), args=[self.get_next_by_date_added().pk]) - except model.DoesNotExist: - return '' - - def get_image_url(self): - return '%s%s' % (settings.MEDIA_URL, self.image) - - def admin_thumbnail(self): - return format_html('' % (self.get_image_url())) - admin_thumbnail.short_description = 'Thumbnail' diff --git a/app/unused_apps/stuff/temp.py b/app/unused_apps/stuff/temp.py deleted file mode 100644 index 2150563..0000000 --- a/app/unused_apps/stuff/temp.py +++ /dev/null @@ -1,115 +0,0 @@ -from stuff.models import Item -from django.conf import settings -from datetime import datetime -from decimal import Decimal -import csv -item_types = { 'Book':0, 'Apparel': 1,'Gadget': 2, 'Furniture': 3} -""" -csv_file = csv.DictReader(open('stuff.csv', 'rb'), delimiter=',') -for line in csv_file: - if line['release date'][:-6] != '': - date_released = datetime.strptime(line['release date'][:-6], "%Y-%m-%d %H:%M:%S") - else: - date_released = None - if line['purchase date'][:-6] != '': - date_purchased = datetime.strptime(line['purchase date'][:-6], "%Y-%m-%d %H:%M:%S") - else: - date_purchased = None - if line['creation date'][:-6] != '': - date_added = datetime.strptime(line['creation date'][:-6], "%Y-%m-%d %H:%M:%S") - else: - date_added = None - item_type = int(item_types[line['item type']]) - if line['current value'][1:] != '': - try: - current_price = Decimal(line['current value'][1:].replace(",", "")) - except: - current_price = None - else: - current_price = None - if line['retail price'][1:] != '': - try: - retail_price = Decimal(line['retail price'][1:].replace(",", "")) - except: - retail_price =None - else: - retail_price =None - if line['purchase price'][1:] != '' and line['purchase price'] != "Gift": - try: - purchase_price = Decimal(line['purchase price'][1:].replace(",", "").replace('\\xa0', ' ')) - except: - purchase_price =None - else: - purchase_price =None - i, created = Item.objects.get_or_create( - isbn = line['ISBN'], - serial_number = line['serial number'], - type = item_type, - title = line['title'], - creator = line['creator'], - current_price = current_price, - retail_price = retail_price, - purchase_price = purchase_price, - amazon_url = line['amazon link'], - image_url = line['coverImageLargeURLString'], - format = line['format'], - date_released = date_released, - date_purchased = date_purchased, - date_added = date_added - ) - print created, i.title -""" -import datetime -import os -import io -import urllib - - -from django.contrib.contenttypes.models import ContentType -from django.template.defaultfilters import slugify -from django.core.exceptions import ObjectDoesNotExist -from django.conf import settings - -# Required PIL classes may or may not be available from the root namespace -# depending on the installation -try: - import Image - import ImageFile - import ImageFilter - import ImageEnhance -except ImportError: - try: - from PIL import Image - from PIL import ImageFile - from PIL import ImageFilter - from PIL import ImageEnhance - except ImportError: - raise ImportError("Could not import the Python Imaging Library.") - -ImageFile.MAXBLOCK = 1000000 - - -def grab_item_image(item): - crop_dir = settings.IMAGES_ROOT + '/stuff/' - if not os.path.isdir(crop_dir): - os.makedirs(crop_dir) - remote = item.image_url - try: - fname = urllib.request.urlopen(remote) - except: - return False - im = io.BytesIO(fname.read()) - img = Image.open(im) - ext = slugify(item.title)[:40] - filename = '%s/%s.jpg' %(crop_dir, ext) - try: - if img.format == 'JPEG': - img.save(filename, 'JPEG', quality=95, optimize=True) - else: - img.save(filename) - except IOError: - if os.path.isfile(filename): - os.unlink(filename) - pass - return 'images/stuff/%s.jpg'%(ext) - diff --git a/app/unused_apps/syndication/__init__.py b/app/unused_apps/syndication/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/syndication/admin.py b/app/unused_apps/syndication/admin.py deleted file mode 100644 index b873eb7..0000000 --- a/app/unused_apps/syndication/admin.py +++ /dev/null @@ -1,20 +0,0 @@ -from django.contrib import admin - -from .models import Syndicate, SyndicatedItem, FBOAuthToken - - -@admin.register(FBOAuthToken) -class FBOAuthTokenAdmin(admin.ModelAdmin): - list_display = ('__str__', 'expires',) - pass - - -@admin.register(Syndicate) -class SyndicateAdmin(admin.ModelAdmin): - pass - - -@admin.register(SyndicatedItem) -class SyndicatedItemAdmin(admin.ModelAdmin): - list_display = ('__str__', 'syndicated_to',) - pass diff --git a/app/unused_apps/syndication/migrations/0001_initial.py b/app/unused_apps/syndication/migrations/0001_initial.py deleted file mode 100644 index 9643d51..0000000 --- a/app/unused_apps/syndication/migrations/0001_initial.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-03-29 10:07 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('contenttypes', '0002_remove_content_type_name'), - ] - - operations = [ - migrations.CreateModel( - name='Syndicate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=200)), - ], - ), - migrations.CreateModel( - name='SyndicatedItem', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('object_id', models.PositiveIntegerField()), - ('publish_date', models.DateTimeField()), - ('status', models.CharField(blank=True, choices=[('1', 'Unsent'), ('2', 'Sent')], max_length=1, null=True)), - ('rel_link', models.CharField(blank=True, max_length=300, null=True)), - ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')), - ('syndicate', models.ManyToManyField(to='syndication.Syndicate')), - ], - ), - ] diff --git a/app/unused_apps/syndication/migrations/0002_auto_20160628_2149.py b/app/unused_apps/syndication/migrations/0002_auto_20160628_2149.py deleted file mode 100644 index 51812bf..0000000 --- a/app/unused_apps/syndication/migrations/0002_auto_20160628_2149.py +++ /dev/null @@ -1,31 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-06-28 21:49 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('syndication', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='FBOAuthToken', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('short_token', models.TextField()), - ('long_token', models.TextField(blank=True, null=True)), - ('expires', models.DateTimeField(blank=True)), - ('created', models.DateTimeField(default=django.utils.timezone.now)), - ], - ), - migrations.AlterField( - model_name='syndicateditem', - name='status', - field=models.CharField(choices=[('1', 'Unsent'), ('2', 'Sent')], max_length=1, null=True), - ), - ] diff --git a/app/unused_apps/syndication/migrations/0003_auto_20161023_2014.py b/app/unused_apps/syndication/migrations/0003_auto_20161023_2014.py deleted file mode 100644 index 2b311fb..0000000 --- a/app/unused_apps/syndication/migrations/0003_auto_20161023_2014.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.9 on 2016-10-23 20:14 -from __future__ import unicode_literals - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('syndication', '0002_auto_20160628_2149'), - ] - - operations = [ - migrations.AlterModelOptions( - name='fboauthtoken', - options={'get_latest_by': 'expires', 'ordering': ('-expires',)}, - ), - ] diff --git a/app/unused_apps/syndication/migrations/__init__.py b/app/unused_apps/syndication/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/syndication/models.py b/app/unused_apps/syndication/models.py deleted file mode 100644 index c348c1b..0000000 --- a/app/unused_apps/syndication/models.py +++ /dev/null @@ -1,86 +0,0 @@ -from django.db import models -from django.utils import timezone -from django.conf import settings -import datetime -from django.contrib.contenttypes.models import ContentType -from django.contrib.contenttypes.fields import GenericForeignKey -from django.db.models.signals import post_save -from django.dispatch import receiver - -from .syndicators import post_to_medium, build_facebook_feed, post_to_twitter, post_photo_to_flickr, post_to_facebook - - -class FBOAuthToken(models.Model): - short_token = models.TextField() - long_token = models.TextField(null=True, blank=True) - expires = models.DateTimeField(blank=True) - created = models.DateTimeField(default=timezone.now) - - def __str__(self): - return str(self.expires) - - def long_token_link(self): - token_url = "https://graph.facebook.com/oauth/access_token?client_id=%s&client_secret=%s&grant_type=fb_exchange_token&fb_exchange_token=%s" % (settings.FACEBOOK_APP_ID, settings.FACEBOOK_APP_SECRET, self.short_token) - return token_url - - class Meta: - ordering = ('-expires',) - get_latest_by = 'expires' - - def save(self, *args, **kwargs): - self.expires = self.created + datetime.timedelta(60) - super(FBOAuthToken, self).save() - - -class Syndicate(models.Model): - name = models.CharField(max_length=200) - - def __str__(self): - return self.name - - -class SyndicatedItem(models.Model): - content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) - object_id = models.PositiveIntegerField() - content_object = GenericForeignKey('content_type', 'object_id') - syndicate = models.ManyToManyField(Syndicate) - publish_date = models.DateTimeField() - STATUS = ( - ('1', "Unsent"), - ('2', "Sent"), - ) - status = models.CharField(max_length=1, choices=STATUS, null=True) - rel_link = models.CharField(max_length=300, null=True, blank=True) - - def __str__(self): - return str(self.content_object) - - def syndicated_to(self): - return ','.join(str(synd) for synd in self.syndicate.all()) - - -@receiver(post_save, sender=SyndicatedItem) -def post_save_events(sender, update_fields, created, instance, **kwargs): - print(instance.status) - if instance.status == "1": - print("---------calling-----------") - for item in instance.syndicate.all(): - print(item.name) - if item.name == "Medium": - instance.rel_link = post_to_medium(instance.content_object) - instance.status = 2 - if item.name == "Facebook Instant Articles": - build_facebook_feed() - instance.status = 2 - if item.name == "Twitter": - print("calling function") - post_to_twitter(instance.content_object, instance.content_type.name) - if item.name == "Flickr": - if instance.content_type.name == "lux image": - post_photo_to_flickr(instance.content_object) - if item.name == "Facebook": - post_to_facebook(instance.content_object, instance.content_type.name) - post_save.disconnect(post_save_events, sender=SyndicatedItem) - instance.status = "2" - instance.save() - post_save.connect(post_save_events, sender=SyndicatedItem) diff --git a/app/unused_apps/syndication/syndicators.py b/app/unused_apps/syndication/syndicators.py deleted file mode 100644 index 5f8762c..0000000 --- a/app/unused_apps/syndication/syndicators.py +++ /dev/null @@ -1,123 +0,0 @@ -import os -from django.conf import settings -from django.test.client import Client - -from twython import Twython -from bs4 import BeautifulSoup -from medium import Client as MediumClient -import flickrapi -import facebook - -from photos.models import LuxImage - - -def absolute_urls_for_syndication(s): - soup = BeautifulSoup(s, "lxml") - for a in soup.find_all('a'): - if a['href'][:1] == "/": - a['href'] = "https://luxagraf.net%s" % a['href'] - return soup - - -def post_to_medium(item): - client = MediumClient(application_id=settings.MEDIUM_CLIENT_ID, application_secret=settings.MEDIUM_CLIENT_SECRET) - client.access_token = settings.MEDIUM_INT_TOKEN - user = client.get_current_user() - head = '

    This was originally posted on my own site.

    ' % item.get_absolute_url() - body = "%s %s" % (head, absolute_urls_for_syndication(item.body_html)) - # Create a post. - post = client.create_post( - user_id=user["id"], - title=item.title, - content=body, - content_format="html", - publish_status="public", - canonical_url="https://luxagraf.net%s" % item.get_absolute_url(), - license="all-rights-reserved" - ) - return post["url"] - - -def build_facebook_feed(): - print("+++++++++++++building+++++++++++") - c = Client() - response = c.get('/iafeed.xml', HTTP_HOST='127.0.0.1') - f = open("%siafeed.xml" % settings.FLATFILES_ROOT, 'wb') - f.write(response.content) - f.close() - - -def post_to_twitter(obj, ctype): - print("content type is" + ctype) - t = Twython(settings.TWITTER_API_KEY, settings.TWITTER_API_SECRET, settings.TWITTER_ACCESS_TOKEN, settings.TWITTER_ACCESS_SECRET) - imgs = [] - if ctype == "lux image": - p = open(obj.get_largest_image(), 'rb') - if obj.caption: - status = obj.caption - else: - status = obj.title - response = t.upload_media(media=p) - imgs.append(response) - elif ctype == "lux note": - status = obj.body_markdown - # parse out images and send seperately - soup = BeautifulSoup(status, "lxml") - loop = 0 - for img in soup.find_all('img'): - src = img['src'].split("images/")[1] - i = LuxImage.objects.get(image__icontains=src) - p = open(i.get_largest_image(), 'rb') - response = t.upload_media(media=p) - imgs.append(response) - loop = loop+1 - if loop == 3: - break - for t in soup.find_all('img'): - t.replaceWith("") - # truncate message - if len(status) > 140: - try: - status = status.split("|")[0] + obj.get_absolute_url() - except: - status = status[:140] + obj.get_absolute_url() - print(status) - try: - geo = t.reverse_geocode(lat=obj.latitude, lon=obj.longitude, accuracy=1500, granularity="city") - geo_id = geo['result']['places'][0]['id'] - tweet = t.update_status(status=status, media_ids=[img['media_id'] for img in imgs], place_id=geo_id) - except: - try: - tweet = t.update_status(status=status, media_ids=[img['media_id'] for img in imgs]) - except: - tweet = t.update_status(status=status) - - -def post_photo_to_flickr(photo): - TOKEN_FILE = os.path.join(settings.PROJ_ROOT, "config/flickrToken") - token = open(TOKEN_FILE).read() - flickr = flickrapi.FlickrAPI(settings.FLICKR_API_KEY, settings.FLICKR_API_SECRET, token=token) - sent = flickr.upload(filename=photo.get_image_path_by_size("original"), title=photo.title, description=photo.caption) - photo_id = sent.find('photoid').text - photo.flickr_id = photo_id - try: - flickr.photos.geo.setLocation(photo_id=photo_id, lat=photo.latitude, lon=photo.longitude, accuracy=12) - except: - pass - - -def post_to_facebook(obj, ctype): - from syndication.models import FBOAuthToken - token = FBOAuthToken.objects.latest() - graph = facebook.GraphAPI(access_token=token.long_token, version='2.2') - if ctype == "lux image": - p = open(obj.get_largest_image(), 'rb') - if obj.caption: - message = obj.caption - else: - message = obj.title - try: - fb_response = graph.put_photo(p, message=message) - print(fb_response) - except facebook.GraphAPIError as e: - print('Something went wrong:', e.type, e.message) diff --git a/app/unused_apps/syndication/templatetags/__init__.py b/app/unused_apps/syndication/templatetags/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/syndication/templatetags/facebook_processor.py b/app/unused_apps/syndication/templatetags/facebook_processor.py deleted file mode 100644 index 973f863..0000000 --- a/app/unused_apps/syndication/templatetags/facebook_processor.py +++ /dev/null @@ -1,23 +0,0 @@ -from django import template -from bs4 import BeautifulSoup - -from syndication.syndicators import absolute_urls_for_syndication - -register = template.Library() - - -def wrap_image_tags(text): - soup = BeautifulSoup(text, 'lxml') - for img in soup.find_all('img'): - if img.parent.name != "figure": - new_tag = soup.new_tag('figure') - img.wrap(new_tag) - return soup - - -def facebook_processor(text): - ia = absolute_urls_for_syndication(text) - ia = wrap_image_tags(str(ia)[12:-14]) - return str(ia)[12:-14] - -register.filter('facebook_processor', facebook_processor) diff --git a/app/unused_apps/syndication/views.py b/app/unused_apps/syndication/views.py deleted file mode 100644 index e489846..0000000 --- a/app/unused_apps/syndication/views.py +++ /dev/null @@ -1,17 +0,0 @@ -from django.views.generic import ListView - -from .models import SyndicatedItem - - -class FacebookFeedView(ListView): - """ - Return a main entry and list of Entries in reverse chronological order - """ - queryset = SyndicatedItem.objects.filter(syndicate__name__exact="Facebook")[:16] - - def get_template_names(self): - return "fb-feed.xml" - - def render_to_response(self, context, **response_kwargs): - response_kwargs.update({'content_type': 'text/xml'}) - return super(FacebookFeedView, self).render_to_response(context, **response_kwargs) diff --git a/app/unused_apps/trips/__init__.py b/app/unused_apps/trips/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/trips/admin.py b/app/unused_apps/trips/admin.py deleted file mode 100644 index 54991f6..0000000 --- a/app/unused_apps/trips/admin.py +++ /dev/null @@ -1,34 +0,0 @@ -from django.contrib import admin -from django.contrib.gis.admin import OSMGeoAdmin - -from .models import Trip - -from utils.widgets import OLAdminBase -from utils.util import get_latlon -from utils.widgets import LGEntryForm - -@admin.register(Trip) -class TripAdmin(OSMGeoAdmin): - list_display = ('title', 'slug') - prepopulated_fields = {'slug': ('title',)} - ordering = ('title',) - search_fields = ['title'] - list_select_related = True - fieldsets = ( - ('Trip', { - 'fields': ( - 'title', - 'subtitle', - 'dek_markdown', - 'route', - 'slug', - 'start_date', - 'end_date', - 'pub_date', - ), - 'classes': ( - 'show', - 'extrapretty' - ) - }), - ) diff --git a/app/unused_apps/trips/migrations/0001_initial.py b/app/unused_apps/trips/migrations/0001_initial.py deleted file mode 100644 index 3d3c222..0000000 --- a/app/unused_apps/trips/migrations/0001_initial.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.1.7 on 2019-06-15 09:17 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('locations', '0018_auto_20190414_2124'), - ] - - operations = [ - migrations.CreateModel( - name='Trip', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=50)), - ('subtitle', models.CharField(blank=True, max_length=200)), - ('slug', models.SlugField(unique_for_date='pub_date')), - ('dek_markdown', models.TextField()), - ('dek_html', models.TextField(blank=True, null=True)), - ('pub_date', models.DateTimeField(verbose_name='Date published')), - ('start_date', models.DateTimeField(verbose_name='Date started')), - ('end_date', models.DateTimeField(verbose_name='Date ended')), - ('route', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='locations.Route')), - ], - ), - ] diff --git a/app/unused_apps/trips/migrations/__init__.py b/app/unused_apps/trips/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/app/unused_apps/trips/models.py b/app/unused_apps/trips/models.py deleted file mode 100644 index 76941f2..0000000 --- a/app/unused_apps/trips/models.py +++ /dev/null @@ -1,40 +0,0 @@ -import json -import requests -from django import forms -from django.urls import reverse -from django.apps import apps -from django.contrib.gis.geos import GEOSGeometry, fromstr, MultiPolygon -from django.contrib.gis.db import models -from django.contrib.sitemaps import Sitemap -from django.utils.safestring import mark_safe -from django.utils import timezone -from django.conf import settings - -from utils.util import render_images, extract_main_image, markdown_to_html -from locations.models import Route - - -class Trip(models.Model): - """Model to define trips""" - title = models.CharField(max_length=50) - subtitle = models.CharField(max_length=200, blank=True) - slug = models.SlugField(unique_for_date='pub_date') - dek_markdown = models.TextField() - dek_html = models.TextField(null=True, blank=True) - pub_date = models.DateTimeField('Date published') - start_date = models.DateTimeField('Date started') - end_date = models.DateTimeField('Date ended') - route = models.ForeignKey(Route, on_delete=models.CASCADE) - - def get_absolute_url(self): - return "/trips/%s/" % (self.slug) - - def __str__(self): - return self.title - - def save(self, *args, **kwargs): - created = self.pk is None - if not created: - md = render_images(self.dek_markdown) - self.dek_html = markdown_to_html(md) - super(Trip, self).save(*args, **kwargs) diff --git a/app/unused_apps/trips/urls.py b/app/unused_apps/trips/urls.py deleted file mode 100644 index 205c450..0000000 --- a/app/unused_apps/trips/urls.py +++ /dev/null @@ -1,24 +0,0 @@ -from django.urls import path, re_path - -from . import views - -app_name = "trips" - -urlpatterns = [ - path( - r'', - views.LocationDetail.as_view(), - name="location-detail" - ), - path( - r'mapdata/', - views.MapDataList.as_view(), - name="mapdata" - ), - re_path(r'data/(?P\d+)/$', views.data_json), - path( - r'', - views.MapList.as_view(), - name="maplist" - ), -] diff --git a/app/unused_apps/trips/views.py b/app/unused_apps/trips/views.py deleted file mode 100644 index 3a93c0d..0000000 --- a/app/unused_apps/trips/views.py +++ /dev/null @@ -1,101 +0,0 @@ -from django.shortcuts import render_to_response -from django.template import RequestContext -from django.views.generic import ListView -from django.views.generic.detail import DetailView -from django.conf import settings -from django.db.models import Q - -from jrnl.models import Entry -from projects.shortcuts import render_to_geojson -from sightings.models import Sighting - -from .models import Country, Region, Route, Location - -def map_list(request): - context = { - 'object_list': Entry.objects.filter(status__exact=1), - 'country_list': Country.objects.filter(visited=True).exclude(name='default'), - 'route_list': Route.objects.all(), - 'region_list': Region.objects.all() - } - return render_to_response( - 'archives/map.html', - context, - context_instance=RequestContext(request) - ) - -class MapList(ListView): - """ - Return list of Entries on map - """ - context_object_name = 'object_list' - queryset = Entry.objects.filter(status__exact=1) - template_name = 'archives/map.html' - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(MapList, self).get_context_data(**kwargs) - context['country_list'] = Country.objects.filter(visited=True).exclude(name='default'), - context['route_list'] = Route.objects.all(), - context['region_list'] = Region.objects.all() - context['IMAGES_URL'] = settings.IMAGES_URL - return context - - -class MapDataList(ListView): - """ - Build data file for Entries on map - """ - context_object_name = 'object_list' - queryset = Entry.objects.filter(status__exact=1) - template_name = 'archives/map_data.html' - - def get_context_data(self, **kwargs): - # Call the base implementation first to get a context - context = super(MapDataList, self).get_context_data(**kwargs) - context['country_list'] = Country.objects.filter(visited=True).exclude(name='default'), - context['route_list'] = Route.objects.all(), - context['region_list'] = Region.objects.all() - context['IMAGES_URL'] = settings.IMAGES_URL - return context - -def map_data(request): - context = { - 'object_list': Entry.objects.filter(status__exact=1), - 'route_list': Route.objects.all(), - 'country_list': Country.objects.filter(visited=True).exclude(name='default'), - 'region_list': Region.objects.all() - } - return render_to_response( - 'archives/map_data.html', - context, - context_instance=RequestContext(request) - ) - - -def data_json(request, id): - qs = Route.objects.filter(pk=id) - return render_to_geojson( - qs, - included_fields=['id', ], - geom_attribute='geometry', - mimetype='application/json', - pretty_print=True - ) - - -class LocationDetail(DetailView): - model = Location - template_name = "details/location.html" - - def get_context_data(self, **kwargs): - context = super(LocationDetail, self).get_context_data(**kwargs) - context['entry_list'] = Entry.objects.filter( - Q(location=self.get_object()) | - Q(location__in=Location.objects.filter(parent=self.get_object())) - ) - context['sighting_list'] = Sighting.objects.filter( - Q(location=self.get_object()) | - Q(location__in=Location.objects.filter(parent=self.get_object())) - ).order_by('ap_id', 'ap__apclass__kind').distinct("ap") - return context diff --git a/site/media/img/apple-touch-icon-114x114.png b/site/media/img/apple-touch-icon-114x114.png deleted file mode 100644 index d2bbffa..0000000 Binary files a/site/media/img/apple-touch-icon-114x114.png and /dev/null differ diff --git a/site/media/img/apple-touch-icon-57x57.png b/site/media/img/apple-touch-icon-57x57.png deleted file mode 100644 index 1d31b3b..0000000 Binary files a/site/media/img/apple-touch-icon-57x57.png and /dev/null differ diff --git a/site/media/img/apple-touch-icon-72x72.png b/site/media/img/apple-touch-icon-72x72.png deleted file mode 100644 index b315422..0000000 Binary files a/site/media/img/apple-touch-icon-72x72.png and /dev/null differ diff --git a/site/media/img/bio.jpg b/site/media/img/bio.jpg deleted file mode 100644 index 0dcea29..0000000 Binary files a/site/media/img/bio.jpg and /dev/null differ diff --git a/site/media/img/chricon.jpg b/site/media/img/chricon.jpg deleted file mode 100644 index 466c76e..0000000 Binary files a/site/media/img/chricon.jpg and /dev/null differ diff --git a/site/media/img/exifbg.png b/site/media/img/exifbg.png deleted file mode 100644 index 932605d..0000000 Binary files a/site/media/img/exifbg.png and /dev/null differ diff --git a/site/media/img/favicon.ico b/site/media/img/favicon.ico deleted file mode 100644 index ce016c5..0000000 Binary files a/site/media/img/favicon.ico and /dev/null differ diff --git a/site/media/img/feed-large.png b/site/media/img/feed-large.png deleted file mode 100644 index 1527f50..0000000 Binary files a/site/media/img/feed-large.png and /dev/null differ diff --git a/site/media/img/fficon.jpg b/site/media/img/fficon.jpg deleted file mode 100644 index 5b0cc42..0000000 Binary files a/site/media/img/fficon.jpg and /dev/null differ diff --git a/site/media/img/mapbg-dark.png b/site/media/img/mapbg-dark.png deleted file mode 100644 index 23b7d7f..0000000 Binary files a/site/media/img/mapbg-dark.png and /dev/null differ diff --git a/site/media/img/mapbg.png b/site/media/img/mapbg.png deleted file mode 100644 index 1a2b9c9..0000000 Binary files a/site/media/img/mapbg.png and /dev/null differ diff --git a/site/media/img/marker-entry.png b/site/media/img/marker-entry.png deleted file mode 100644 index cad0d3e..0000000 Binary files a/site/media/img/marker-entry.png and /dev/null differ diff --git a/site/media/img/parkbg.png b/site/media/img/parkbg.png deleted file mode 100644 index 5e2789b..0000000 Binary files a/site/media/img/parkbg.png and /dev/null differ diff --git a/site/media/img/shadow.png b/site/media/img/shadow.png deleted file mode 100644 index 62af3ea..0000000 Binary files a/site/media/img/shadow.png and /dev/null differ diff --git a/site/media/img/stop.gif b/site/media/img/stop.gif deleted file mode 100644 index e8f861f..0000000 Binary files a/site/media/img/stop.gif and /dev/null differ diff --git a/site/media/img/text-centered.png b/site/media/img/text-centered.png deleted file mode 100644 index 469be86..0000000 Binary files a/site/media/img/text-centered.png and /dev/null differ diff --git a/site/media/img/text.png b/site/media/img/text.png deleted file mode 100644 index f5cd960..0000000 Binary files a/site/media/img/text.png and /dev/null differ diff --git a/site/media/img/tree.png b/site/media/img/tree.png deleted file mode 100644 index d42aabd..0000000 Binary files a/site/media/img/tree.png and /dev/null differ diff --git a/site/media/js/html5css3ie.min.js b/site/media/js/html5css3ie.min.js deleted file mode 100644 index f492e90..0000000 --- a/site/media/js/html5css3ie.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/*! Respond.js v1.4.2: min/max-width media query polyfill - * Copyright 2014 Scott Jehl - * Licensed under MIT - * http://j.mp/respondjs */ - -!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); diff --git a/site/media/js/hyphenate.js b/site/media/js/hyphenate.js deleted file mode 100644 index d57e1fc..0000000 --- a/site/media/js/hyphenate.js +++ /dev/null @@ -1,21 +0,0 @@ -/*! - * Hyphenator 2.5.0 - client side hyphenation for webbrowsers - * Copyright (C) 2010 Mathias Nater, Zürich (mathias at mnn dot ch) - * Project and Source hosted on http://code.google.com/p/hyphenator/ - * - * This JavaScript code is free software: you can redistribute - * it and/or modify it under the terms of the GNU Lesser - * General Public License (GNU LGPL) as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) - * any later version. The code is distributed WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. - * - * As additional permission under GNU GPL version 3 section 7, you - * may distribute non-source (e.g., minimized or compacted) forms of - * that code without the copy of the GNU GPL normally required by - * section 4, provided you include this license notice and a URL - * through which recipients can access the Corresponding Source. - */ - -var Hyphenator=(function(){var languageHint='cs, da, bn, de, en, es, fi, fr, gu, hi, hu, hy, it, kn, lt, ml, nl, or, pa, pl, pt, ru, sv, ta, te, tr, uk',supportedLang=(function(){var k,i=0,a=languageHint.split(', '),r={};while(!!(k=a[i++])){r[k]=true;}return r;}()),prompterStrings={'cs':'Jazyk této internetové stránky nebyl automaticky rozpoznán. Určete prosím její jazyk:','da':'Denne websides sprog kunne ikke bestemmes. Angiv venligst sprog:','de':'Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben:','en':'The language of this website could not be determined automatically. Please indicate the main language:','es':'El idioma del sitio no pudo determinarse autom%E1ticamente. Por favor, indique el idioma principal:','fi':'Sivun kielt%E4 ei tunnistettu automaattisesti. M%E4%E4rit%E4 sivun p%E4%E4kieli:','fr':'La langue de ce site n%u2019a pas pu %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue, s.v.p.%A0:','hu':'A weboldal nyelvét nem sikerült automatikusan megállapítani. Kérem adja meg a nyelvet:','hy':'Չհաջողվեց հայտնաբերել այս կայքի լեզուն։ Խնդրում ենք նշեք հիմնական լեզուն՝','it':'Lingua del sito sconosciuta. Indicare una lingua, per favore:','lt':'Nepavyko automatiškai nustatyti šios svetainės kalbos. Prašome įvesti kalbą:','ml':'ഈ വെ%u0D2C%u0D4D%u200Cസൈറ്റിന്റെ ഭാഷ കണ്ടുപിടിയ്ക്കാ%u0D28%u0D4D%u200D കഴിഞ്ഞില്ല. ഭാഷ ഏതാണെന്നു തിരഞ്ഞെടുക്കുക:','nl':'De taal van deze website kan niet automatisch worden bepaald. Geef de hoofdtaal op:','pt':'A língua deste site não pôde ser determinada automaticamente. Por favor indique a língua principal:','ru':'Язык этого сайта не может быть определен автоматически. Пожалуйста укажите язык:','sv':'Spr%E5ket p%E5 den h%E4r webbplatsen kunde inte avg%F6ras automatiskt. V%E4nligen ange:','tr':'Bu web sitesinin dilini otomatik olarak tespit edilememiştir. Lütfen ana dili gösterir:','uk':'Мова цього веб-сайту не може бути визначена автоматично. Будь ласка, вкажіть головну мову:'},basePath=(function(){var s=document.getElementsByTagName('script'),i=0,p,src,t;while(!!(t=s[i++])){if(!t.src){continue;}src=t.src;p=src.indexOf('Hyphenator.js');if(p!==-1){return src.substring(0,p);}}return'http://hyphenator.googlecode.com/svn/trunk/';}()),isLocal=(function(){var re=false;if(window.location.href.indexOf(basePath)!==-1){re=true;}return re;}()),documentLoaded=false,dontHyphenate={'script':true,'code':true,'pre':true,'img':true,'br':true,'samp':true,'kbd':true,'var':true,'abbr':true,'acronym':true,'sub':true,'sup':true,'button':true,'option':true,'label':true,'textarea':true},enableCache=true,enableReducedPatternSet=false,enableRemoteLoading=true,displayToggleBox=false,hyphenateClass='hyphenate',dontHyphenateClass='donthyphenate',min=6,isBookmarklet=(function(){var loc=null,re=false,jsArray=document.getElementsByTagName('script'),i,l;for(i=0,l=jsArray.length;i0){Expando.appendDataForElem(elements[elements.length-1],{isLast:true});}},convertPatterns=function(lang){var plen,anfang,pats,pat,key,tmp={};pats=Hyphenator.languages[lang].patterns;for(plen in pats){if(pats.hasOwnProperty(plen)){plen=parseInt(plen,10);anfang=0;while(!!(pat=pats[plen].substr(anfang,plen))){key=pat.replace(/\d/g,'');tmp[key]=pat;anfang+=plen;}}}Hyphenator.languages[lang].patterns=tmp;Hyphenator.languages[lang].patternsConverted=true;},convertExceptionsToObject=function(exc){var w=exc.split(', '),r={},i,l,key;for(i=0,l=w.length;i=min){n.data=n.data.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}}}if(hyphenatorSettings.isHidden&&intermediateState==='hidden'){el.style.visibility='visible';if(!hyphenatorSettings.hasOwnStyle){el.setAttribute('style','');el.removeAttribute('style');}else{if(el.style.removeProperty){el.style.removeProperty('visibility');}else if(el.style.removeAttribute){el.style.removeAttribute('visibility');}}}if(hyphenatorSettings.isLast){state=3;onHyphenationDone();}},removeHyphenationFromElement=function(el){var h,i=0,n;switch(hyphen){case'|':h='\\|';break;case'+':h='\\+';break;case'*':h='\\*';break;default:h=hyphen;}while(!!(n=el.childNodes[i++])){if(n.nodeType===3){n.data=n.data.replace(new RegExp(h,'g'),'');n.data=n.data.replace(new RegExp(zeroWidthSpace,'g'),'');}else if(n.nodeType===1){removeHyphenationFromElement(n);}}},hyphenateDocument=function(){function bind(fun,arg){return function(){return fun(arg);};}var i=0,el;while(!!(el=elements[i++])){window.setTimeout(bind(hyphenateElement,el),0);}},removeHyphenationFromDocument=function(){var i=0,el;while(!!(el=elements[i++])){removeHyphenationFromElement(el);}state=4;};return{version:'2.5.0',languages:{},config:function(obj){var assert=function(name,type){if(typeof obj[name]===type){return true;}else{onError(new Error('Config onError: '+name+' must be of type '+type));return false;}},key;for(key in obj){if(obj.hasOwnProperty(key)){switch(key){case'classname':if(assert('classname','string')){hyphenateClass=obj.classname;}break;case'donthyphenateclassname':if(assert('donthyphenateclassname','string')){dontHyphenateClass=obj.donthyphenateclassname;}break;case'minwordlength':if(assert('minwordlength','number')){min=obj.minwordlength;}break;case'hyphenchar':if(assert('hyphenchar','string')){if(obj.hyphenchar==='­'){obj.hyphenchar=String.fromCharCode(173);}hyphen=obj.hyphenchar;}break;case'urlhyphenchar':if(obj.hasOwnProperty('urlhyphenchar')){if(assert('urlhyphenchar','string')){urlhyphen=obj.urlhyphenchar;}}break;case'togglebox':if(assert('togglebox','function')){toggleBox=obj.togglebox;}break;case'displaytogglebox':if(assert('displaytogglebox','boolean')){displayToggleBox=obj.displaytogglebox;}break;case'remoteloading':if(assert('remoteloading','boolean')){enableRemoteLoading=obj.remoteloading;}break;case'enablecache':if(assert('enablecache','boolean')){enableCache=obj.enablecache;}break;case'enablereducedpatternset':if(assert('enablereducedpatternset','boolean')){enableReducedPatternSet=obj.enablereducedpatternset;}break;case'onhyphenationdonecallback':if(assert('onhyphenationdonecallback','function')){onHyphenationDone=obj.onhyphenationdonecallback;}break;case'onerrorhandler':if(assert('onerrorhandler','function')){onError=obj.onerrorhandler;}break;case'intermediatestate':if(assert('intermediatestate','string')){intermediateState=obj.intermediatestate;}break;case'selectorfunction':if(assert('selectorfunction','function')){selectorFunction=obj.selectorfunction;}break;default:onError(new Error('Hyphenator.config: property '+key+' not known.'));}}}},run:function(){var process=function(){try{autoSetMainLanguage();gatherDocumentInfos();prepare(hyphenateDocument);if(displayToggleBox){toggleBox(true);}}catch(e){onError(e);}};if(!documentLoaded){runOnContentLoaded(window,process);}if(Hyphenator.isBookmarklet()||documentLoaded){process();}},addExceptions:function(lang,words){if(lang===''){lang='global';}if(exceptions.hasOwnProperty[lang]){exceptions[lang]+=", "+words;}else{exceptions[lang]=words;}},hyphenate:function(target,lang){var hyphenate,n,i;if(Hyphenator.languages.hasOwnProperty(lang)){if(!Hyphenator.languages[lang].prepared){prepareLanguagesObj(lang);}hyphenate=function(word){if(urlOrMailRE.test(word)){return hyphenateURL(word);}else{return hyphenateWord(lang,word);}};if(typeof target==='string'||target.constructor===String){return target.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}else if(typeof target==='object'){i=0;while(!!(n=target.childNodes[i++])){if(n.nodeType===3&&n.data.length>=min){n.data=n.data.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}else if(n.nodeType===1){if(n.lang!==''){lang=n.lang;}Hyphenator.hyphenate(n,lang);}}}}else{onError(new Error('Language "'+lang+'" is not loaded.'));}},getRedPatternSet:function(lang){return Hyphenator.languages[lang].redPatSet;},isBookmarklet:function(){return isBookmarklet;},toggleHyphenation:function(){switch(state){case 3:removeHyphenationFromDocument();toggleBox(false);break;case 4:hyphenateDocument();toggleBox(true);break;}}};}());if(Hyphenator.isBookmarklet()){Hyphenator.config({displaytogglebox:true,intermediatestate:'visible'});Hyphenator.run();}Hyphenator.languages.en={leftmin:2,rightmin:2,shortestPattern:2,longestPattern:8,specialChars:'',patterns:{3:'a2da2fai2a1ja2n4ao2bfb1jbk44bp2btb1v1cac3c2ch1cick1c5n1coc1q1cyd1bd5cd1jd1m1dod1p1dr1dud1vd1wd2ye1fei2e1je1q4eu1fa4fd4fh1fi4fm4fn1fo2ft3fu1fy1gag3bgd4gl2g1m1gog3p1grgs2g3w1gyh1bh1fh1h4hkh1w2id2igi3hi3j4ik2io2ip4iri1u2iv4iy5ja1jek1bk3fkh4k1ikk4k1lk1mk5tk1w2ld2lf4ljl1l2lm2lp4lt1ly1ma2mh4mkm1m1mo4mt1mu4mw1nan3fn1jn5mn1qn1rn1t4nz4oaoi2o5j2oko2noo2o1qou21papd44pf4pgpr2p3wqu2r1br1cr1frg2rh4r3jr1lr1mr1pr1wsa2s2hsk21sos1r2ss1su4svsw2s4y1ta4tc2tl1to1tu4tvtw41ty4tzu5j4uk2usu3u1vav4yw1bwi2w4kw5p4wtwy4x1ax1ex1hx3ix3ox3px1uxx4y1by1cy1dy1iy1wza14zb2ze5zl4zm1zo',4:'_ch4_ci2_eb4_eg2_es3_eu3_ga2_ge2_he2_in1_le2_me2_od2_os3_sh2_si2_st4_sy2_ta4_te4_th2_ti2_up3_ye44ab_abe24abr2adi4aduae4raff4ag1iag1na2goa4gya3haa3heah4la3hoa5ia2aleal1i4alm4amaa2mo4and2angano4a2pla3pu2a2rar1iar2par3q4as_as4la2ta4atha1tra2tua2tyau4bau3ra2vaav1iaw3iaws4aye4ays45ba_1batba4z2b1bb2be4b1d4be_1bel3betbe3w4b3hbi2bbi4d3bie1bilbi2tb2l2b4lo4b1m4b3n3bodbo4e3boobt4lb4tob3trbu4n4b5w5by_bys42ce_3cei1cen3cepcet4cew44ch_che23ciaci5c4cii2cim2cin5cizck3icly4coe22cogcoi4cov1cri22c1tc2tec4twcud5c4ufc4ui3cun1cuscze41d2a5da_4daf2dag3dat5dayd1d42de_d4em1dende1pd3eqdes2de1tde1v4dey4d1fd4gadg1id2gyd1h25di_3didd1ifd1in1diodir2dis1d5k22dly3do_5doed4ogd4or3dosdo4v3doxdre44dryds4pd4swd4syd2thdu2cdu4gdu4n4dup5dynead1ea4lea2tea2v2e1be3bre1ceec2ie1cre1cu4edi4edoee2cee2fee2me5ex1effeg5n5egye1h4e5icei5deig2e1lael2fel2iem5be1mee3my4enn4enoe5ofeo2ge3ole1oreos4e4ote5owe2pae1poer1a2erber1her1i2eroer1s4erues2c4eshe1sie1sp2esses4w4etnet5ze5une3upeus4e1vie5vue1wae3wh1exp5eyceys44fag5far4f5b4fe_fe4b2fedfer1fev44f1ff2fyfi3a2finf4l25fonfo2rfos54f5pfri22f3sf4tof2ty4fuggaf42gam4gaz2ge_2ged1gen1geoge4vg2geggo45gi_g1icgil45gio3girgi4u5giv3gizgla41gle3glog4mygn4ag1nig1no3go_gob55goegon25googov1g4rogth3gu4a2gue3gun3gusha4m5hazh4edhe2nhep5h1eshe4theu4hi4phi2vh2lo4h1m2h1nho4g4h5p4hr4h4shh4tyhu4ghu4thy2s2i1ai2aliam4i2anibe4i1bli5boi1br4ich2iciid5di2dii4dri2du2ie4i3et4if_i3fl4ift4igii2goi1lail5fil1i4ilnil3vim1ii2mu2in_4ind2ine2ini4ink4inl2inn2insin1u4iny4io_i1olio4mi4osipe4ip3ii1rair1i2is_4ise3isfi2sois1pi2su2ite2ithi1ti4itt4i5wix4oizi4ja4pjew3jo4p3ka_k3abk5agkal4k2ed1keeke4gk1erkes45ki_k4imki4pkis44klyko5rk3ouk4scks4lk4sy4lav2l1blce4l3cil2deldi4l3drle2ales23leyl5frl5galgo32l3h3likl1itl1izlka3l2lell2ill4o3lo_4lof4lovl4pll5pr4l1rl4scl2sel1tel1trltu2lu5aluf4lu3o4lup1lut2l1w4lya4lyb2mab2mah4map4m1b4m5c4me_2medme2gme2m1men2mesme4v4m1f5mi_mi3amig4m2ism2iz4m1l4m1nmn4amn4o4mokmo2rmos2mo2v4m1pm2pim2py4m3rm4shm5si3mummun24mupmu4unak4n2ann4asn2atn2aun1crn1cun1de2ne_ne2bne2c2ned1nen3neone2qn1er1nesne4vne4wn1gun2gynha4nhe4ni4dnik4n1imn1inni4on2it4nk2n1kl4n1lnme4nne43noe4nogno4n4nop1noun1p4npi4nru4ns4cn2sen2slns3mnt2int4snu1anu4dn4umn3uon1v2n1w4nym4nyp4n3zaoad3o1bio3bro1ceoch4o4elo3ero3evo2fio1geo4gl1ogyo1h2oig4o1laol2dol2iol2tol2vo2lyo2meon1aon1c2ondon3soo4ko2pa2opho1prop1uopy5o1rao1ryos2cos4lo2so4othou4lou5vow1io4wooy1ap4adp4aip4alpa1ppav43pay4p1b4pe_pe2cp4eepek4pe2t4ph_ph2l4phsph3t5phu1phypi3ap4idpi2n4p1m2p3npo4cpo4p1posp4ot4p1pp2pep2seps4h2p1tp2tep2thp4twpub3pue4puf4pu4mpu2n5puspu2t2rabr2air2asrbi2rb4or2cerd2i2re_re1oreu2rev2rfu4r4fyr1glr3gu4rh_ri3ar4ibri1or4iqr2isrle4r2mer4myrno4r3nur2ocro4erok2rox5r3por1r44rs2r1sars4cr2ser1shr1sir1spr5swr1tiru3aru2nrv4er3vory4cry3t5sais1apsau45saw4s5bsch2s1cu4s5d4se_se4ase2g5sei5sev5sex4s3f2s3g2sh_sho44shwsi1b1siosi2r1sis5siu1siv5siz4skes1l2s2le2s1ms3mas1n43soms4op4sov2spas1sas1sis4sls4snss2tss5w2st_st2ist4rs2tys4ulsu2msu2nsu2r4swo4syc3syl3ta_2tabta2ltav42taw2t1bt4ch4t1d4te_1teeteg41teote4p3teu3tex4tey2t1f4t1g2th_th2e4thl2ths1tiatif22tig1tim1tio5tiqti4u1tiv1tizt5lat5lo4t1mtme4to3b2toftos24t1p1trat4sctsh4t4swt5tottu4tu1atud24tue3tum3tus4two4tya2tyltz4e4uabuac4u1atuav4ub4eu3cau3cru3cuu4cyud5du4du3ufau3fl2ui2ui4nuiv3u1laul4eul2i4ulsu3luul5vu1mium2pu2neu1niunu4un5yun5zu5osu1ouu1peu3plup3pu1raurc4ur1dur2lu3ruusc2us1pu2suuts4uu4mu1v2uxu3uz4e5va_vag43vat4ve_4vedveg3v3ifvik42vilv1invi4p3viv5vo_voi43vok4vv42wacwam4w1erw3evwhi4wil2wir4wiz5w4no1wo2wom1wra4wri4w3shws4lxam3x4apxas5x3c2x2edxhi2xhu4xi5axi5cx4obx1t2x3tixu3ay5acy5aty2cey3chy5eey1eryes4ye4ty5gi4y3hy3lay3loy5luyme4yn5dyn5g5ynxy1o4yo5dyom4y4osyp3iy3poy5puy3royr4rys4cy4soyss4ys1tzar2ze4nze4pz1erzet42z1iz4ilz4iszo4mzte4z4zy',5:'_ach4_af1t_al3t_an5c_ang4_ant4_ar5s_as3c_as1p_as1s_au1d_av4i_awn4_ba4g_ber4_bri2_ca4t_co3e_co4r_de3o_do4t_du4c_eer4_el5d_en3g_en3s_eye5_fes3_gi5a_gi4b_go4r_hes3_het3_hi3b_hov5_id4l_im3m_ine2_in2k_in3s_ir5r_is4i_ju3r_la4m_len4_lep5_lev1_li4g_li2n_li3o_li4t_mis1_ni4c_odd5_or3c_or1d_or3t_oth3_out3_pi4e_pi2t_ra4c_ree2_res2_ri4g_ro4q_ru4d_se2n_til4_to4p_un1a_un1e_un5k_un5o_un3u_ure3_us5aa5bala5banabi5aab3ula4carac1er4a2cia3cieac1ina3cioac3ulac4uma3diaa3dioa3dita5diuad4lead3owad4sua3ducad5uma4gabaga4nage4o4ageu4ag4l3agogag5ula3ic_ai5lya4i4nain5oak1enal5abal3ada4lar4aldiali4ea4ly_4alys5alyt3alyzam5abam3agam3icam5ifam1ina5mona3naran1dla5neea3nena3neuan1glan3ioa3nipan3ita3niuan5otan2saan4snan2span4st4antoan2tran4twan3uaan3ula5nurapar4ap5at4aphiap3inapoc5aque5ar3alara3par4ata5rauaraw4ar4dra3reear4fiar4flar4imar3ioar2izar2mia3rooarre4ar4saar2shas4abashi4a3siba3sicask3ia4socas5phas4shas1trat5acat5apate5cat5evat4ho4ati_a5tiaat1icat3ifa4toga2toma4topa4tosat4skat5teat4that5uaat5ueat3ulaugh3au3guau4l2aun5dau1thav3aga5vanav3igav5oca1vor3awayaw4lyax4icax4iday5alazz5iba4gebal1aban4eban3ib3berbeak4beat34be2dbe3dabe3debe3dibe3gibe5gube1libe3lo4be5mbe5nu4bes4be3spbe5trbe3twbe5yobi5enbi4er2b3ifbin4dbi5oubi3trb5itzb4le_blen4b3lisbne5gbod3ibon4a5bor_bor5d5bore5bori5bos4b5otaboth5bo4to4brit2b5s2bsor4bu4gabu3libumi4bu3re5bust4butab5utoca1blcach44cag42c5ah4calocan5dcan4ecany44casyca4thccha5cci4accon44ced_5cel_3cell3cenc4ceni3cent4cesaces5t4ched5chio3chitchi2z3cho2ch4ticia5r4cierci4la3cilic4inac1ing5cinocion44cipeci3ph2c1it1c4l44clarcle4m4clicclim4co5agco4grcol5i5colocon4ac4onecon3gcon5tco3paco4pl4corbcos4ecove4cow5acoz5eco5zi5credcre4vcri5fc4rincris4cru4d4c3s2cta4bc3terctu4r5culicu2mac3umecu4micu3picu5py3c4ut4cutrdach4da2m2dan3gdard5dark54dary4dato5dav4dav5edeaf52d1ed4dee_de5ifde5lo5dem_de3node3nude3padepi4de2pud4erh5dermder5sd2es_de1scde4sude2todia5bd4ice3dictdi3ge1dina5dinidio5gdi4pldi1re5disid2iti1di1v4d5la3dle_3dled2d3lo4d5lu4d1n4do5de2d5ofdo4ladoli4doni4doo3ddop4p4drai5drendri4bdril4dro4p4drow2d1s2d1u1ad1ucadu5eld3uledu4pedy4sedys5pe1a4be3actea4gee5andear3aear4cear5kear2tea5spe3asseast3eav5ieav5oe4bene4bite4cadecca5e4cibec3imeci4te2cole2corec4tee4cul2e2da4ed3dede4se3diaed3ibed3imed1itedi5ze4doledon2e4drie4duleed3ieel3iee4lyee4naee4p1ee2s4eest4ee4tye4ficefil43efit4egaleger4eg5ibeg4ice4go_e4goseg1ule5gureher4ei5gle3imbe3infe1ingeir4deit3eei3the5itye4judeki4nek4lae4la_e4lace4lawe3lea5elece4lede5lene1lese5lime3lioe2lis4ellaello4e5locel5ogel2shel4tae5ludel5uge4mace4mage5mane2mele4metemi4ee4misem3izemo4gem3pie4mulemu3ne5neae5neeen3eme3newe5niee5nile3nioen3ite5niu5enizeno4ge4nosen3oven4swen3uaen5ufe3ny_4en3ze4oi4eo3reeo4toe5oute3paie5pelephe4e4plie3proep4she4putera4ber3arer4bler3ch2ere_ere4qeret4e1rio4eriter4iueri4ver3m4er3noer5obe5rocero4rer1ou4ertler3tweru4te1s4ae2scae3scres5cue1s2ee2sece3shae2sice2sidesi4ues4mie2sole2son2estre2sureta4be3teoet1icetin4e5tire3trae3treet3uaet5ymeu3roeute4eu5tre2vase5veaev1erev3idevi4le4vinevi4ve5voce4wage5weeewil5e3wit5eye_fa3blfab3rfa4cefain4fa3ta4fatofeas44feca5fectfe3life4mofen2d5ferrf4fesf4fief4flyfic4i4ficsfi3cufil5i4fily5finafi2nefin4nflin4f2ly5fon4tfor4ifra4tf5reafril4frol5fu5elfu5nefu3rifusi4fus4s4futa5gal_3galiga3log5amo4ganogass4gath3geez44gely4geno4genyge3omg4ery5gesigeth54getoge4ty4g1g2g3gergglu5gh3ingh4to1gi4agia5rg4icogien5gir4lg3isl5glasgli4bg3ligglo3rg4na_g2ning4niog4nongo3isgo3ni5gos_g4raigran24graygre4n4gritgruf4g5ste4gu4tgy5rahach4hae4mhae4th5aguha3lahan4ghan4khap3lhap5thar2dhas5shaun4haz3a1head3hearh5elohem4phena4heo5rh4erah3ernh3eryhi5anhi4cohigh5h4il2h4inahir4lhi3rohir4phir4rhis4s4h1l4hlan4hmet4h5odshoge4ho4mahome3hon4aho5ny3hoodhoon4ho5ruhos4ehos1p1houshree54h1s2h4tarht1enht5eshun4thy3pehy3ph4iancian3iia5peiass4i4atuib5iaib3inib3lii5bun4icam5icap4icaricas5i4cayiccu44iceoi5cidi2cipi4cly4i1cr5icrai4cryic4teictu2ic4umic5uoi3curi4daiide4si5dieid3ioid1itid5iui3dlei4domid3owid5uoied4eield3ien4ei5enni1er_i3esci1estif4fri3fieiga5bi3gibig3ilig3inig3iti4g4lig3orig5oti5greigu5iig1ur4i5i4i3legil1erilev4il3iail2ibil3io2ilitil2izil3oqil4tyil5uri4mag4imet4imitim4nii3mon4inavi3nee4inga4inge4ingi4ingo4ingui5ni_i4niain3ioin1is2i1noino4si4notin3se2int_i5nusioge4io2grion3iio5phior3iio5thi5otiio4toi4ourip4icip3uli3quaira4bi4racird5ei4refi4resir5giir4isiro4gir5ulis5agis3arisas52is1cis3chis3eris3ibisi4di5sis4is4k4ismsis2piis4py4is1sis1teis1tiis5us4ita_i4tagi3tani3tatit4es4itiait3igi2tim2itio4itis4itonit5ryi5tudit3ul4itz_iv5ioiv1it4izarjac4qjer5s5judgkais4ke5like4ty5k2ick4illkilo5k4in_kin4gk5ish4kleyk5nes1k2nokosh4kro5n4k1s2l4abolaci4l4adela3dylag4nlam3o3landlar4glar3ilas4elbin44l1c2ld5isl4drile4bileft55leg_5legg4len_3lenc1lentle3phle4prler4e3lergl4ero5lesq3lessl3eva4leye4l1g4lgar3l4gesli4agli2amli4asli5bi4licsl4icul3icyl3ida3lidil4iffli4fl3lighlim3ili4mol4inalin3ili5og4l4iqlis4pl2it_l3kallka4tl4lawl5leal3lecl3legl3lell5lowl5metl4modlmon42l1n2lo4cil5ogo3logu5longlon4ilood5lop3il3opmlora45los_los4tlo4ta2loutlpa5bl3phal5phil3pit2l1s2l4sielt5aglten4lth3iltis4lu3brluch4lu3cilu3enlu5idlu4ma5lumiluo3rluss4l5venly5mely3no2lys4l5ysema2cama4cl5magnmaid54maldmar3vmas4emas1t5matemath3m5bilmbi4v4med_mel4tmen4a4menemen4imens43mentme5onme4tame1tem4etrmid4amid4gm4illmin4a3mindmin4tm4inumiot4mis5l4mithm4nin4mocrmo2d1mo4gomois2mo3memo3spmoth3m5ouf3mousm3petmpi4am5pirmp5ismpov5mp4tr4m1s25multn4abu4nac_na4can5actna4li4naltnank4nar3c4narenar3inar4ln5armnas4c3nautnav4e4n1b4ncar5n3chanc1innc4itn4dain5danndi4bn1ditn3dizn5ducndu4rnd2wen3earneb3u5neck5negene4lane5mine4mo4nenene4pon2erener4r2nes_4nesp2nest4neswn5even4gabn3gelng5han3gibng1inn5gitn4glangov4ng5shn4gum4n1h4nhab33n4iani3anni4apni3bani4blni5dini4erni2fin5igrnin4g5nis_n4ithni3trn3ketnk3innmet44n1n2nni4vnob4ln5oclnoge4no4mono3mynon5i4noscnos4enos5tno5ta3nounnowl32n1s2ns5abnsid1nsig4n4socns4pen5spinta4bn5tibnti2fnti4pnu5enn3uinnu1men5umi3nu4nnu3troard3oas4eoat5io5barobe4lo2binob3ulocif3o4cilo4codocre3od3icodi3oo2do4odor3o5engoe4tao5geoo4gero3gieog3ito4groogu5i2ogynohab5oiff4o3ingo5ismo3kenok5ieo4lanold1eol3ero3letol4fio3liao5lilo5lioo5livolo4rol5plol3ubol3uno5lusom5ahoma5lom2beom4blo4meto3miao5midom1ino4monom3pion4aco3nanon5doo3nenon4guon1ico3nioon1iso5niuonsu4on5umonva5ood5eood5ioop3io3ordoost5ope5dop1ero3pito5pono5ra_ore5aor3eiorew4or4guo5rilor1ino1rioo3riuor2miorn2eo5rofor5pe3orrhor4seorst4or4tyo5rumos3alos4ceo5scrosi4uos4paos4poos2tao4tano4teso3tifo3tisoto5sou3blou5etoun2dov4eno3visow3elown5ipa4capa4cepac4tpain4pan4apa3nypa4pu3parepa2te3pe4a2p2ed3pede3pedipee4dpe4lap4encpe5onp4erip4ernper3ope5ruper1vph4erph1ic5phie3phiz3phobpho4rpian4pi4cyp5idapi3de5pidi3piecpi3enpi3lop4in_pind4p4ino3pi1opion4p3ithpi2tu2p3k21p2l23planpli3a4pligpli4nploi4plu4m5pod_po5em5po4gpoin2po4ni1p4orpo4rypos1spo4ta5pounp4pedp5pelp3penp3perp3petpre3rpre3vpri4spro3lpro1t2p1s2p4sibpti3mptu4rpul3cpur4r5putepu3trqua5v2que_3quer3quetra3bir5aclraf4tra4lor2amir4anira5norar5crare4rau4tr4babr4bagrbi4fr2binrcen4r3charc4itrcum3r4dalrdi4ardin4re1alre3an5reavre4aw2r2edre1dere2fere3fire4fyre5itre1lire5lure1pur1er4r4erirero4re5rur4es_res2tre4whrg3err3getr3gicrgi4nr5gisr5gitrgo4n4rhalria4bri4agrib3ar4ice4ricir4icori1erri5et5rigirim5i3rimor2inarin4drin4erin4g5riphri2plr4is_ris4cr3ishris4pri2turiv3ir3ketrk4ler2ledr4ligr4lisr3lo4rma5cr3menr4mior3mitr4narr3nelr4nerr5netr3neyr5nicr3nitr3nivr4nourob3lro3crro1ferom4irom4pron4e1room5rootror3iro5roros4sro4tyro4var4pear3petrp4h4rre4crre4fr4reorri4orri4vrron4rros4rrys4r3secrs3esr5sharson3r4tagr3tebrte5ort5ibrti4dr3tigr4tivr3trirt4shru3enru4glru3inrunk5r5uscr3venr3veyr3vicrvi4v2s1ab5sacks3actsal4msa5losal4t3sancsa5tasat3usca4pscav5s4ced4sceis4cess4choscle5s4cliscof4seas4sea5w3sect4s4eds5edlseg3rse1le5self5selv4seme4sencsen4dsen5gs4erlser4os1e4sse5shses5tsew4ish1er5shevsh1insh3io3shipshiv5shon3shor4s5icc5sidisil4e4sily2s1ins2inas3ing5sionsir5as3kets3latsman3smel4s5menso4cesoft35solvsona4son4gsor5csor5dso5vi5spaispa4n2spers2phespho5spil44spios4plys4ponspor44spotssas3s2s5cs3sels5sets4siess4lis2tags2tals4tedste2ws3thes4ti_s5tias1tics4ties3tif5stirs1tles4top4stry4st3wsu1alsu4b3su2g3su5issuit3sum3isyn5o4tacita5do4taf4ta5latal3i4talkta5mota5pltar4a4tarc4taretas4eta5sytaun44teattece45tect2t1edte5dite5gi3tel_teli45tels3tenc3tend1tentte5peter3c1teriter5v4tes_4tessthan44thea3thet4thil4thooti4ab2ti2b4tickt4ico5tidi3tienti5fy5tigu4timp2t1int2ina3tiniti5octi3sa3tisetis4mti5sotis4pti3tltiv4ati3zatlan43tle_3tled2t1n24todoto2grto5icto2matom4bto3my4tono4tonyto2ra5tour4touttra3btras4tre5ftre4m5tria2trimtri4vtro3vtru5itrus44t1s24t3t2t4testu3artu4bi4tuf45tu3i3ture5turitur5otu5ry4t1watwis4type3ty5phua5nauan4iuar2duar3iuar3tu4belu3beru1b4iuci4buc4itucle3ud3erudev4u1dicud5isu5ditu4donud4siu4eneuens4ug5inu1inguir4muita4ula5bulch4u1lenul4giu5lia4ul3mu1l4oul1ti4ultuul5ulum5abum4biunat4un4erun4imu2ninuni3vun3s4un4swu4orsu5piauptu44ura_u4ragu4rasur4beur4fru3rifur1inu3riou1ritur3izur4nouros4ur4peur4piurti4u5sadu5sanus4apus3ciuse5au5siau3sicus5slus1trusur4uta4bu3tat4ute_4utel4utenu4tisu4t1lut5ofuto5gu5tonu4touvac3uva4geval5oval1uva5mova5piv3el_ve4lov4elyv4erdv4e2s4ves_ve4teve4ty5vian5vidivi5gnv2incvin5d4vingvio3lvi1ouvi5rovi3sovi3su4vitivit3r4vityvo4lav5ole5volt3volvvom5ivori4vo4ryvo4taw5ablwag5owait5w5al_war4twas4twa1tewed4nweet3wee5vwel4lwest3win4g3wisewith3wl4eswl3inws4pew5s4txac5ex4agoxer4ixe5roxhil5xi5dix4imexpe3d3yar4yc5erych4eycom4ycot4y4erfympa3yn5icy4o5gy4onsy4pedyper5y4pocyp2tayra5myr5iay3s2eys3io3ysisys3taysur4yt3icz5a2bze3rozo5ol4z1z2',6:'_am5at_ani5m_an3te_ar4ty_atom5_ba5na_bas4e_be5ra_be3sm_can5c_ce4la_cit5r_de3ra_de3ri_des4c_dumb5_eas3i_el3em_enam3_er4ri_ge5og_han5k_hi3er_hon3o_idol3_in3ci_la4cy_lath5_leg5e_lig5a_mal5o_man5a_mer3c_mon3e_mo3ro_mu5ta_of5te_os4tl_pe5te_pio5n_pre3m_ran4t_rit5u_ros5t_row5d_sci3e_self5_sell5_sing4_ting4_tin5k_ton4a_top5i_tou5s_un3ce_ve5ra_wil5iab5erdab5latab5rogac5ardac5aroa5ceoua5chetac5robact5ifad4dinad5er_ad3icaadi4erad5ranaeri4eag5ellag3onia5guerain5inait5enal3enda5le5oal4ia_al5lev4allica5log_ama5raam5ascam5eraam5ilyami4noamor5iamp5enan3age3analyan3arcanar4ia3natiande4san3disan4dowang5iea4n1ica3niesan3i3fan4imea5nimia5ninean3ishan4kli5annizanoth5an4scoans3poan4surantal4an4tieap5eroa3pherap3itaa3pituap5olaapor5iapos3taps5esar3acta5radearan4gar5av4arbal4ar5easar3enta5ressar5ialar3iana3rietar5o5da5ronias3anta5sia_as3tenasur5aat3ablat3aloat5echat3egoat3en_at3eraater5nat3estath5ema5thenath5omat5i5bat3ituat5ropat4tagat3uraau5sibaut5enave4noav3eraav5ernav5eryavi4erazi4erbarbi5bari4abas4sibbi4nabe5nigbe5strbet5izbi3lizbi5netbi3ogrblath55blespblun4tbol3icbom4bibon5at4b1orabound3broth3bunt4ibus5iebuss4e3butiocab3inca5denca3latcal4lacan4iccan5iscan3izcan4tyca5percar5om4cativcav5alccou3t4ceden2cen4ece5ram3cessic5e4ta4ch3abcheap3che5lo3chemich5enech3er_ch3ers4ch1in5chinici2a5b3cinatcin3emc5ing_4cipic4cista4cisticit3iz5clareco3inccol3orcom5ercop3iccoro3ncras5t5crat_cre3at5criticro4plcrop5ocros4ect5angc5tantc4ticuctim3icu5ity3cultucu5riacuss4icu4tie2d3a4b4dativdeb5itde4bondecan4de4cilde5comdeli4e3demicde5mildemor5de4narde2s5odes3tide3strdev3ild3ge4t1d4i3adi4cam5di3en3dine_di5nizdirt5id4is3t3dles_4dlessdo5lordom5izdo3nat4d5outdrea5rduc5er4duct_4ductsdum4beead5ieea5gereal5ereal3oueam3erear5esear4icear4ileart3eeat5eneath3ie5atife4a3tueav3ene4bel_e4belsecan5cec5ifye5citee4clame4cluse4comme4concec3oraeco5roe4cremec4tanec3ulae4d1ered3icaed5ulo5eficie3fineeg5inge5git5e5instej5udielan4delaxa4el3egae4l1ere3libeel3icae3lierel5ishe3liv3el4label3op_em5anaem3icaem1in2em5ineem5ishe5miss5emnizem5ulaen5amoe4nanten3dicen5eroen5esien5esten3etren5icsen3isheop3areo5rolep5ance3pente4prece4predep3rehe4probep5utaequi3l4erander4chee3realere5coere3iner5el_er3emoer5ena4ereneer3enter5esser3este1ria45ericke3rieneri4erer3inee4rivaer4nis4ernit5ernizer3setert3er5erwaues5canes5ecres5encesh5ene2s5imes4i4ne5skines3olues5onaes3peres4preestan4es3tiges5tim4es2toe3stone5stroes5urreten4dethod3e5tideeti4noet5onaet3ricet5rifet3roget5roseuti5leva2p5ev5astev3ellevel3oe5vengeven4ie5verbew3ingfall5e4fa4mafam5isfar5thfa3thefault5feath3fend5ef5fin_f2f5is2f3ic_f3icanf3icenfi3cer5ficia5ficiefi5delfight5fin2d5f1in3gfis4tif5lessflo3refon4defo5ratfor5ayfore5tfort5afres5cfu4minga5metgan5isga3nizgar5n44gativgel4inge5lisge5lizge4natge5nizgh5out5gicia5gies_g3imen3g4in_gin5ge5g4insglad5ignet4t3g4o4ggondo5go5rizgor5ou4grada3guard5gui5t2g5y3nh3ab4lhala3mhan4cihan4cy5hand_hang5ohan4teha3ranha5rashard3ehar4lehe4canh5ecathe5do5he3l4ihel4lyhen5athera3pher4bahere5ah5erouhe2s5phet4edhimer4hion4ehis3elhlo3rih5odizhol5ar3hol4ehor5atho5rishort3eho5senhouse3hov5elhro3pohu4minhun5kehus3t4h4wart4ian4ti4ativib3eraib5ertib5it_ib5itei2b5rii4car_i4caraic5inaic3ipai2c5ocic3ulaid5ancide3alid5ianidi4aridi5ou5ie5gaien5a4i3entiif5eroiff5en4ific_ig3eraight3iil3a4bi4ladei2l5amila5rail4istill5abim3ageima5ryim5idaimi5lei5miniim3ulai4n3auincel4in3ceri5nessin5genin3ityi4no4c2in4thion3atip4re4iq5uefiq3uidire4dei4rel4iri5deiri3tuir4min5iron_is5hanis3honish5opislan4is4salissen4is4sesis4ta_ist4lyita4bi4ita5mit3erai5teri4i2ticit3icait5illi4tismi4tramit3uativ3elliv3en_iv5il_i5vorei4v3ot5izont4jestyk3en4dk3est_kin4delab3iclan4dllan5etlan4tela5tan4lativla4v4ald4ereld4erile4mat5lene_lera5b3l4erile5sco5less_li4ato5licioli4cor4lict_lid5erlif3erli4gra4l4i4llim4bll4im4p1l4inelin3ealiv3erl3le4nl3le4tl2lin4l5linall5outlm3inglob5al3logiclom3er5lope_lo5rielor5oulos5etloun5dlp5ingltane5ltera4ltur3al5umn_lus3tel5vet4mag5inma3ligma5linmal4limal4ty5maniaman5isman3izma5rizmar4lyma5scema3tismba4t55mediame3diem5e5dymel5onmem1o3men5acmen4demensu5men4tem5ersa3mestimet3alme5thime3try3miliam5ineem4inglmis4timma5rymoi5semon5etmon5gemoni3amo3nizmonol4mo3ny_4mora_mo5seympara5mpar5imphas4mp5iesm4p1inmpo3rim4pousmulti32n1a2bna5liana5mitnanci4nan4itnas5tina3talnau3sen4ces_n5cheon5chiln3chisn5d2ifne4gatnel5iznera5bn4erarn4er5i3neticn5geren3gerini3miz5nine_nis4ta3nition3itorn5keronni3alno3ble4n3o2dnois5ino5l4i3nomicnon4agn5oniznor5abnpre4cnsati4n4s3esnter3snti4ern3tinentu3menuf4fe3nu3itoast5eob3a3bob5ingo3cheto4clamoc3rac5ocritoc3ulao5cureod5dedof5iteofit4to4gatoo5gene1o1giso5g2ly3ognizoic3esoi3deroi5letoi5sonoi3terolass4o3lesco3liceol5id_o3li4fol3ingo5lis_ol3isho5liteolli4eol3umeom3enaom3ic_om3icao5miniomo4geompro53oncilon5eston3keyon4odion3omyonspi4onten4on3t4iontif53operao5phano5pherop3ingo4posio4r3ago5realore5sh4o5riaor3icaor3ityor3ougors5enor3thior3thyo3scopos4i4eos3itoos3ityos5tilos5titot3er_ot5ersoth3i4ot3ic_ot5icao3ticeouch5iover3sov4ertoviti4o5v4olow3derow5est5paganp3agatpan3elpan4typar5dipar5elp4a4ripar4ispa5terpa5thypear4lpedia4ped4icpeli4epe4nanpen4thp4era_p4eragperme5per3tipe5tenpe5tizphar5iphe3noph4es_ph5ing3phone5phonipi4ciepi5thaplas5tpli5erplum4bpo3et55pointpoly5tppa5rapray4e5precipre5copre3empre4lap3rese3press5pri4epris3op3rocapros3ept5a4bput3errach4eraf5firam3etrane5oran4gerap3er3raphyrar5ef4rarilra5vairav3elra5zier5binerch4err4ci4brdi4errd3ingre5arrre4crere3disred5itre4facreg3isren4tere5pinre4spire3strre4terre3trire5utire4valrev3elre5vilrg3ingric5as5ricidri4cierid5erri3encri3entrig5anril3iz5rimanrim4pe5rina_riph5erit3icrit5urriv5elriv3etrk4linrl5ishrm5ersrm3ingr1nis4ro5filro5ker5role_ron4alron4taro3pelrop3icro4therov5elr5pentrp5er_rp3ingrre4strsa5tirse4crrs5er_rse5v2r4si4brtach4rten4dr4tierrtil3irtil4lr4tilyr4tistru3e4lrum3plrun4tyruti5nrvel4irv5er_r5vest5ryngesac3risalar4san4desa5vor3s4cie4scopyse2c3ose4d4ese4molsen5ats5eneds5enin4sentd4sentlsep3a34s1er_4servo5se5umsev3ensh5oldshort53side_5sidessi5diz4signa5sine_sion5a3sitiosk5inesk5ingslith5small35smithso4labsol3d2so3lic3s4on_s5ophyspen4d2s5peo3sphersp5ings5sengs4ses_ssi4erss5ilyssur5astam4i5stands4ta4p5stat_s5terostew5a5stickst3ing5stockstom3a5stone3stores4trads4trays4tridsy5rintai5lotal5enta5logtan4detanta3ta5perta3riz4taticta4turtax4istch5ettead4ite5gerte2ma2tem3at3tenan4tenes5ter3dter3ist3ess_teth5eth3easthe5atthe3isth5ic_th5ica5thinkth5odeti4atot4ic1utim5ul3tine_ti3zen3tles_t5let_to3natto3rietor5izto3wartra5chtraci4trem5i4tricstro5mitron5i4tronytro3sptu4nis2t3up_tur3isu4berou3ble_ud5estud3iedud3iesuen4teuer4ilugh3enuil5izu5lati5ulcheul3derul3ingul5ishul4larul4lisuls5esultra3um4blyumor5oun5ishunt3abun4tesuper5sup3ingupt5ibure5atur4ferurs5erur5tesur3theur4tieus4linuten4i4u1t2iu3tineut3ing5u5tiz2v1a4bvac5ilva5lieva5nizvel3liven3omv5enue5vere_v4erelv3erenv4eresver3ie3versever3thves4tevet3ervi5ali5vide_5vided5vides5vilit4vi4nav3io4rvis3itvor5ab4voteewa5gerwa5verweath3win4dewo5venwrita4xi5mizxpan4dymbol5yn3chryo5netys3icay3thin',7:'_ad4der_anti5s_ar4tie_aster5_be5sto_but4ti_cam4pe_capa5b_car5ol_de4moi_earth5_gen3t4_hand5i_hero5i_hon5ey_im5pin_lat5er_mag5a5_mar5ti_me5ter_mist5i_muta5b_or5ato_ped5al_pe5tit_re5mit_se5rie_sta5bl_ten5an_tim5o5_under5_ven4dea4lenti5a5lysta4matisa4m5atoan5est_a4pillaar5adisa5ratioar5ativar4chanar5dinear5inat5a5si4ta5ternaat5omizbad5gerban5dagbina5r43bi3tio3bit5uabuf4fercall5incast5ercas5tigccompa55chanic5chine_5cific_5cratic4c3retacul4tiscur5a4b4c5utivdel5i5qdem5ic_de4monsdenti5fdern5izdi4latodrag5on5drupliec5essaec5ifiee4compee4f3ereefor5ese4fuse_el5ativel5ebrae4l5ic_el5igibe4l3ingem5igraem3i3niemoni5oench4erent5age4enthesep5recaep5ti5b4erati_er5encee4sage_e4sagese4sert_e4sertse4servaes5idenes5ignaesis4tees5piraes4si4bestruc5e5titioet5itiv4f3ical4ficatefill5ingani5za4g3o3na5graph_4graphy4gress_hang5erh5a5nizharp5enhar5terhel4lishith5erhro5niziam5eteia4tricic4t3uainer4ari5nite_5initioinsur5aion4eryiphras4iq3ui3t5i5r2izis5itiviso5mer4istral5i5ticki2t5o5mi4v3er_i4vers_iv3o3ro4jestiek5iness4latelilev4er_lev4eralev4ersliar5iz5ligatelink5er5liticalloqui5l3o3nizlo4ratol5ties_5lumnia4matizam4b3ing5metricme5triem5i5liemin5glim5inglymis4er_m5istrymo5lestmon4ismmon4istmpa5rabmula5r4nag5er_ncour5and5est_nge4n4en5o5mizno4rarynov3el3nsta5bln4t3ingo5a5lesoctor5aod5uct_od5uctso2g5a5rog5ativoint5eroist5eno5litiool5ogizom5atizom5erseom5etry5ommend4operagor5alizor5angeor5est_4oscopios5itivo5statiotele4goth5esiounc5erover4nepara5blpar5age5pathicpa4tricpera5blperi5stper4mal5phistipi4grappref5acpre5tenprin4t3prof5itput4tedput4tinration4rb5ing_r5ebratrec5ollre5fer_r4en4tare4posiress5ibre5stalre4ti4zre5versre5vertrev5olurip5licri3ta3br5ited_rit5er_rit5ersr4ming_rom5etero5n4isros5perrtroph45sa3tioscan4t55scin4dscour5asmol5d45sophics5ophizsqual4lsspend4stern5i5stratuta5blestal4listen4tagter5iesteri5za5ternit5thodicthor5ittho5riztill5intion5eeto5cratton4alitrac4ittrac4tetra5ventri5ces5triciatro5pheuar5antu4b5inguiv4er_ul4li4bu4m3ingun4ter_upport5uri4ficus5tereuti5lizution5avar5iedver5encvermi4n4v3idenv3i3lizwea5riewill5inxe4cutoxpecto5ylla5bl',8:'_chill5i_cor5ner_dictio5_eq5ui5t_for5mer_re5stat_trib5utab5it5abab5o5lizap5illara5rameteation5arces5si5bch5a5nisch5inesse4q3ui3sg5rapher5graphicimenta5rin5dlingin5glinglem5aticl5i5tics5losophyma5chinema5rine_mpos5itenato5mizneg5ativni5ficat5nologisntrol5lioc5ratizonspir5appo5siterec5omper5ev5er_5taboliz5tisticatrav5es5url5ing_',9:'_ratio5nac5laratioec5ificatef5i5niteep5etitio5losophiz5mocratiz5nop5o5liuto5matic'}};Hyphenator.config({displaytogglebox:false,remoteloading:false});Hyphenator.run(); \ No newline at end of file diff --git a/site/media/js/hyphenate.min.js b/site/media/js/hyphenate.min.js deleted file mode 100644 index 36420ec..0000000 --- a/site/media/js/hyphenate.min.js +++ /dev/null @@ -1 +0,0 @@ -var Hyphenator=(function(){var languageHint='cs, da, bn, de, en, es, fi, fr, gu, hi, hu, hy, it, kn, lt, ml, nl, or, pa, pl, pt, ru, sv, ta, te, tr, uk',supportedLang=(function(){var k,i=0,a=languageHint.split(', '),r={};while(!!(k=a[i++])){r[k]=true;}return r;}()),prompterStrings={'cs':'Jazyk této internetové stránky nebyl automaticky rozpoznán. Určete prosím její jazyk:','da':'Denne websides sprog kunne ikke bestemmes. Angiv venligst sprog:','de':'Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben:','en':'The language of this website could not be determined automatically. Please indicate the main language:','es':'El idioma del sitio no pudo determinarse autom%E1ticamente. Por favor, indique el idioma principal:','fi':'Sivun kielt%E4 ei tunnistettu automaattisesti. M%E4%E4rit%E4 sivun p%E4%E4kieli:','fr':'La langue de ce site n%u2019a pas pu %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue, s.v.p.%A0:','hu':'A weboldal nyelvét nem sikerült automatikusan megállapítani. Kérem adja meg a nyelvet:','hy':'Չհաջողվեց հայտնաբերել այս կայքի լեզուն։ Խնդրում ենք նշեք հիմնական լեզուն՝','it':'Lingua del sito sconosciuta. Indicare una lingua, per favore:','lt':'Nepavyko automatiškai nustatyti šios svetainės kalbos. Prašome įvesti kalbą:','ml':'ഈ വെ%u0D2C%u0D4D%u200Cസൈറ്റിന്റെ ഭാഷ കണ്ടുപിടിയ്ക്കാ%u0D28%u0D4D%u200D കഴിഞ്ഞില്ല. ഭാഷ ഏതാണെന്നു തിരഞ്ഞെടുക്കുക:','nl':'De taal van deze website kan niet automatisch worden bepaald. Geef de hoofdtaal op:','pt':'A língua deste site não pôde ser determinada automaticamente. Por favor indique a língua principal:','ru':'Язык этого сайта не может быть определен автоматически. Пожалуйста укажите язык:','sv':'Spr%E5ket p%E5 den h%E4r webbplatsen kunde inte avg%F6ras automatiskt. V%E4nligen ange:','tr':'Bu web sitesinin dilini otomatik olarak tespit edilememiştir. Lütfen ana dili gösterir:','uk':'Мова цього веб-сайту не може бути визначена автоматично. Будь ласка, вкажіть головну мову:'},basePath=(function(){var s=document.getElementsByTagName('script'),i=0,p,src,t;while(!!(t=s[i++])){if(!t.src){continue;}src=t.src;p=src.indexOf('Hyphenator.js');if(p!==-1){return src.substring(0,p);}}return'http://hyphenator.googlecode.com/svn/trunk/';}()),isLocal=(function(){var re=false;if(window.location.href.indexOf(basePath)!==-1){re=true;}return re;}()),documentLoaded=false,dontHyphenate={'script':true,'code':true,'pre':true,'img':true,'br':true,'samp':true,'kbd':true,'var':true,'abbr':true,'acronym':true,'sub':true,'sup':true,'button':true,'option':true,'label':true,'textarea':true},enableCache=true,enableReducedPatternSet=false,enableRemoteLoading=true,displayToggleBox=false,hyphenateClass='hyphenate',dontHyphenateClass='donthyphenate',min=6,isBookmarklet=(function(){var loc=null,re=false,jsArray=document.getElementsByTagName('script'),i,l;for(i=0,l=jsArray.length;i0){Expando.appendDataForElem(elements[elements.length-1],{isLast:true});}},convertPatterns=function(lang){var plen,anfang,pats,pat,key,tmp={};pats=Hyphenator.languages[lang].patterns;for(plen in pats){if(pats.hasOwnProperty(plen)){plen=parseInt(plen,10);anfang=0;while(!!(pat=pats[plen].substr(anfang,plen))){key=pat.replace(/\d/g,'');tmp[key]=pat;anfang+=plen;}}}Hyphenator.languages[lang].patterns=tmp;Hyphenator.languages[lang].patternsConverted=true;},convertExceptionsToObject=function(exc){var w=exc.split(', '),r={},i,l,key;for(i=0,l=w.length;i=min){n.data=n.data.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}}}if(hyphenatorSettings.isHidden&&intermediateState==='hidden'){el.style.visibility='visible';if(!hyphenatorSettings.hasOwnStyle){el.setAttribute('style','');el.removeAttribute('style');}else{if(el.style.removeProperty){el.style.removeProperty('visibility');}else if(el.style.removeAttribute){el.style.removeAttribute('visibility');}}}if(hyphenatorSettings.isLast){state=3;onHyphenationDone();}},removeHyphenationFromElement=function(el){var h,i=0,n;switch(hyphen){case'|':h='\\|';break;case'+':h='\\+';break;case'*':h='\\*';break;default:h=hyphen;}while(!!(n=el.childNodes[i++])){if(n.nodeType===3){n.data=n.data.replace(new RegExp(h,'g'),'');n.data=n.data.replace(new RegExp(zeroWidthSpace,'g'),'');}else if(n.nodeType===1){removeHyphenationFromElement(n);}}},hyphenateDocument=function(){function bind(fun,arg){return function(){return fun(arg);};}var i=0,el;while(!!(el=elements[i++])){window.setTimeout(bind(hyphenateElement,el),0);}},removeHyphenationFromDocument=function(){var i=0,el;while(!!(el=elements[i++])){removeHyphenationFromElement(el);}state=4;};return{version:'2.5.0',languages:{},config:function(obj){var assert=function(name,type){if(typeof obj[name]===type){return true;}else{onError(new Error('Config onError: '+name+' must be of type '+type));return false;}},key;for(key in obj){if(obj.hasOwnProperty(key)){switch(key){case'classname':if(assert('classname','string')){hyphenateClass=obj.classname;}break;case'donthyphenateclassname':if(assert('donthyphenateclassname','string')){dontHyphenateClass=obj.donthyphenateclassname;}break;case'minwordlength':if(assert('minwordlength','number')){min=obj.minwordlength;}break;case'hyphenchar':if(assert('hyphenchar','string')){if(obj.hyphenchar==='­'){obj.hyphenchar=String.fromCharCode(173);}hyphen=obj.hyphenchar;}break;case'urlhyphenchar':if(obj.hasOwnProperty('urlhyphenchar')){if(assert('urlhyphenchar','string')){urlhyphen=obj.urlhyphenchar;}}break;case'togglebox':if(assert('togglebox','function')){toggleBox=obj.togglebox;}break;case'displaytogglebox':if(assert('displaytogglebox','boolean')){displayToggleBox=obj.displaytogglebox;}break;case'remoteloading':if(assert('remoteloading','boolean')){enableRemoteLoading=obj.remoteloading;}break;case'enablecache':if(assert('enablecache','boolean')){enableCache=obj.enablecache;}break;case'enablereducedpatternset':if(assert('enablereducedpatternset','boolean')){enableReducedPatternSet=obj.enablereducedpatternset;}break;case'onhyphenationdonecallback':if(assert('onhyphenationdonecallback','function')){onHyphenationDone=obj.onhyphenationdonecallback;}break;case'onerrorhandler':if(assert('onerrorhandler','function')){onError=obj.onerrorhandler;}break;case'intermediatestate':if(assert('intermediatestate','string')){intermediateState=obj.intermediatestate;}break;case'selectorfunction':if(assert('selectorfunction','function')){selectorFunction=obj.selectorfunction;}break;default:onError(new Error('Hyphenator.config: property '+key+' not known.'));}}}},run:function(){var process=function(){try{autoSetMainLanguage();gatherDocumentInfos();prepare(hyphenateDocument);if(displayToggleBox){toggleBox(true);}}catch(e){onError(e);}};if(!documentLoaded){runOnContentLoaded(window,process);}if(Hyphenator.isBookmarklet()||documentLoaded){process();}},addExceptions:function(lang,words){if(lang===''){lang='global';}if(exceptions.hasOwnProperty[lang]){exceptions[lang]+=", "+words;}else{exceptions[lang]=words;}},hyphenate:function(target,lang){var hyphenate,n,i;if(Hyphenator.languages.hasOwnProperty(lang)){if(!Hyphenator.languages[lang].prepared){prepareLanguagesObj(lang);}hyphenate=function(word){if(urlOrMailRE.test(word)){return hyphenateURL(word);}else{return hyphenateWord(lang,word);}};if(typeof target==='string'||target.constructor===String){return target.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}else if(typeof target==='object'){i=0;while(!!(n=target.childNodes[i++])){if(n.nodeType===3&&n.data.length>=min){n.data=n.data.replace(Hyphenator.languages[lang].genRegExp,hyphenate);}else if(n.nodeType===1){if(n.lang!==''){lang=n.lang;}Hyphenator.hyphenate(n,lang);}}}}else{onError(new Error('Language "'+lang+'" is not loaded.'));}},getRedPatternSet:function(lang){return Hyphenator.languages[lang].redPatSet;},isBookmarklet:function(){return isBookmarklet;},toggleHyphenation:function(){switch(state){case 3:removeHyphenationFromDocument();toggleBox(false);break;case 4:hyphenateDocument();toggleBox(true);break;}}};}());if(Hyphenator.isBookmarklet()){Hyphenator.config({displaytogglebox:true,intermediatestate:'visible'});Hyphenator.run();}Hyphenator.languages.en={leftmin:2,rightmin:2,shortestPattern:2,longestPattern:8,specialChars:'',patterns:{3:'a2da2fai2a1ja2n4ao2bfb1jbk44bp2btb1v1cac3c2ch1cick1c5n1coc1q1cyd1bd5cd1jd1m1dod1p1dr1dud1vd1wd2ye1fei2e1je1q4eu1fa4fd4fh1fi4fm4fn1fo2ft3fu1fy1gag3bgd4gl2g1m1gog3p1grgs2g3w1gyh1bh1fh1h4hkh1w2id2igi3hi3j4ik2io2ip4iri1u2iv4iy5ja1jek1bk3fkh4k1ikk4k1lk1mk5tk1w2ld2lf4ljl1l2lm2lp4lt1ly1ma2mh4mkm1m1mo4mt1mu4mw1nan3fn1jn5mn1qn1rn1t4nz4oaoi2o5j2oko2noo2o1qou21papd44pf4pgpr2p3wqu2r1br1cr1frg2rh4r3jr1lr1mr1pr1wsa2s2hsk21sos1r2ss1su4svsw2s4y1ta4tc2tl1to1tu4tvtw41ty4tzu5j4uk2usu3u1vav4yw1bwi2w4kw5p4wtwy4x1ax1ex1hx3ix3ox3px1uxx4y1by1cy1dy1iy1wza14zb2ze5zl4zm1zo',4:'_ch4_ci2_eb4_eg2_es3_eu3_ga2_ge2_he2_in1_le2_me2_od2_os3_sh2_si2_st4_sy2_ta4_te4_th2_ti2_up3_ye44ab_abe24abr2adi4aduae4raff4ag1iag1na2goa4gya3haa3heah4la3hoa5ia2aleal1i4alm4amaa2mo4and2angano4a2pla3pu2a2rar1iar2par3q4as_as4la2ta4atha1tra2tua2tyau4bau3ra2vaav1iaw3iaws4aye4ays45ba_1batba4z2b1bb2be4b1d4be_1bel3betbe3w4b3hbi2bbi4d3bie1bilbi2tb2l2b4lo4b1m4b3n3bodbo4e3boobt4lb4tob3trbu4n4b5w5by_bys42ce_3cei1cen3cepcet4cew44ch_che23ciaci5c4cii2cim2cin5cizck3icly4coe22cogcoi4cov1cri22c1tc2tec4twcud5c4ufc4ui3cun1cuscze41d2a5da_4daf2dag3dat5dayd1d42de_d4em1dende1pd3eqdes2de1tde1v4dey4d1fd4gadg1id2gyd1h25di_3didd1ifd1in1diodir2dis1d5k22dly3do_5doed4ogd4or3dosdo4v3doxdre44dryds4pd4swd4syd2thdu2cdu4gdu4n4dup5dynead1ea4lea2tea2v2e1be3bre1ceec2ie1cre1cu4edi4edoee2cee2fee2me5ex1effeg5n5egye1h4e5icei5deig2e1lael2fel2iem5be1mee3my4enn4enoe5ofeo2ge3ole1oreos4e4ote5owe2pae1poer1a2erber1her1i2eroer1s4erues2c4eshe1sie1sp2esses4w4etnet5ze5une3upeus4e1vie5vue1wae3wh1exp5eyceys44fag5far4f5b4fe_fe4b2fedfer1fev44f1ff2fyfi3a2finf4l25fonfo2rfos54f5pfri22f3sf4tof2ty4fuggaf42gam4gaz2ge_2ged1gen1geoge4vg2geggo45gi_g1icgil45gio3girgi4u5giv3gizgla41gle3glog4mygn4ag1nig1no3go_gob55goegon25googov1g4rogth3gu4a2gue3gun3gusha4m5hazh4edhe2nhep5h1eshe4theu4hi4phi2vh2lo4h1m2h1nho4g4h5p4hr4h4shh4tyhu4ghu4thy2s2i1ai2aliam4i2anibe4i1bli5boi1br4ich2iciid5di2dii4dri2du2ie4i3et4if_i3fl4ift4igii2goi1lail5fil1i4ilnil3vim1ii2mu2in_4ind2ine2ini4ink4inl2inn2insin1u4iny4io_i1olio4mi4osipe4ip3ii1rair1i2is_4ise3isfi2sois1pi2su2ite2ithi1ti4itt4i5wix4oizi4ja4pjew3jo4p3ka_k3abk5agkal4k2ed1keeke4gk1erkes45ki_k4imki4pkis44klyko5rk3ouk4scks4lk4sy4lav2l1blce4l3cil2deldi4l3drle2ales23leyl5frl5galgo32l3h3likl1itl1izlka3l2lell2ill4o3lo_4lof4lovl4pll5pr4l1rl4scl2sel1tel1trltu2lu5aluf4lu3o4lup1lut2l1w4lya4lyb2mab2mah4map4m1b4m5c4me_2medme2gme2m1men2mesme4v4m1f5mi_mi3amig4m2ism2iz4m1l4m1nmn4amn4o4mokmo2rmos2mo2v4m1pm2pim2py4m3rm4shm5si3mummun24mupmu4unak4n2ann4asn2atn2aun1crn1cun1de2ne_ne2bne2c2ned1nen3neone2qn1er1nesne4vne4wn1gun2gynha4nhe4ni4dnik4n1imn1inni4on2it4nk2n1kl4n1lnme4nne43noe4nogno4n4nop1noun1p4npi4nru4ns4cn2sen2slns3mnt2int4snu1anu4dn4umn3uon1v2n1w4nym4nyp4n3zaoad3o1bio3bro1ceoch4o4elo3ero3evo2fio1geo4gl1ogyo1h2oig4o1laol2dol2iol2tol2vo2lyo2meon1aon1c2ondon3soo4ko2pa2opho1prop1uopy5o1rao1ryos2cos4lo2so4othou4lou5vow1io4wooy1ap4adp4aip4alpa1ppav43pay4p1b4pe_pe2cp4eepek4pe2t4ph_ph2l4phsph3t5phu1phypi3ap4idpi2n4p1m2p3npo4cpo4p1posp4ot4p1pp2pep2seps4h2p1tp2tep2thp4twpub3pue4puf4pu4mpu2n5puspu2t2rabr2air2asrbi2rb4or2cerd2i2re_re1oreu2rev2rfu4r4fyr1glr3gu4rh_ri3ar4ibri1or4iqr2isrle4r2mer4myrno4r3nur2ocro4erok2rox5r3por1r44rs2r1sars4cr2ser1shr1sir1spr5swr1tiru3aru2nrv4er3vory4cry3t5sais1apsau45saw4s5bsch2s1cu4s5d4se_se4ase2g5sei5sev5sex4s3f2s3g2sh_sho44shwsi1b1siosi2r1sis5siu1siv5siz4skes1l2s2le2s1ms3mas1n43soms4op4sov2spas1sas1sis4sls4snss2tss5w2st_st2ist4rs2tys4ulsu2msu2nsu2r4swo4syc3syl3ta_2tabta2ltav42taw2t1bt4ch4t1d4te_1teeteg41teote4p3teu3tex4tey2t1f4t1g2th_th2e4thl2ths1tiatif22tig1tim1tio5tiqti4u1tiv1tizt5lat5lo4t1mtme4to3b2toftos24t1p1trat4sctsh4t4swt5tottu4tu1atud24tue3tum3tus4two4tya2tyltz4e4uabuac4u1atuav4ub4eu3cau3cru3cuu4cyud5du4du3ufau3fl2ui2ui4nuiv3u1laul4eul2i4ulsu3luul5vu1mium2pu2neu1niunu4un5yun5zu5osu1ouu1peu3plup3pu1raurc4ur1dur2lu3ruusc2us1pu2suuts4uu4mu1v2uxu3uz4e5va_vag43vat4ve_4vedveg3v3ifvik42vilv1invi4p3viv5vo_voi43vok4vv42wacwam4w1erw3evwhi4wil2wir4wiz5w4no1wo2wom1wra4wri4w3shws4lxam3x4apxas5x3c2x2edxhi2xhu4xi5axi5cx4obx1t2x3tixu3ay5acy5aty2cey3chy5eey1eryes4ye4ty5gi4y3hy3lay3loy5luyme4yn5dyn5g5ynxy1o4yo5dyom4y4osyp3iy3poy5puy3royr4rys4cy4soyss4ys1tzar2ze4nze4pz1erzet42z1iz4ilz4iszo4mzte4z4zy',5:'_ach4_af1t_al3t_an5c_ang4_ant4_ar5s_as3c_as1p_as1s_au1d_av4i_awn4_ba4g_ber4_bri2_ca4t_co3e_co4r_de3o_do4t_du4c_eer4_el5d_en3g_en3s_eye5_fes3_gi5a_gi4b_go4r_hes3_het3_hi3b_hov5_id4l_im3m_ine2_in2k_in3s_ir5r_is4i_ju3r_la4m_len4_lep5_lev1_li4g_li2n_li3o_li4t_mis1_ni4c_odd5_or3c_or1d_or3t_oth3_out3_pi4e_pi2t_ra4c_ree2_res2_ri4g_ro4q_ru4d_se2n_til4_to4p_un1a_un1e_un5k_un5o_un3u_ure3_us5aa5bala5banabi5aab3ula4carac1er4a2cia3cieac1ina3cioac3ulac4uma3diaa3dioa3dita5diuad4lead3owad4sua3ducad5uma4gabaga4nage4o4ageu4ag4l3agogag5ula3ic_ai5lya4i4nain5oak1enal5abal3ada4lar4aldiali4ea4ly_4alys5alyt3alyzam5abam3agam3icam5ifam1ina5mona3naran1dla5neea3nena3neuan1glan3ioa3nipan3ita3niuan5otan2saan4snan2span4st4antoan2tran4twan3uaan3ula5nurapar4ap5at4aphiap3inapoc5aque5ar3alara3par4ata5rauaraw4ar4dra3reear4fiar4flar4imar3ioar2izar2mia3rooarre4ar4saar2shas4abashi4a3siba3sicask3ia4socas5phas4shas1trat5acat5apate5cat5evat4ho4ati_a5tiaat1icat3ifa4toga2toma4topa4tosat4skat5teat4that5uaat5ueat3ulaugh3au3guau4l2aun5dau1thav3aga5vanav3igav5oca1vor3awayaw4lyax4icax4iday5alazz5iba4gebal1aban4eban3ib3berbeak4beat34be2dbe3dabe3debe3dibe3gibe5gube1libe3lo4be5mbe5nu4bes4be3spbe5trbe3twbe5yobi5enbi4er2b3ifbin4dbi5oubi3trb5itzb4le_blen4b3lisbne5gbod3ibon4a5bor_bor5d5bore5bori5bos4b5otaboth5bo4to4brit2b5s2bsor4bu4gabu3libumi4bu3re5bust4butab5utoca1blcach44cag42c5ah4calocan5dcan4ecany44casyca4thccha5cci4accon44ced_5cel_3cell3cenc4ceni3cent4cesaces5t4ched5chio3chitchi2z3cho2ch4ticia5r4cierci4la3cilic4inac1ing5cinocion44cipeci3ph2c1it1c4l44clarcle4m4clicclim4co5agco4grcol5i5colocon4ac4onecon3gcon5tco3paco4pl4corbcos4ecove4cow5acoz5eco5zi5credcre4vcri5fc4rincris4cru4d4c3s2cta4bc3terctu4r5culicu2mac3umecu4micu3picu5py3c4ut4cutrdach4da2m2dan3gdard5dark54dary4dato5dav4dav5edeaf52d1ed4dee_de5ifde5lo5dem_de3node3nude3padepi4de2pud4erh5dermder5sd2es_de1scde4sude2todia5bd4ice3dictdi3ge1dina5dinidio5gdi4pldi1re5disid2iti1di1v4d5la3dle_3dled2d3lo4d5lu4d1n4do5de2d5ofdo4ladoli4doni4doo3ddop4p4drai5drendri4bdril4dro4p4drow2d1s2d1u1ad1ucadu5eld3uledu4pedy4sedys5pe1a4be3actea4gee5andear3aear4cear5kear2tea5spe3asseast3eav5ieav5oe4bene4bite4cadecca5e4cibec3imeci4te2cole2corec4tee4cul2e2da4ed3dede4se3diaed3ibed3imed1itedi5ze4doledon2e4drie4duleed3ieel3iee4lyee4naee4p1ee2s4eest4ee4tye4ficefil43efit4egaleger4eg5ibeg4ice4go_e4goseg1ule5gureher4ei5gle3imbe3infe1ingeir4deit3eei3the5itye4judeki4nek4lae4la_e4lace4lawe3lea5elece4lede5lene1lese5lime3lioe2lis4ellaello4e5locel5ogel2shel4tae5ludel5uge4mace4mage5mane2mele4metemi4ee4misem3izemo4gem3pie4mulemu3ne5neae5neeen3eme3newe5niee5nile3nioen3ite5niu5enizeno4ge4nosen3oven4swen3uaen5ufe3ny_4en3ze4oi4eo3reeo4toe5oute3paie5pelephe4e4plie3proep4she4putera4ber3arer4bler3ch2ere_ere4qeret4e1rio4eriter4iueri4ver3m4er3noer5obe5rocero4rer1ou4ertler3tweru4te1s4ae2scae3scres5cue1s2ee2sece3shae2sice2sidesi4ues4mie2sole2son2estre2sureta4be3teoet1icetin4e5tire3trae3treet3uaet5ymeu3roeute4eu5tre2vase5veaev1erev3idevi4le4vinevi4ve5voce4wage5weeewil5e3wit5eye_fa3blfab3rfa4cefain4fa3ta4fatofeas44feca5fectfe3life4mofen2d5ferrf4fesf4fief4flyfic4i4ficsfi3cufil5i4fily5finafi2nefin4nflin4f2ly5fon4tfor4ifra4tf5reafril4frol5fu5elfu5nefu3rifusi4fus4s4futa5gal_3galiga3log5amo4ganogass4gath3geez44gely4geno4genyge3omg4ery5gesigeth54getoge4ty4g1g2g3gergglu5gh3ingh4to1gi4agia5rg4icogien5gir4lg3isl5glasgli4bg3ligglo3rg4na_g2ning4niog4nongo3isgo3ni5gos_g4raigran24graygre4n4gritgruf4g5ste4gu4tgy5rahach4hae4mhae4th5aguha3lahan4ghan4khap3lhap5thar2dhas5shaun4haz3a1head3hearh5elohem4phena4heo5rh4erah3ernh3eryhi5anhi4cohigh5h4il2h4inahir4lhi3rohir4phir4rhis4s4h1l4hlan4hmet4h5odshoge4ho4mahome3hon4aho5ny3hoodhoon4ho5ruhos4ehos1p1houshree54h1s2h4tarht1enht5eshun4thy3pehy3ph4iancian3iia5peiass4i4atuib5iaib3inib3lii5bun4icam5icap4icaricas5i4cayiccu44iceoi5cidi2cipi4cly4i1cr5icrai4cryic4teictu2ic4umic5uoi3curi4daiide4si5dieid3ioid1itid5iui3dlei4domid3owid5uoied4eield3ien4ei5enni1er_i3esci1estif4fri3fieiga5bi3gibig3ilig3inig3iti4g4lig3orig5oti5greigu5iig1ur4i5i4i3legil1erilev4il3iail2ibil3io2ilitil2izil3oqil4tyil5uri4mag4imet4imitim4nii3mon4inavi3nee4inga4inge4ingi4ingo4ingui5ni_i4niain3ioin1is2i1noino4si4notin3se2int_i5nusioge4io2grion3iio5phior3iio5thi5otiio4toi4ourip4icip3uli3quaira4bi4racird5ei4refi4resir5giir4isiro4gir5ulis5agis3arisas52is1cis3chis3eris3ibisi4di5sis4is4k4ismsis2piis4py4is1sis1teis1tiis5us4ita_i4tagi3tani3tatit4es4itiait3igi2tim2itio4itis4itonit5ryi5tudit3ul4itz_iv5ioiv1it4izarjac4qjer5s5judgkais4ke5like4ty5k2ick4illkilo5k4in_kin4gk5ish4kleyk5nes1k2nokosh4kro5n4k1s2l4abolaci4l4adela3dylag4nlam3o3landlar4glar3ilas4elbin44l1c2ld5isl4drile4bileft55leg_5legg4len_3lenc1lentle3phle4prler4e3lergl4ero5lesq3lessl3eva4leye4l1g4lgar3l4gesli4agli2amli4asli5bi4licsl4icul3icyl3ida3lidil4iffli4fl3lighlim3ili4mol4inalin3ili5og4l4iqlis4pl2it_l3kallka4tl4lawl5leal3lecl3legl3lell5lowl5metl4modlmon42l1n2lo4cil5ogo3logu5longlon4ilood5lop3il3opmlora45los_los4tlo4ta2loutlpa5bl3phal5phil3pit2l1s2l4sielt5aglten4lth3iltis4lu3brluch4lu3cilu3enlu5idlu4ma5lumiluo3rluss4l5venly5mely3no2lys4l5ysema2cama4cl5magnmaid54maldmar3vmas4emas1t5matemath3m5bilmbi4v4med_mel4tmen4a4menemen4imens43mentme5onme4tame1tem4etrmid4amid4gm4illmin4a3mindmin4tm4inumiot4mis5l4mithm4nin4mocrmo2d1mo4gomois2mo3memo3spmoth3m5ouf3mousm3petmpi4am5pirmp5ismpov5mp4tr4m1s25multn4abu4nac_na4can5actna4li4naltnank4nar3c4narenar3inar4ln5armnas4c3nautnav4e4n1b4ncar5n3chanc1innc4itn4dain5danndi4bn1ditn3dizn5ducndu4rnd2wen3earneb3u5neck5negene4lane5mine4mo4nenene4pon2erener4r2nes_4nesp2nest4neswn5even4gabn3gelng5han3gibng1inn5gitn4glangov4ng5shn4gum4n1h4nhab33n4iani3anni4apni3bani4blni5dini4erni2fin5igrnin4g5nis_n4ithni3trn3ketnk3innmet44n1n2nni4vnob4ln5oclnoge4no4mono3mynon5i4noscnos4enos5tno5ta3nounnowl32n1s2ns5abnsid1nsig4n4socns4pen5spinta4bn5tibnti2fnti4pnu5enn3uinnu1men5umi3nu4nnu3troard3oas4eoat5io5barobe4lo2binob3ulocif3o4cilo4codocre3od3icodi3oo2do4odor3o5engoe4tao5geoo4gero3gieog3ito4groogu5i2ogynohab5oiff4o3ingo5ismo3kenok5ieo4lanold1eol3ero3letol4fio3liao5lilo5lioo5livolo4rol5plol3ubol3uno5lusom5ahoma5lom2beom4blo4meto3miao5midom1ino4monom3pion4aco3nanon5doo3nenon4guon1ico3nioon1iso5niuonsu4on5umonva5ood5eood5ioop3io3ordoost5ope5dop1ero3pito5pono5ra_ore5aor3eiorew4or4guo5rilor1ino1rioo3riuor2miorn2eo5rofor5pe3orrhor4seorst4or4tyo5rumos3alos4ceo5scrosi4uos4paos4poos2tao4tano4teso3tifo3tisoto5sou3blou5etoun2dov4eno3visow3elown5ipa4capa4cepac4tpain4pan4apa3nypa4pu3parepa2te3pe4a2p2ed3pede3pedipee4dpe4lap4encpe5onp4erip4ernper3ope5ruper1vph4erph1ic5phie3phiz3phobpho4rpian4pi4cyp5idapi3de5pidi3piecpi3enpi3lop4in_pind4p4ino3pi1opion4p3ithpi2tu2p3k21p2l23planpli3a4pligpli4nploi4plu4m5pod_po5em5po4gpoin2po4ni1p4orpo4rypos1spo4ta5pounp4pedp5pelp3penp3perp3petpre3rpre3vpri4spro3lpro1t2p1s2p4sibpti3mptu4rpul3cpur4r5putepu3trqua5v2que_3quer3quetra3bir5aclraf4tra4lor2amir4anira5norar5crare4rau4tr4babr4bagrbi4fr2binrcen4r3charc4itrcum3r4dalrdi4ardin4re1alre3an5reavre4aw2r2edre1dere2fere3fire4fyre5itre1lire5lure1pur1er4r4erirero4re5rur4es_res2tre4whrg3err3getr3gicrgi4nr5gisr5gitrgo4n4rhalria4bri4agrib3ar4ice4ricir4icori1erri5et5rigirim5i3rimor2inarin4drin4erin4g5riphri2plr4is_ris4cr3ishris4pri2turiv3ir3ketrk4ler2ledr4ligr4lisr3lo4rma5cr3menr4mior3mitr4narr3nelr4nerr5netr3neyr5nicr3nitr3nivr4nourob3lro3crro1ferom4irom4pron4e1room5rootror3iro5roros4sro4tyro4var4pear3petrp4h4rre4crre4fr4reorri4orri4vrron4rros4rrys4r3secrs3esr5sharson3r4tagr3tebrte5ort5ibrti4dr3tigr4tivr3trirt4shru3enru4glru3inrunk5r5uscr3venr3veyr3vicrvi4v2s1ab5sacks3actsal4msa5losal4t3sancsa5tasat3usca4pscav5s4ced4sceis4cess4choscle5s4cliscof4seas4sea5w3sect4s4eds5edlseg3rse1le5self5selv4seme4sencsen4dsen5gs4erlser4os1e4sse5shses5tsew4ish1er5shevsh1insh3io3shipshiv5shon3shor4s5icc5sidisil4e4sily2s1ins2inas3ing5sionsir5as3kets3latsman3smel4s5menso4cesoft35solvsona4son4gsor5csor5dso5vi5spaispa4n2spers2phespho5spil44spios4plys4ponspor44spotssas3s2s5cs3sels5sets4siess4lis2tags2tals4tedste2ws3thes4ti_s5tias1tics4ties3tif5stirs1tles4top4stry4st3wsu1alsu4b3su2g3su5issuit3sum3isyn5o4tacita5do4taf4ta5latal3i4talkta5mota5pltar4a4tarc4taretas4eta5sytaun44teattece45tect2t1edte5dite5gi3tel_teli45tels3tenc3tend1tentte5peter3c1teriter5v4tes_4tessthan44thea3thet4thil4thooti4ab2ti2b4tickt4ico5tidi3tienti5fy5tigu4timp2t1int2ina3tiniti5octi3sa3tisetis4mti5sotis4pti3tltiv4ati3zatlan43tle_3tled2t1n24todoto2grto5icto2matom4bto3my4tono4tonyto2ra5tour4touttra3btras4tre5ftre4m5tria2trimtri4vtro3vtru5itrus44t1s24t3t2t4testu3artu4bi4tuf45tu3i3ture5turitur5otu5ry4t1watwis4type3ty5phua5nauan4iuar2duar3iuar3tu4belu3beru1b4iuci4buc4itucle3ud3erudev4u1dicud5isu5ditu4donud4siu4eneuens4ug5inu1inguir4muita4ula5bulch4u1lenul4giu5lia4ul3mu1l4oul1ti4ultuul5ulum5abum4biunat4un4erun4imu2ninuni3vun3s4un4swu4orsu5piauptu44ura_u4ragu4rasur4beur4fru3rifur1inu3riou1ritur3izur4nouros4ur4peur4piurti4u5sadu5sanus4apus3ciuse5au5siau3sicus5slus1trusur4uta4bu3tat4ute_4utel4utenu4tisu4t1lut5ofuto5gu5tonu4touvac3uva4geval5oval1uva5mova5piv3el_ve4lov4elyv4erdv4e2s4ves_ve4teve4ty5vian5vidivi5gnv2incvin5d4vingvio3lvi1ouvi5rovi3sovi3su4vitivit3r4vityvo4lav5ole5volt3volvvom5ivori4vo4ryvo4taw5ablwag5owait5w5al_war4twas4twa1tewed4nweet3wee5vwel4lwest3win4g3wisewith3wl4eswl3inws4pew5s4txac5ex4agoxer4ixe5roxhil5xi5dix4imexpe3d3yar4yc5erych4eycom4ycot4y4erfympa3yn5icy4o5gy4onsy4pedyper5y4pocyp2tayra5myr5iay3s2eys3io3ysisys3taysur4yt3icz5a2bze3rozo5ol4z1z2',6:'_am5at_ani5m_an3te_ar4ty_atom5_ba5na_bas4e_be5ra_be3sm_can5c_ce4la_cit5r_de3ra_de3ri_des4c_dumb5_eas3i_el3em_enam3_er4ri_ge5og_han5k_hi3er_hon3o_idol3_in3ci_la4cy_lath5_leg5e_lig5a_mal5o_man5a_mer3c_mon3e_mo3ro_mu5ta_of5te_os4tl_pe5te_pio5n_pre3m_ran4t_rit5u_ros5t_row5d_sci3e_self5_sell5_sing4_ting4_tin5k_ton4a_top5i_tou5s_un3ce_ve5ra_wil5iab5erdab5latab5rogac5ardac5aroa5ceoua5chetac5robact5ifad4dinad5er_ad3icaadi4erad5ranaeri4eag5ellag3onia5guerain5inait5enal3enda5le5oal4ia_al5lev4allica5log_ama5raam5ascam5eraam5ilyami4noamor5iamp5enan3age3analyan3arcanar4ia3natiande4san3disan4dowang5iea4n1ica3niesan3i3fan4imea5nimia5ninean3ishan4kli5annizanoth5an4scoans3poan4surantal4an4tieap5eroa3pherap3itaa3pituap5olaapor5iapos3taps5esar3acta5radearan4gar5av4arbal4ar5easar3enta5ressar5ialar3iana3rietar5o5da5ronias3anta5sia_as3tenasur5aat3ablat3aloat5echat3egoat3en_at3eraater5nat3estath5ema5thenath5omat5i5bat3ituat5ropat4tagat3uraau5sibaut5enave4noav3eraav5ernav5eryavi4erazi4erbarbi5bari4abas4sibbi4nabe5nigbe5strbet5izbi3lizbi5netbi3ogrblath55blespblun4tbol3icbom4bibon5at4b1orabound3broth3bunt4ibus5iebuss4e3butiocab3inca5denca3latcal4lacan4iccan5iscan3izcan4tyca5percar5om4cativcav5alccou3t4ceden2cen4ece5ram3cessic5e4ta4ch3abcheap3che5lo3chemich5enech3er_ch3ers4ch1in5chinici2a5b3cinatcin3emc5ing_4cipic4cista4cisticit3iz5clareco3inccol3orcom5ercop3iccoro3ncras5t5crat_cre3at5criticro4plcrop5ocros4ect5angc5tantc4ticuctim3icu5ity3cultucu5riacuss4icu4tie2d3a4b4dativdeb5itde4bondecan4de4cilde5comdeli4e3demicde5mildemor5de4narde2s5odes3tide3strdev3ild3ge4t1d4i3adi4cam5di3en3dine_di5nizdirt5id4is3t3dles_4dlessdo5lordom5izdo3nat4d5outdrea5rduc5er4duct_4ductsdum4beead5ieea5gereal5ereal3oueam3erear5esear4icear4ileart3eeat5eneath3ie5atife4a3tueav3ene4bel_e4belsecan5cec5ifye5citee4clame4cluse4comme4concec3oraeco5roe4cremec4tanec3ulae4d1ered3icaed5ulo5eficie3fineeg5inge5git5e5instej5udielan4delaxa4el3egae4l1ere3libeel3icae3lierel5ishe3liv3el4label3op_em5anaem3icaem1in2em5ineem5ishe5miss5emnizem5ulaen5amoe4nanten3dicen5eroen5esien5esten3etren5icsen3isheop3areo5rolep5ance3pente4prece4predep3rehe4probep5utaequi3l4erander4chee3realere5coere3iner5el_er3emoer5ena4ereneer3enter5esser3este1ria45ericke3rieneri4erer3inee4rivaer4nis4ernit5ernizer3setert3er5erwaues5canes5ecres5encesh5ene2s5imes4i4ne5skines3olues5onaes3peres4preestan4es3tiges5tim4es2toe3stone5stroes5urreten4dethod3e5tideeti4noet5onaet3ricet5rifet3roget5roseuti5leva2p5ev5astev3ellevel3oe5vengeven4ie5verbew3ingfall5e4fa4mafam5isfar5thfa3thefault5feath3fend5ef5fin_f2f5is2f3ic_f3icanf3icenfi3cer5ficia5ficiefi5delfight5fin2d5f1in3gfis4tif5lessflo3refon4defo5ratfor5ayfore5tfort5afres5cfu4minga5metgan5isga3nizgar5n44gativgel4inge5lisge5lizge4natge5nizgh5out5gicia5gies_g3imen3g4in_gin5ge5g4insglad5ignet4t3g4o4ggondo5go5rizgor5ou4grada3guard5gui5t2g5y3nh3ab4lhala3mhan4cihan4cy5hand_hang5ohan4teha3ranha5rashard3ehar4lehe4canh5ecathe5do5he3l4ihel4lyhen5athera3pher4bahere5ah5erouhe2s5phet4edhimer4hion4ehis3elhlo3rih5odizhol5ar3hol4ehor5atho5rishort3eho5senhouse3hov5elhro3pohu4minhun5kehus3t4h4wart4ian4ti4ativib3eraib5ertib5it_ib5itei2b5rii4car_i4caraic5inaic3ipai2c5ocic3ulaid5ancide3alid5ianidi4aridi5ou5ie5gaien5a4i3entiif5eroiff5en4ific_ig3eraight3iil3a4bi4ladei2l5amila5rail4istill5abim3ageima5ryim5idaimi5lei5miniim3ulai4n3auincel4in3ceri5nessin5genin3ityi4no4c2in4thion3atip4re4iq5uefiq3uidire4dei4rel4iri5deiri3tuir4min5iron_is5hanis3honish5opislan4is4salissen4is4sesis4ta_ist4lyita4bi4ita5mit3erai5teri4i2ticit3icait5illi4tismi4tramit3uativ3elliv3en_iv5il_i5vorei4v3ot5izont4jestyk3en4dk3est_kin4delab3iclan4dllan5etlan4tela5tan4lativla4v4ald4ereld4erile4mat5lene_lera5b3l4erile5sco5less_li4ato5licioli4cor4lict_lid5erlif3erli4gra4l4i4llim4bll4im4p1l4inelin3ealiv3erl3le4nl3le4tl2lin4l5linall5outlm3inglob5al3logiclom3er5lope_lo5rielor5oulos5etloun5dlp5ingltane5ltera4ltur3al5umn_lus3tel5vet4mag5inma3ligma5linmal4limal4ty5maniaman5isman3izma5rizmar4lyma5scema3tismba4t55mediame3diem5e5dymel5onmem1o3men5acmen4demensu5men4tem5ersa3mestimet3alme5thime3try3miliam5ineem4inglmis4timma5rymoi5semon5etmon5gemoni3amo3nizmonol4mo3ny_4mora_mo5seympara5mpar5imphas4mp5iesm4p1inmpo3rim4pousmulti32n1a2bna5liana5mitnanci4nan4itnas5tina3talnau3sen4ces_n5cheon5chiln3chisn5d2ifne4gatnel5iznera5bn4erarn4er5i3neticn5geren3gerini3miz5nine_nis4ta3nition3itorn5keronni3alno3ble4n3o2dnois5ino5l4i3nomicnon4agn5oniznor5abnpre4cnsati4n4s3esnter3snti4ern3tinentu3menuf4fe3nu3itoast5eob3a3bob5ingo3cheto4clamoc3rac5ocritoc3ulao5cureod5dedof5iteofit4to4gatoo5gene1o1giso5g2ly3ognizoic3esoi3deroi5letoi5sonoi3terolass4o3lesco3liceol5id_o3li4fol3ingo5lis_ol3isho5liteolli4eol3umeom3enaom3ic_om3icao5miniomo4geompro53oncilon5eston3keyon4odion3omyonspi4onten4on3t4iontif53operao5phano5pherop3ingo4posio4r3ago5realore5sh4o5riaor3icaor3ityor3ougors5enor3thior3thyo3scopos4i4eos3itoos3ityos5tilos5titot3er_ot5ersoth3i4ot3ic_ot5icao3ticeouch5iover3sov4ertoviti4o5v4olow3derow5est5paganp3agatpan3elpan4typar5dipar5elp4a4ripar4ispa5terpa5thypear4lpedia4ped4icpeli4epe4nanpen4thp4era_p4eragperme5per3tipe5tenpe5tizphar5iphe3noph4es_ph5ing3phone5phonipi4ciepi5thaplas5tpli5erplum4bpo3et55pointpoly5tppa5rapray4e5precipre5copre3empre4lap3rese3press5pri4epris3op3rocapros3ept5a4bput3errach4eraf5firam3etrane5oran4gerap3er3raphyrar5ef4rarilra5vairav3elra5zier5binerch4err4ci4brdi4errd3ingre5arrre4crere3disred5itre4facreg3isren4tere5pinre4spire3strre4terre3trire5utire4valrev3elre5vilrg3ingric5as5ricidri4cierid5erri3encri3entrig5anril3iz5rimanrim4pe5rina_riph5erit3icrit5urriv5elriv3etrk4linrl5ishrm5ersrm3ingr1nis4ro5filro5ker5role_ron4alron4taro3pelrop3icro4therov5elr5pentrp5er_rp3ingrre4strsa5tirse4crrs5er_rse5v2r4si4brtach4rten4dr4tierrtil3irtil4lr4tilyr4tistru3e4lrum3plrun4tyruti5nrvel4irv5er_r5vest5ryngesac3risalar4san4desa5vor3s4cie4scopyse2c3ose4d4ese4molsen5ats5eneds5enin4sentd4sentlsep3a34s1er_4servo5se5umsev3ensh5oldshort53side_5sidessi5diz4signa5sine_sion5a3sitiosk5inesk5ingslith5small35smithso4labsol3d2so3lic3s4on_s5ophyspen4d2s5peo3sphersp5ings5sengs4ses_ssi4erss5ilyssur5astam4i5stands4ta4p5stat_s5terostew5a5stickst3ing5stockstom3a5stone3stores4trads4trays4tridsy5rintai5lotal5enta5logtan4detanta3ta5perta3riz4taticta4turtax4istch5ettead4ite5gerte2ma2tem3at3tenan4tenes5ter3dter3ist3ess_teth5eth3easthe5atthe3isth5ic_th5ica5thinkth5odeti4atot4ic1utim5ul3tine_ti3zen3tles_t5let_to3natto3rietor5izto3wartra5chtraci4trem5i4tricstro5mitron5i4tronytro3sptu4nis2t3up_tur3isu4berou3ble_ud5estud3iedud3iesuen4teuer4ilugh3enuil5izu5lati5ulcheul3derul3ingul5ishul4larul4lisuls5esultra3um4blyumor5oun5ishunt3abun4tesuper5sup3ingupt5ibure5atur4ferurs5erur5tesur3theur4tieus4linuten4i4u1t2iu3tineut3ing5u5tiz2v1a4bvac5ilva5lieva5nizvel3liven3omv5enue5vere_v4erelv3erenv4eresver3ie3versever3thves4tevet3ervi5ali5vide_5vided5vides5vilit4vi4nav3io4rvis3itvor5ab4voteewa5gerwa5verweath3win4dewo5venwrita4xi5mizxpan4dymbol5yn3chryo5netys3icay3thin',7:'_ad4der_anti5s_ar4tie_aster5_be5sto_but4ti_cam4pe_capa5b_car5ol_de4moi_earth5_gen3t4_hand5i_hero5i_hon5ey_im5pin_lat5er_mag5a5_mar5ti_me5ter_mist5i_muta5b_or5ato_ped5al_pe5tit_re5mit_se5rie_sta5bl_ten5an_tim5o5_under5_ven4dea4lenti5a5lysta4matisa4m5atoan5est_a4pillaar5adisa5ratioar5ativar4chanar5dinear5inat5a5si4ta5ternaat5omizbad5gerban5dagbina5r43bi3tio3bit5uabuf4fercall5incast5ercas5tigccompa55chanic5chine_5cific_5cratic4c3retacul4tiscur5a4b4c5utivdel5i5qdem5ic_de4monsdenti5fdern5izdi4latodrag5on5drupliec5essaec5ifiee4compee4f3ereefor5ese4fuse_el5ativel5ebrae4l5ic_el5igibe4l3ingem5igraem3i3niemoni5oench4erent5age4enthesep5recaep5ti5b4erati_er5encee4sage_e4sagese4sert_e4sertse4servaes5idenes5ignaesis4tees5piraes4si4bestruc5e5titioet5itiv4f3ical4ficatefill5ingani5za4g3o3na5graph_4graphy4gress_hang5erh5a5nizharp5enhar5terhel4lishith5erhro5niziam5eteia4tricic4t3uainer4ari5nite_5initioinsur5aion4eryiphras4iq3ui3t5i5r2izis5itiviso5mer4istral5i5ticki2t5o5mi4v3er_i4vers_iv3o3ro4jestiek5iness4latelilev4er_lev4eralev4ersliar5iz5ligatelink5er5liticalloqui5l3o3nizlo4ratol5ties_5lumnia4matizam4b3ing5metricme5triem5i5liemin5glim5inglymis4er_m5istrymo5lestmon4ismmon4istmpa5rabmula5r4nag5er_ncour5and5est_nge4n4en5o5mizno4rarynov3el3nsta5bln4t3ingo5a5lesoctor5aod5uct_od5uctso2g5a5rog5ativoint5eroist5eno5litiool5ogizom5atizom5erseom5etry5ommend4operagor5alizor5angeor5est_4oscopios5itivo5statiotele4goth5esiounc5erover4nepara5blpar5age5pathicpa4tricpera5blperi5stper4mal5phistipi4grappref5acpre5tenprin4t3prof5itput4tedput4tinration4rb5ing_r5ebratrec5ollre5fer_r4en4tare4posiress5ibre5stalre4ti4zre5versre5vertrev5olurip5licri3ta3br5ited_rit5er_rit5ersr4ming_rom5etero5n4isros5perrtroph45sa3tioscan4t55scin4dscour5asmol5d45sophics5ophizsqual4lsspend4stern5i5stratuta5blestal4listen4tagter5iesteri5za5ternit5thodicthor5ittho5riztill5intion5eeto5cratton4alitrac4ittrac4tetra5ventri5ces5triciatro5pheuar5antu4b5inguiv4er_ul4li4bu4m3ingun4ter_upport5uri4ficus5tereuti5lizution5avar5iedver5encvermi4n4v3idenv3i3lizwea5riewill5inxe4cutoxpecto5ylla5bl',8:'_chill5i_cor5ner_dictio5_eq5ui5t_for5mer_re5stat_trib5utab5it5abab5o5lizap5illara5rameteation5arces5si5bch5a5nisch5inesse4q3ui3sg5rapher5graphicimenta5rin5dlingin5glinglem5aticl5i5tics5losophyma5chinema5rine_mpos5itenato5mizneg5ativni5ficat5nologisntrol5lioc5ratizonspir5appo5siterec5omper5ev5er_5taboliz5tisticatrav5es5url5ing_',9:'_ratio5nac5laratioec5ificatef5i5niteep5etitio5losophiz5mocratiz5nop5o5liuto5matic'}};Hyphenator.config({displaytogglebox:false,remoteloading:false});Hyphenator.run(); diff --git a/site/media/js/jquery.js b/site/media/js/jquery.js deleted file mode 100644 index b1ae21d..0000000 --- a/site/media/js/jquery.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery JavaScript Library v1.3.2 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) - * Revision: 6246 - */ -(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.3 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/site/media/js/jquery.scrollTo-1.4.2-min.js b/site/media/js/jquery.scrollTo-1.4.2-min.js deleted file mode 100644 index 73a3341..0000000 --- a/site/media/js/jquery.scrollTo-1.4.2-min.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * jQuery.ScrollTo - Easy element scrolling using jQuery. - * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 5/25/2009 - * @author Ariel Flesler - * @version 1.4.2 - * - * http://flesler.blogspot.com/2007/10/jqueryscrollto.html - */ -;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); \ No newline at end of file diff --git a/site/media/js/natparks.js b/site/media/js/natparks.js deleted file mode 100644 index d02e592..0000000 --- a/site/media/js/natparks.js +++ /dev/null @@ -1,566 +0,0 @@ -(function () { - 'use strict'; - - L.TileLayer.Provider = L.TileLayer.extend({ - initialize: function (arg, options) { - var providers = L.TileLayer.Provider.providers; - - var parts = arg.split('.'); - - var providerName = parts[0]; - var variantName = parts[1]; - - if (!providers[providerName]) { - throw 'No such provider (' + providerName + ')'; - } - - var provider = { - url: providers[providerName].url, - options: providers[providerName].options - }; - - // overwrite values in provider from variant. - if (variantName && 'variants' in providers[providerName]) { - if (!(variantName in providers[providerName].variants)) { - throw 'No such variant of ' + providerName + ' (' + variantName + ')'; - } - var variant = providers[providerName].variants[variantName]; - var variantOptions; - if (typeof variant === 'string') { - variantOptions = { - variant: variant - }; - } else { - variantOptions = variant.options; - } - provider = { - url: variant.url || provider.url, - options: L.Util.extend({}, provider.options, variantOptions) - }; - } else if (typeof provider.url === 'function') { - provider.url = provider.url(parts.splice(1, parts.length - 1).join('.')); - } - - // replace attribution placeholders with their values from toplevel provider attribution, - // recursively - var attributionReplacer = function (attr) { - if (attr.indexOf('{attribution.') === -1) { - return attr; - } - return attr.replace(/\{attribution.(\w*)\}/, - function (match, attributionName) { - return attributionReplacer(providers[attributionName].options.attribution); - } - ); - }; - provider.options.attribution = attributionReplacer(provider.options.attribution); - - // Compute final options combining provider options with any user overrides - var layerOpts = L.Util.extend({}, provider.options, options); - L.TileLayer.prototype.initialize.call(this, provider.url, layerOpts); - } - }); - - /** - * Definition of providers. - * see http://leafletjs.com/reference.html#tilelayer for options in the options map. - */ - - //jshint maxlen:220 - L.TileLayer.Provider.providers = { - OpenStreetMap: { - url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', - options: { - attribution: - '© OpenStreetMap contributors, ' + - 'CC-BY-SA' - }, - variants: { - Mapnik: {}, - BlackAndWhite: { - url: 'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png' - }, - DE: { - url: 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png' - }, - HOT: { - url: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', - options: { - attribution: '{attribution.OpenStreetMap}, Tiles courtesy of Humanitarian OpenStreetMap Team' - } - } - } - }, - OpenSeaMap: { - url: 'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', - options: { - attribution: 'Map data: © OpenSeaMap contributors' - } - }, - Thunderforest: { - url: 'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png', - options: { - attribution: - '© OpenCycleMap, {attribution.OpenStreetMap}', - variant: 'cycle' - }, - variants: { - OpenCycleMap: 'cycle', - Transport: 'transport', - Landscape: 'landscape', - Outdoors: 'outdoors' - } - }, - OpenMapSurfer: { - url: 'http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}', - options: { - minZoom: 0, - maxZoom: 20, - variant: 'roads', - attribution: 'Imagery from GIScience Research Group @ University of Heidelberg — Map data {attribution.OpenStreetMap}' - }, - variants: { - Roads: 'roads', - AdminBounds: { - options: { - variant: 'adminb', - maxZoom: 19 - } - }, - Grayscale: { - options: { - variant: 'roadsg', - maxZoom: 19 - } - } - } - }, - MapQuestOpen: { - url: 'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg', - options: { - attribution: - 'Tiles Courtesy of MapQuest — ' + - 'Map data {attribution.OpenStreetMap}', - subdomains: '1234' - }, - variants: { - OSM: {}, - Aerial: { - url: 'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg', - options: { - attribution: - 'Tiles Courtesy of MapQuest — ' + - 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' - } - } - } - }, - MapBox: { - url: function (id) { - return 'http://{s}.tiles.mapbox.com/v3/' + id + '/{z}/{x}/{y}.png'; - }, - options: { - attribution: - 'Imagery from MapBox — ' + - 'Map data {attribution.OpenStreetMap}', - subdomains: 'abcd' - } - }, - Stamen: { - url: 'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png', - options: { - attribution: - 'Map tiles by Stamen Design, ' + - 'CC BY 3.0 — ' + - 'Map data {attribution.OpenStreetMap}', - subdomains: 'abcd', - minZoom: 0, - maxZoom: 20, - variant: 'toner' - }, - variants: { - Toner: 'toner', - TonerBackground: 'toner-background', - TonerHybrid: 'toner-hybrid', - TonerLines: 'toner-lines', - TonerLabels: 'toner-labels', - TonerLite: 'toner-lite', - Terrain: { - options: { - variant: 'terrain', - minZoom: 4, - maxZoom: 18 - } - }, - TerrainBackground: { - options: { - variant: 'terrain-background', - minZoom: 4, - maxZoom: 18 - } - }, - Watercolor: { - options: { - variant: 'watercolor', - minZoom: 3, - maxZoom: 16 - } - } - } - }, - Esri: { - url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}', - options: { - variant: 'World_Street_Map', - attribution: 'Tiles © Esri' - }, - variants: { - WorldStreetMap: { - options: { - attribution: - '{attribution.Esri} — ' + - 'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' - } - }, - DeLorme: { - options: { - variant: 'Specialty/DeLorme_World_Base_Map', - minZoom: 1, - maxZoom: 11, - attribution: '{attribution.Esri} — Copyright: ©2012 DeLorme' - } - }, - WorldTopoMap: { - options: { - variant: 'World_Topo_Map', - attribution: - '{attribution.Esri} — ' + - 'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community' - } - }, - WorldImagery: { - options: { - variant: 'World_Imagery', - attribution: - '{attribution.Esri} — ' + - 'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' - } - }, - WorldTerrain: { - options: { - variant: 'World_Terrain_Base', - maxZoom: 13, - attribution: - '{attribution.Esri} — ' + - 'Source: USGS, Esri, TANA, DeLorme, and NPS' - } - }, - WorldShadedRelief: { - options: { - variant: 'World_Shaded_Relief', - maxZoom: 13, - attribution: '{attribution.Esri} — Source: Esri' - } - }, - WorldPhysical: { - options: { - variant: 'World_Physical_Map', - maxZoom: 8, - attribution: '{attribution.Esri} — Source: US National Park Service' - } - }, - OceanBasemap: { - options: { - variant: 'Ocean_Basemap', - maxZoom: 13, - attribution: '{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri' - } - }, - NatGeoWorldMap: { - options: { - variant: 'NatGeo_World_Map', - maxZoom: 16, - attribution: '{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC' - } - }, - WorldGrayCanvas: { - options: { - variant: 'Canvas/World_Light_Gray_Base', - maxZoom: 16, - attribution: '{attribution.Esri} — Esri, DeLorme, NAVTEQ' - } - } - } - }, - OpenWeatherMap: { - url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png', - options: { - attribution: 'Map data © OpenWeatherMap', - opacity: 0.5 - }, - variants: { - Clouds: 'clouds', - CloudsClassic: 'clouds_cls', - Precipitation: 'precipitation', - PrecipitationClassic: 'precipitation_cls', - Rain: 'rain', - RainClassic: 'rain_cls', - Pressure: 'pressure', - PressureContour: 'pressure_cntr', - Wind: 'wind', - Temperature: 'temp', - Snow: 'snow' - } - }, - HERE: { - /* - * HERE maps, formerly Nokia maps. - * These basemaps are free, but you need an API key. Please sign up at - * http://developer.here.com/getting-started - * - * Note that the base urls contain '.cit' whichs is HERE's - * 'Customer Integration Testing' environment. Please remove for production - * envirionments. - */ - url: - 'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' + - 'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?' + - 'app_id={app_id}&app_code={app_code}', - options: { - attribution: - 'Map © 1987-2014 HERE', - subdomains: '1234', - mapID: 'newest', - 'app_id': '', - 'app_code': '', - base: 'base', - variant: 'normal.day', - minZoom: 0, - maxZoom: 20 - }, - variants: { - normalDay: 'normal.day', - normalDayCustom: 'normal.day.custom', - normalDayGrey: 'normal.day.grey', - normalDayMobile: 'normal.day.mobile', - normalDayGreyMobile: 'normal.day.grey.mobile', - normalDayTransit: 'normal.day.transit', - normalDayTransitMobile: 'normal.day.transit.mobile', - normalNight: 'normal.night', - normalNightMobile: 'normal.night.mobile', - normalNightGrey: 'normal.night.grey', - normalNightGreyMobile: 'normal.night.grey.mobile', - - carnavDayGrey: 'carnav.day.grey', - hybridDay: { - options: { - base: 'aerial', - variant: 'hybrid.day' - } - }, - hybridDayMobile: { - options: { - base: 'aerial', - variant: 'hybrid.day.mobile' - } - }, - pedestrianDay: 'pedestrian.day', - pedestrianNight: 'pedestrian.night', - satelliteDay: { - options: { - base: 'aerial', - variant: 'satellite.day' - } - }, - terrainDay: { - options: { - base: 'aerial', - variant: 'terrain.day' - } - }, - terrainDayMobile: { - options: { - base: 'aerial', - variant: 'terrain.day.mobile' - } - } - } - }, - Acetate: { - url: 'http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png', - options: { - attribution: - '©2012 Esri & Stamen, Data from OSM and Natural Earth', - subdomains: '0123', - minZoom: 2, - maxZoom: 18, - variant: 'acetate-base' - }, - variants: { - basemap: 'acetate-base', - terrain: 'terrain', - all: 'acetate-hillshading', - foreground: 'acetate-fg', - roads: 'acetate-roads', - labels: 'acetate-labels', - hillshading: 'hillshading' - } - } - }; - - L.tileLayer.provider = function (provider, options) { - return new L.TileLayer.Provider(provider, options); - }; - - L.Control.Layers.Provided = L.Control.Layers.extend({ - initialize: function (base, overlay, options) { - var first; - - var labelFormatter = function (label) { - return label.replace(/\./g, ': ').replace(/([a-z])([A-Z])/g, '$1 $2'); - }; - - if (base.length) { - (function () { - var out = {}, - len = base.length, - i = 0; - - while (i < len) { - if (typeof base[i] === 'string') { - if (i === 0) { - first = L.tileLayer.provider(base[0]); - out[labelFormatter(base[i])] = first; - } else { - out[labelFormatter(base[i])] = L.tileLayer.provider(base[i]); - } - } - i++; - } - base = out; - }()); - this._first = first; - } - - if (overlay && overlay.length) { - (function () { - var out = {}, - len = overlay.length, - i = 0; - - while (i < len) { - if (typeof overlay[i] === 'string') { - out[labelFormatter(overlay[i])] = L.tileLayer.provider(overlay[i]); - } - i++; - } - overlay = out; - }()); - } - L.Control.Layers.prototype.initialize.call(this, base, overlay, options); - }, - onAdd: function (map) { - this._first.addTo(map); - return L.Control.Layers.prototype.onAdd.call(this, map); - } - }); - - L.control.layers.provided = function (baseLayers, overlays, options) { - return new L.Control.Layers.Provided(baseLayers, overlays, options); - }; -}()); - -//Utility functions for map info window -function mapit(lat,lon,zoom,id) { - map = L.map(document.getElementById("map-wrapper-"+id)); - centerCoord = new L.LatLng(lat, lon); - zoom = zoom; - L.tileLayer.provider('Esri.WorldTopoMap', {maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Tiles © Esri and the GIS User Community'}).addTo(map); - map.setView(centerCoord, zoom); - ////get the geojson for this map - $.ajax({ - url: "/projects/data/natparks/"+id+".json", - dataType: "json", - success: function(data, text, request) { draw_poly(data, map); } - //complete: function(xhr, status) {console.log(status); return false; }, - }); - //draw the polygon - function draw_poly(data, map) { - var myStyle = { - "color": "#201a11", - "weight": 2, - "opacity": 0.65 - }; - L.geoJson(data, { - style: myStyle - }).addTo(map); - } -} - -// utility functions to create/remove map container -function create_map(obj) { - var lat = parseFloat(obj.attr('data-latitude')); - var lon = parseFloat(obj.attr('data-longitude')); - var zoom= parseInt(obj.attr('data-zoom')); - var id= obj.attr('data-id'); - - //create container divs - $(obj).parents().eq(3).append('
    '); - $('#map-container-'+id).append('
    '); - mapit(lat,lon,zoom,id); -} -function remove_map(id) { - $(id).remove(); -} - -//functions to handle the "more" link -// utility functions to create/remove camera info container -function get_exif(obj,id) { - //$(obj).parents().eq(2).append('
    '); - $(obj).parents().eq(3).append('
    '); $(obj).parents().eq(2).children('.meta').clone().appendTo('#'+id).css('visibility', 'visible'); - - - - //deal with the variable height of div.legend - $('#exif-container').css({ - bottom: function(index, value) { - return parseFloat($(obj).parent().parent().css("height"))-14; - } - }); -} -function remove_exif(id) { - $('#'+id).remove(); -} -$(document).ready(function(){ -//set up click events for map button - $('.map-link').click( function() { - var more_id = 'more-container-'+$(this).parent().next().children('.more-link').attr('id').split('-')[1]; - var id = '#map-container-'+$(this).attr('data-id'); - if ($('#'+more_id).is(":visible")){ - remove_exif(more_id); - } - if ($(id).is(":visible")) { - remove_map(id); - } else { - create_map($(this)); - } - return false; - - }); - - //set up click events for more info button - $('.more-link').click( function() { - var map_id = '#map-container-'+$(this).parent().prev().children('.map-link').attr('data-id'); - var id = 'more-container-'+this.id.split('-')[1]; - if ($(map_id).is(":visible")){ - remove_map(map_id); - } - if ($('#'+id).is(":visible")) { - remove_exif(id); - } else { - get_exif(this, id); - } - return false; - }); - -}); diff --git a/site/media/js/photos.js b/site/media/js/photos.js deleted file mode 100644 index acda868..0000000 --- a/site/media/js/photos.js +++ /dev/null @@ -1,543 +0,0 @@ -(function () { - 'use strict'; - - L.TileLayer.Provider = L.TileLayer.extend({ - initialize: function (arg, options) { - var providers = L.TileLayer.Provider.providers; - - var parts = arg.split('.'); - - var providerName = parts[0]; - var variantName = parts[1]; - - if (!providers[providerName]) { - throw 'No such provider (' + providerName + ')'; - } - - var provider = { - url: providers[providerName].url, - options: providers[providerName].options - }; - - // overwrite values in provider from variant. - if (variantName && 'variants' in providers[providerName]) { - if (!(variantName in providers[providerName].variants)) { - throw 'No such variant of ' + providerName + ' (' + variantName + ')'; - } - var variant = providers[providerName].variants[variantName]; - var variantOptions; - if (typeof variant === 'string') { - variantOptions = { - variant: variant - }; - } else { - variantOptions = variant.options; - } - provider = { - url: variant.url || provider.url, - options: L.Util.extend({}, provider.options, variantOptions) - }; - } else if (typeof provider.url === 'function') { - provider.url = provider.url(parts.splice(1, parts.length - 1).join('.')); - } - - // replace attribution placeholders with their values from toplevel provider attribution, - // recursively - var attributionReplacer = function (attr) { - if (attr.indexOf('{attribution.') === -1) { - return attr; - } - return attr.replace(/\{attribution.(\w*)\}/, - function (match, attributionName) { - return attributionReplacer(providers[attributionName].options.attribution); - } - ); - }; - provider.options.attribution = attributionReplacer(provider.options.attribution); - - // Compute final options combining provider options with any user overrides - var layerOpts = L.Util.extend({}, provider.options, options); - L.TileLayer.prototype.initialize.call(this, provider.url, layerOpts); - } - }); - - /** - * Definition of providers. - * see http://leafletjs.com/reference.html#tilelayer for options in the options map. - */ - - //jshint maxlen:220 - L.TileLayer.Provider.providers = { - OpenStreetMap: { - url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', - options: { - attribution: - '© OpenStreetMap contributors, ' + - 'CC-BY-SA' - }, - variants: { - Mapnik: {}, - BlackAndWhite: { - url: 'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png' - }, - DE: { - url: 'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png' - }, - HOT: { - url: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', - options: { - attribution: '{attribution.OpenStreetMap}, Tiles courtesy of Humanitarian OpenStreetMap Team' - } - } - } - }, - OpenSeaMap: { - url: 'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', - options: { - attribution: 'Map data: © OpenSeaMap contributors' - } - }, - Thunderforest: { - url: 'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png', - options: { - attribution: - '© OpenCycleMap, {attribution.OpenStreetMap}', - variant: 'cycle' - }, - variants: { - OpenCycleMap: 'cycle', - Transport: 'transport', - Landscape: 'landscape', - Outdoors: 'outdoors' - } - }, - OpenMapSurfer: { - url: 'http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}', - options: { - minZoom: 0, - maxZoom: 20, - variant: 'roads', - attribution: 'Imagery from GIScience Research Group @ University of Heidelberg — Map data {attribution.OpenStreetMap}' - }, - variants: { - Roads: 'roads', - AdminBounds: { - options: { - variant: 'adminb', - maxZoom: 19 - } - }, - Grayscale: { - options: { - variant: 'roadsg', - maxZoom: 19 - } - } - } - }, - MapQuestOpen: { - url: 'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg', - options: { - attribution: - 'Tiles Courtesy of MapQuest — ' + - 'Map data {attribution.OpenStreetMap}', - subdomains: '1234' - }, - variants: { - OSM: {}, - Aerial: { - url: 'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg', - options: { - attribution: - 'Tiles Courtesy of MapQuest — ' + - 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' - } - } - } - }, - MapBox: { - url: function (id) { - return 'http://{s}.tiles.mapbox.com/v3/' + id + '/{z}/{x}/{y}.png'; - }, - options: { - attribution: - 'Imagery from MapBox — ' + - 'Map data {attribution.OpenStreetMap}', - subdomains: 'abcd' - } - }, - Stamen: { - url: 'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png', - options: { - attribution: - 'Map tiles by Stamen Design, ' + - 'CC BY 3.0 — ' + - 'Map data {attribution.OpenStreetMap}', - subdomains: 'abcd', - minZoom: 0, - maxZoom: 20, - variant: 'toner' - }, - variants: { - Toner: 'toner', - TonerBackground: 'toner-background', - TonerHybrid: 'toner-hybrid', - TonerLines: 'toner-lines', - TonerLabels: 'toner-labels', - TonerLite: 'toner-lite', - Terrain: { - options: { - variant: 'terrain', - minZoom: 4, - maxZoom: 18 - } - }, - TerrainBackground: { - options: { - variant: 'terrain-background', - minZoom: 4, - maxZoom: 18 - } - }, - Watercolor: { - options: { - variant: 'watercolor', - minZoom: 3, - maxZoom: 16 - } - } - } - }, - Esri: { - url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}', - options: { - variant: 'World_Street_Map', - attribution: 'Tiles © Esri' - }, - variants: { - WorldStreetMap: { - options: { - attribution: - '{attribution.Esri} — ' + - 'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' - } - }, - DeLorme: { - options: { - variant: 'Specialty/DeLorme_World_Base_Map', - minZoom: 1, - maxZoom: 11, - attribution: '{attribution.Esri} — Copyright: ©2012 DeLorme' - } - }, - WorldTopoMap: { - options: { - variant: 'World_Topo_Map', - attribution: - '{attribution.Esri} — ' + - 'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community' - } - }, - WorldImagery: { - options: { - variant: 'World_Imagery', - attribution: - '{attribution.Esri} — ' + - 'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' - } - }, - WorldTerrain: { - options: { - variant: 'World_Terrain_Base', - maxZoom: 13, - attribution: - '{attribution.Esri} — ' + - 'Source: USGS, Esri, TANA, DeLorme, and NPS' - } - }, - WorldShadedRelief: { - options: { - variant: 'World_Shaded_Relief', - maxZoom: 13, - attribution: '{attribution.Esri} — Source: Esri' - } - }, - WorldPhysical: { - options: { - variant: 'World_Physical_Map', - maxZoom: 8, - attribution: '{attribution.Esri} — Source: US National Park Service' - } - }, - OceanBasemap: { - options: { - variant: 'Ocean_Basemap', - maxZoom: 13, - attribution: '{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri' - } - }, - NatGeoWorldMap: { - options: { - variant: 'NatGeo_World_Map', - maxZoom: 16, - attribution: '{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC' - } - }, - WorldGrayCanvas: { - options: { - variant: 'Canvas/World_Light_Gray_Base', - maxZoom: 16, - attribution: '{attribution.Esri} — Esri, DeLorme, NAVTEQ' - } - } - } - }, - OpenWeatherMap: { - url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png', - options: { - attribution: 'Map data © OpenWeatherMap', - opacity: 0.5 - }, - variants: { - Clouds: 'clouds', - CloudsClassic: 'clouds_cls', - Precipitation: 'precipitation', - PrecipitationClassic: 'precipitation_cls', - Rain: 'rain', - RainClassic: 'rain_cls', - Pressure: 'pressure', - PressureContour: 'pressure_cntr', - Wind: 'wind', - Temperature: 'temp', - Snow: 'snow' - } - }, - HERE: { - /* - * HERE maps, formerly Nokia maps. - * These basemaps are free, but you need an API key. Please sign up at - * http://developer.here.com/getting-started - * - * Note that the base urls contain '.cit' whichs is HERE's - * 'Customer Integration Testing' environment. Please remove for production - * envirionments. - */ - url: - 'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' + - 'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?' + - 'app_id={app_id}&app_code={app_code}', - options: { - attribution: - 'Map © 1987-2014 HERE', - subdomains: '1234', - mapID: 'newest', - 'app_id': '', - 'app_code': '', - base: 'base', - variant: 'normal.day', - minZoom: 0, - maxZoom: 20 - }, - variants: { - normalDay: 'normal.day', - normalDayCustom: 'normal.day.custom', - normalDayGrey: 'normal.day.grey', - normalDayMobile: 'normal.day.mobile', - normalDayGreyMobile: 'normal.day.grey.mobile', - normalDayTransit: 'normal.day.transit', - normalDayTransitMobile: 'normal.day.transit.mobile', - normalNight: 'normal.night', - normalNightMobile: 'normal.night.mobile', - normalNightGrey: 'normal.night.grey', - normalNightGreyMobile: 'normal.night.grey.mobile', - - carnavDayGrey: 'carnav.day.grey', - hybridDay: { - options: { - base: 'aerial', - variant: 'hybrid.day' - } - }, - hybridDayMobile: { - options: { - base: 'aerial', - variant: 'hybrid.day.mobile' - } - }, - pedestrianDay: 'pedestrian.day', - pedestrianNight: 'pedestrian.night', - satelliteDay: { - options: { - base: 'aerial', - variant: 'satellite.day' - } - }, - terrainDay: { - options: { - base: 'aerial', - variant: 'terrain.day' - } - }, - terrainDayMobile: { - options: { - base: 'aerial', - variant: 'terrain.day.mobile' - } - } - } - }, - Acetate: { - url: 'http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png', - options: { - attribution: - '©2012 Esri & Stamen, Data from OSM and Natural Earth', - subdomains: '0123', - minZoom: 2, - maxZoom: 18, - variant: 'acetate-base' - }, - variants: { - basemap: 'acetate-base', - terrain: 'terrain', - all: 'acetate-hillshading', - foreground: 'acetate-fg', - roads: 'acetate-roads', - labels: 'acetate-labels', - hillshading: 'hillshading' - } - } - }; - - L.tileLayer.provider = function (provider, options) { - return new L.TileLayer.Provider(provider, options); - }; - - L.Control.Layers.Provided = L.Control.Layers.extend({ - initialize: function (base, overlay, options) { - var first; - - var labelFormatter = function (label) { - return label.replace(/\./g, ': ').replace(/([a-z])([A-Z])/g, '$1 $2'); - }; - - if (base.length) { - (function () { - var out = {}, - len = base.length, - i = 0; - - while (i < len) { - if (typeof base[i] === 'string') { - if (i === 0) { - first = L.tileLayer.provider(base[0]); - out[labelFormatter(base[i])] = first; - } else { - out[labelFormatter(base[i])] = L.tileLayer.provider(base[i]); - } - } - i++; - } - base = out; - }()); - this._first = first; - } - - if (overlay && overlay.length) { - (function () { - var out = {}, - len = overlay.length, - i = 0; - - while (i < len) { - if (typeof overlay[i] === 'string') { - out[labelFormatter(overlay[i])] = L.tileLayer.provider(overlay[i]); - } - i++; - } - overlay = out; - }()); - } - L.Control.Layers.prototype.initialize.call(this, base, overlay, options); - }, - onAdd: function (map) { - this._first.addTo(map); - return L.Control.Layers.prototype.onAdd.call(this, map); - } - }); - - L.control.layers.provided = function (baseLayers, overlays, options) { - return new L.Control.Layers.Provided(baseLayers, overlays, options); - }; -}()); - -//Utility functions for map info window -function mapit(obj) { - lat = parseFloat(obj.attr('data-latitude')); - lon = parseFloat(obj.attr('data-longitude')); - elid= obj.attr('data-imgid'); - map = L.map(document.getElementById("mw-"+elid)); - centerCoord = new L.LatLng(lat, lon); - zoom = 8; - L.tileLayer.provider('Esri.WorldTopoMap', {maxZoom: 18, attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Tiles © Esri and the GIS User Community'}).addTo(map); - map.setView(centerCoord, zoom); - L.marker([lat, lon]).addTo(map); -} - //########## utility functions to create/remove map container ############ -function create_map(obj) { - //find id of this image caption: - var imgid = obj.attr('data-imgid'); - //create container divs - $('
    ').insertBefore($(obj).parent().parent()); - //$(obj).parent().parent().parent().prepend('
    '); - $('#mc-'+imgid).append('
    '); - //deal with the variable height of div.legend - $('#mc-'+imgid).css({ - bottom: function(index, value) { - return parseFloat($(obj).parent().parent().height())+20; - } - }); - - mapit(obj); -} -function remove_map(imgid) { - $('#mc-'+imgid).remove(); -} - -//############ Document.ready events ############## -$(document).ready(function(){ - - //set up click events for map button - $('.map-link').click( function() { - imgid = $(this).attr('data-imgid'); - if ($('#mc-'+imgid).is(":visible")) { - remove_map(imgid); - } else { - create_map($(this)); - } - return false; - - }); - var $ele = $('#slides').children(); - var $curr = 0; - $(document).bind('keydown', function (e) { - var code = e.which; - switch (code) { - case 39: - if ($curr <= $ele.size()) { - $.scrollTo($ele[$curr], 800 ); - $curr++; - } - break; - case 37: - if ($curr > 0) { - $curr--; - var $now = $curr; - $now--; - $.scrollTo($ele[$now], 800 ); - } - break; - } - return; - }); -}); - diff --git a/site/media/js/photos.min.js b/site/media/js/photos.min.js deleted file mode 100644 index f2e866e..0000000 --- a/site/media/js/photos.min.js +++ /dev/null @@ -1,19 +0,0 @@ -(function(){'use strict';L.TileLayer.Provider=L.TileLayer.extend({initialize:function(arg,options){var providers=L.TileLayer.Provider.providers;var parts=arg.split('.');var providerName=parts[0];var variantName=parts[1];if(!providers[providerName]){throw'No such provider ('+providerName+')';} -var provider={url:providers[providerName].url,options:providers[providerName].options};if(variantName&&'variants'in providers[providerName]){if(!(variantName in providers[providerName].variants)){throw'No such variant of '+providerName+' ('+variantName+')';} -var variant=providers[providerName].variants[variantName];var variantOptions;if(typeof variant==='string'){variantOptions={variant:variant};}else{variantOptions=variant.options;} -provider={url:variant.url||provider.url,options:L.Util.extend({},provider.options,variantOptions)};}else if(typeof provider.url==='function'){provider.url=provider.url(parts.splice(1,parts.length-1).join('.'));} -var attributionReplacer=function(attr){if(attr.indexOf('{attribution.')===-1){return attr;} -return attr.replace(/\{attribution.(\w*)\}/,function(match,attributionName){return attributionReplacer(providers[attributionName].options.attribution);});};provider.options.attribution=attributionReplacer(provider.options.attribution); var layerOpts=L.Util.extend({},provider.options,options);L.TileLayer.prototype.initialize.call(this,provider.url,layerOpts);}}); L.TileLayer.Provider.providers={OpenStreetMap:{url:'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',options:{attribution:'© OpenStreetMap contributors, '+'CC-BY-SA'},variants:{Mapnik:{},BlackAndWhite:{url:'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png'},DE:{url:'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png'},HOT:{url:'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of Humanitarian OpenStreetMap Team'}}}},OpenSeaMap:{url:'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',options:{attribution:'Map data: © OpenSeaMap contributors'}},Thunderforest:{url:'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png',options:{attribution:'© OpenCycleMap, {attribution.OpenStreetMap}',variant:'cycle'},variants:{OpenCycleMap:'cycle',Transport:'transport',Landscape:'landscape',Outdoors:'outdoors'}},OpenMapSurfer:{url:'http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}',options:{minZoom:0,maxZoom:20,variant:'roads',attribution:'Imagery from GIScience Research Group @ University of Heidelberg — Map data {attribution.OpenStreetMap}'},variants:{Roads:'roads',AdminBounds:{options:{variant:'adminb',maxZoom:19}},Grayscale:{options:{variant:'roadsg',maxZoom:19}}}},MapQuestOpen:{url:'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',options:{attribution:'Tiles Courtesy of MapQuest — '+'Map data {attribution.OpenStreetMap}',subdomains:'1234'},variants:{OSM:{},Aerial:{url:'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',options:{attribution:'Tiles Courtesy of MapQuest — '+'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'}}}},MapBox:{url:function(id){return'http://{s}.tiles.mapbox.com/v3/'+id+'/{z}/{x}/{y}.png';},options:{attribution:'Imagery from MapBox — '+'Map data {attribution.OpenStreetMap}',subdomains:'abcd'}},Stamen:{url:'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png',options:{attribution:'Map tiles by Stamen Design, '+'CC BY 3.0 — '+'Map data {attribution.OpenStreetMap}',subdomains:'abcd',minZoom:0,maxZoom:20,variant:'toner'},variants:{Toner:'toner',TonerBackground:'toner-background',TonerHybrid:'toner-hybrid',TonerLines:'toner-lines',TonerLabels:'toner-labels',TonerLite:'toner-lite',Terrain:{options:{variant:'terrain',minZoom:4,maxZoom:18}},TerrainBackground:{options:{variant:'terrain-background',minZoom:4,maxZoom:18}},Watercolor:{options:{variant:'watercolor',minZoom:3,maxZoom:16}}}},Esri:{url:'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',options:{variant:'World_Street_Map',attribution:'Tiles © Esri'},variants:{WorldStreetMap:{options:{attribution:'{attribution.Esri} — '+'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'}},DeLorme:{options:{variant:'Specialty/DeLorme_World_Base_Map',minZoom:1,maxZoom:11,attribution:'{attribution.Esri} — Copyright: ©2012 DeLorme'}},WorldTopoMap:{options:{variant:'World_Topo_Map',attribution:'{attribution.Esri} — '+'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community'}},WorldImagery:{options:{variant:'World_Imagery',attribution:'{attribution.Esri} — '+'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'}},WorldTerrain:{options:{variant:'World_Terrain_Base',maxZoom:13,attribution:'{attribution.Esri} — '+'Source: USGS, Esri, TANA, DeLorme, and NPS'}},WorldShadedRelief:{options:{variant:'World_Shaded_Relief',maxZoom:13,attribution:'{attribution.Esri} — Source: Esri'}},WorldPhysical:{options:{variant:'World_Physical_Map',maxZoom:8,attribution:'{attribution.Esri} — Source: US National Park Service'}},OceanBasemap:{options:{variant:'Ocean_Basemap',maxZoom:13,attribution:'{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'}},NatGeoWorldMap:{options:{variant:'NatGeo_World_Map',maxZoom:16,attribution:'{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'}},WorldGrayCanvas:{options:{variant:'Canvas/World_Light_Gray_Base',maxZoom:16,attribution:'{attribution.Esri} — Esri, DeLorme, NAVTEQ'}}}},OpenWeatherMap:{url:'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png',options:{attribution:'Map data © OpenWeatherMap',opacity:0.5},variants:{Clouds:'clouds',CloudsClassic:'clouds_cls',Precipitation:'precipitation',PrecipitationClassic:'precipitation_cls',Rain:'rain',RainClassic:'rain_cls',Pressure:'pressure',PressureContour:'pressure_cntr',Wind:'wind',Temperature:'temp',Snow:'snow'}},HERE:{url:'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/'+'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?'+'app_id={app_id}&app_code={app_code}',options:{attribution:'Map © 1987-2014 HERE',subdomains:'1234',mapID:'newest','app_id':'','app_code':'',base:'base',variant:'normal.day',minZoom:0,maxZoom:20},variants:{normalDay:'normal.day',normalDayCustom:'normal.day.custom',normalDayGrey:'normal.day.grey',normalDayMobile:'normal.day.mobile',normalDayGreyMobile:'normal.day.grey.mobile',normalDayTransit:'normal.day.transit',normalDayTransitMobile:'normal.day.transit.mobile',normalNight:'normal.night',normalNightMobile:'normal.night.mobile',normalNightGrey:'normal.night.grey',normalNightGreyMobile:'normal.night.grey.mobile',carnavDayGrey:'carnav.day.grey',hybridDay:{options:{base:'aerial',variant:'hybrid.day'}},hybridDayMobile:{options:{base:'aerial',variant:'hybrid.day.mobile'}},pedestrianDay:'pedestrian.day',pedestrianNight:'pedestrian.night',satelliteDay:{options:{base:'aerial',variant:'satellite.day'}},terrainDay:{options:{base:'aerial',variant:'terrain.day'}},terrainDayMobile:{options:{base:'aerial',variant:'terrain.day.mobile'}}}},Acetate:{url:'http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png',options:{attribution:'©2012 Esri & Stamen, Data from OSM and Natural Earth',subdomains:'0123',minZoom:2,maxZoom:18,variant:'acetate-base'},variants:{basemap:'acetate-base',terrain:'terrain',all:'acetate-hillshading',foreground:'acetate-fg',roads:'acetate-roads',labels:'acetate-labels',hillshading:'hillshading'}}};L.tileLayer.provider=function(provider,options){return new L.TileLayer.Provider(provider,options);};L.Control.Layers.Provided=L.Control.Layers.extend({initialize:function(base,overlay,options){var first;var labelFormatter=function(label){return label.replace(/\./g,': ').replace(/([a-z])([A-Z])/g,'$1 $2');};if(base.length){(function(){var out={},len=base.length,i=0;while(iOpenStreetMap contributors, CC-BY-SA, Tiles © Esri and the GIS User Community'}).addTo(map);map.setView(centerCoord,zoom);L.marker([lat,lon]).addTo(map);} -function create_map(obj){var imgid=obj.attr('data-imgid'); $('
    ').insertBefore($(obj).parent().parent());$('#mc-'+imgid).append('
    '); $('#mc-'+imgid).css({bottom:function(index,value){return parseFloat($(obj).parent().parent().height())+20;}});mapit(obj);} -function remove_map(imgid){$('#mc-'+imgid).remove();} -$(document).ready(function(){ $('.map-link').click(function(){imgid=$(this).attr('data-imgid');if($('#mc-'+imgid).is(":visible")){remove_map(imgid);}else{create_map($(this));} -return false;});var $ele=$('#slides').children();var $curr=0;$(document).bind('keydown',function(e){var code=e.which;switch(code){case 39:if($curr<=$ele.size()){$.scrollTo($ele[$curr],800);$curr++;} -break;case 37:if($curr>0){$curr--;var $now=$curr;$now--;$.scrollTo($ele[$now],800);} -break;} -return;});}); \ No newline at end of file -- cgit v1.2.3-70-g09d2