pre> 35 35
 INSTALLED_APPS = [
36
+    'django.contrib.staticfiles',
36 37
     'django.contrib.admin',
37 38
     'django.contrib.auth',
38 39
     'django.contrib.contenttypes',
39 40
     'django.contrib.sessions',
40 41
     'django.contrib.messages',
41
-    'django.contrib.staticfiles',
42
+    'import_export',
42 43
     'django_google_maps',
43 44
     'django.contrib.gis',
44 45
     'smart_selects',
@@ -62,7 +63,7 @@ ROOT_URLCONF = 'shaqfindbed.urls'
62 63
 TEMPLATES = [
63 64
     {
64 65
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
65
-        'DIRS': [],
66
+        'DIRS': [os.path.join(BASE_DIR, 'templates')],
66 67
         'APP_DIRS': True,
67 68
         'OPTIONS': {
68 69
             'context_processors': [

+ 1 - 1
shaqfindbed/urls.py

@@ -23,7 +23,7 @@ urlpatterns = [
23 23
     path('backend/', include('backend.urls')),
24 24
     path('admin/', admin.site.urls),
25 25
     url(r'^chaining/', include('smart_selects.urls')),
26
-]
26
+] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
27 27
 
28 28
 if settings.DEBUG:
29 29
     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

shaqfindbed/wsgi.py → app/shaqfindbed/wsgi.py


BIN
app/static/.DS_Store


BIN
app/static/admin/.DS_Store


staticfile/admin/css/autocomplete.css → app/static/admin/css/autocomplete.css


+ 0 - 0
staticfile/admin/css/base.css


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff

tum/whitesports - Gogs: Simplico Git Service

Aucune description

geo-location.php 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. require_once dirname( __FILE__ ) . '/geo-location/class.jetpack-geo-location.php';
  3. /**
  4. * Geo-location shortcode for display of location data associated with a post.
  5. *
  6. * Usage with current global $post:
  7. * [geo-location]
  8. *
  9. * Usage with specific post ID:
  10. * [geo-location post=5]
  11. */
  12. add_shortcode( 'geo-location', 'jetpack_geo_shortcode' );
  13. function jetpack_geo_shortcode( $attributes ) {
  14. $attributes = shortcode_atts( array( 'post' => null, 'id' => null ), $attributes );
  15. return jetpack_geo_get_location( $attributes['post'] ? $attributes['post'] : $attributes['id'] );
  16. }
  17. /**
  18. * Get the geo-location data associated with the supplied post ID, if it's available
  19. * and marked as being available for public display. The returned array will contain
  20. * "latitude", "longitude" and "label" keys.
  21. *
  22. * If you do not supply a value for $post_id, the global $post will be used, if
  23. * available.
  24. *
  25. * @param integer|null $post_id
  26. *
  27. * @return array|null
  28. */
  29. function jetpack_geo_get_data( $post_id = null) {
  30. $geo = Jetpack_Geo_Location::init();
  31. if ( ! $post_id ) {
  32. $post_id = $geo->get_post_id();
  33. }
  34. $meta_values = $geo->get_meta_values( $post_id );
  35. if ( ! $meta_values['is_public'] || ! $meta_values['is_populated'] ) {
  36. return null;
  37. }
  38. return array(
  39. 'latitude' => $meta_values['latitude'],
  40. 'longitude' => $meta_values['longitude'],
  41. 'label' => $meta_values['label']
  42. );
  43. }
  44. /**
  45. * Display the label HTML for the geo-location information associated with the supplied
  46. * post ID.
  47. *
  48. * If you do not supply a value for $post_id, the global $post will be used, if
  49. * available.
  50. *
  51. * @param integer|null $post_id
  52. *
  53. * @return void
  54. */
  55. function jetpack_geo_display_location( $post_id = null ) {
  56. echo jetpack_geo_get_location( $post_id );
  57. }
  58. /**
  59. * Return the label HTML for the geo-location information associated with the supplied
  60. * post ID.
  61. *
  62. * If you do not supply a value for $post_id, the global $post will be used, if
  63. * available.
  64. *
  65. * @param integer|null $post_id
  66. *
  67. * @return string
  68. */
  69. function jetpack_geo_get_location( $post_id = null ) {
  70. return Jetpack_Geo_Location::init()->get_location_label( $post_id );
  71. }