2018年9月16日 星期日

[Android] Stored your customized data object in Spinner with Kotlin

If you want to make the list of your customized data objects be stored in Spinner. Try this...
Step:
      1. write your own data class
      2. override the toString() method of your data class
      3. add it to mutable list
      4. write on onItemSelected listener
      5. get selected item, and retrieval the object of your data class

2018年7月14日 星期六

Django 2.0.7 deploy to Heroku

I create a Django 2.0.7 app to deploy to Heroku.

https://devcenter.heroku.com/articles/django-app-configuration

settings.py
import django_heroku
....
....
# Activate Django-Heroku
django_heroku.settings(locals())
And when I run it with debug mode in local web app, it's running well.
But it always shows error when I deploy it to Heroku.

"relation "auth_user" does not exist"