← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands-website/fix_path_for_devevelopers into lp:widelands-website

 

kaputtnik has proposed merging lp:~widelands-dev/widelands-website/fix_path_for_devevelopers into lp:widelands-website.

Commit message:
Fix paths for developers and translators

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/fix_path_for_devevelopers/+merge/284861

Fix path for developers-page reflecting new file structure -> the files are now found in data-folder.

The changes in 'wlimages/admin.py' are only some sorting to have a common structure like the other files.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/fix_path_for_devevelopers into lp:widelands-website.
=== modified file 'mainpage/views.py'
--- mainpage/views.py	2016-01-12 08:05:17 +0000
+++ mainpage/views.py	2016-02-03 08:34:08 +0000
@@ -91,7 +91,7 @@
     txt = ''
     transl_files = []
     transl_list = []
-    path = os.path.normpath(WIDELANDS_SVN_DIR + 'i18n/locales/')
+    path = os.path.normpath(WIDELANDS_SVN_DIR + 'data/i18n/locales/')
     try:
         transl_files = os.listdir(path)
         if transl_files:
@@ -124,7 +124,7 @@
     # Get other developers, put in the translators list
     # at given position and prepare all for wl_markdown
     try:
-        with open(WIDELANDS_SVN_DIR + 'txts/developers.json', 'r') as f:
+        with open(WIDELANDS_SVN_DIR + 'data/txts/developers.json', 'r') as f:
             json_data = json.load(f)['developers']
 
         for head in json_data:

=== modified file 'wlimages/admin.py'
--- wlimages/admin.py	2015-07-07 05:02:04 +0000
+++ wlimages/admin.py	2016-02-03 08:34:08 +0000
@@ -14,14 +14,14 @@
 from models import Image
 
 class ImageAdmin(admin.ModelAdmin):
+    list_display = ( '__unicode__', 'date_submitted', 'content_type', 'user')
+    list_filter = ('date_submitted',)
+    date_hierarchy = 'date_submitted'
+    search_fields = ('image', 'user__username')
     fieldsets = (
         (None, {'fields': ( ('image', 'name'), 'date_submitted', 'url','revision')}),
         (_('Upload data:'), { 'fields': ( 'user', 'editor_ip')}),
-        (_('Content object:'), { 'fields': ( 'content_type', 'object_id' )}),
+        (_('Content object:'), { 'fields': ( 'content_type', 'object_id')}),
     )
-    list_display = ( '__unicode__', 'date_submitted', 'content_type', 'user')
-    list_filter = ('date_submitted',)
-    date_hierarchy = 'date_submitted'
-    search_fields = ('image', 'user__username')
 
 admin.site.register(Image, ImageAdmin)


Follow ups