[~aloraine]Nowlan Freese
Branch: https://bitbucket.org/svallapu/appstore/branch/IGBF-1687
Steps to add icons to Apps:
1. Go to admin
2. Select Apps app.
3. Select the app(protoannot, 23and me..)
4. go to icon section and choose the file
5. Save
this file will be saved in /media/<filename>
Work:
Static folder : This folder is used only to serve static content to web pages.
Media folder : This folder is used to serve images/files which are uploaded by users.
Added Media folder to our AppStore Project.
Following files are changed to configure media folder
1. appstore/settings.py (setting up path to media folder)
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = '/media/'
2. appstore/urls.py ( setting up URL to media folder)
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
3. apps/models.py (use static instead of media)
Before = icon = models.ImageField(upload_to=app_icon_path, blank=True, null=True) #used to load static content
After = icon = models.ImageField(blank=True, null=True) #used to store media content
[~aloraine]Nowlan Freese
Branch: https://bitbucket.org/svallapu/appstore/branch/IGBF-1687
Steps to add icons to Apps:
1. Go to admin
2. Select Apps app.
3. Select the app(protoannot, 23and me..)
4. go to icon section and choose the file
5. Save
this file will be saved in /media/<filename>
Work:
Static folder : This folder is used only to serve static content to web pages.
Media folder : This folder is used to serve images/files which are uploaded by users.
Added Media folder to our AppStore Project.
Following files are changed to configure media folder
1. appstore/settings.py (setting up path to media folder)
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
MEDIA_URL = '/media/'
2. appstore/urls.py ( setting up URL to media folder)
+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
3. apps/models.py (use static instead of media)
Before = icon = models.ImageField(upload_to=app_icon_path, blank=True, null=True) #used to load static content
After = icon = models.ImageField(blank=True, null=True) #used to store media content