Tags » Django

Login Sederhana menggunakan AngularJS dan Django Rest dengan Basic Auth

Lebaran telah tiba, bukan artinya segala aktifitas belajar berhenti pula hehe. Sebenernya ini cuma catatan saya yang kebetulan juga saya lagi belajar AngularJS mix dengan Django Rest. 318 more words

Django

Cara Nge-trick Response JSON Tanpa Class Serializer di Django Rest Framework

Sebenernya sih iseng-iseng ajah. Memang bagus menggunakan serializer tapi adakalanya kita penasaran gimana sih kalo kita me-return JSON tanpa class Serializer ? Menurut saya pribadi memang lebih freedom. 276 more words

Django

Custom FileField Bawaan Django untuk Membatasi Jenis File Image dan Sizenya

Saya kepingin image yang saya upload hanya berjenis jpg dan gif saja saja dengan batasan sizenya hanya kurang atau sama dengan 2 mb ? Bisakah ? 278 more words

Django

Django Signals

Django includes a “signal dispatcher” which helps allow decoupled applications get notified when actions occur elsewhere in the framework. In a nutshell, signals allow certain senders to notify a set of receivers that some action has taken place. 847 more words

Django

Testing Django Forms that Contain a MultipleChoiceField

It’s pretty simple. Just return a Python list of values:

data = {
    'a_field': u'1',
    'a_multiple_choice_field': ['achoice', 'another_choice']
}
response = client.post(view_url, data)
Django

Django and MySQL + Emoticons

This has been documented elsewhere previously but for my own recollection, here it is again.

If you create a typical UTF-8 database (CHARACTER SET utf8 COLLATE utf8_unicode_ci), you’ll run into the following error if you attempt to save 4-byte characters to MySQL (i.e. 105 more words

Hacking