Skip to content

Instantly share code, notes, and snippets.

@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active November 29, 2023 17:57
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
@eezis
eezis / crispy-forms-inlineradios.py
Created April 19, 2016 21:03
Horizontal Radio Buttons For Boolean Values Using Crispy Forms with Django
Quick guide to getting inlineradio buttons when using boolean values with Crispy Forms.
1. create chocies
BOOLEAN_YN = (
(True, u'Yes'),
(False, u'No'),
)
2. update model to point at the choices
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")