Display map->hint on the website
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Widelands Website |
Fix Released
|
Wishlist
|
kaputtnik |
Bug Description
Newer maps have the tag "hint = " in the elemental file. To use it on the website we could either
1. Create a new filed in the databse for this
or
2. Add the "hint" info to the field "map.descr" and perform some syntax to it.
First choice is the best but i don't know how it works with mysql. On my local installation i have done add a new field to the sqlite database table wlmap_map without problems. On the server it may need some offline time.
Adding the info to the descr filed is also not problematic (choice 2). What i do not know: The desrc field is of type TextField which is described as "A large text field" but i couldn't get a info how large it could be at maximum... See https:/
Currently i have implemented the second choice.
What do you mean?
Related branches
- SirVer: Approve
- kaputtnik (community): Needs Resubmitting
-
Diff: 558 lines (+216/-127)11 files modifiedmedia/css/base.css (+4/-0)
media/css/maps.css (+1/-1)
templates/wlmaps/edit_comment.html (+27/-0)
templates/wlmaps/map_detail.html (+37/-22)
templates/wlmaps/upload.html (+12/-3)
wlmaps/admin.py (+4/-5)
wlmaps/forms.py (+32/-20)
wlmaps/models.py (+25/-20)
wlmaps/test_urls.py (+2/-3)
wlmaps/urls.py (+13/-9)
wlmaps/views.py (+59/-44)
Changed in widelands-website: | |
status: | Confirmed → Fix Committed |
Changed in widelands-website: | |
status: | Fix Committed → Fix Released |
As discussed in our skype call earlier, the better solution is adding a field to the database - it is more work now, but less spaghetti later. It is my understanding that this can be run while the site is running as long as a default value is set for that field.
As we found out on the call today when investigating the database, TextField seems to translate to mysql longtext which according to [1] can hold a GBs worth of data.
[1] http:// stackoverflow. com/questions/ 4294506/ maximum- length- for-longtext- field