Setting DEBUG = False causes 500 Error

Django 1.5 introduced the allowed hosts setting that is required for security reasons. A settings file created with Django 1.5 has this new section which you need to add: # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts ALLOWED_HOSTS = [] Add your host here like [‘www.beta800.net’] … Read more

Maven command to determine which settings.xml file Maven is using

Start maven with -X option (debug) and examine the beginning of the output. There should be something like this: … [INFO] Error stacktraces are turned on. [DEBUG] Reading global settings from c:\….\apache-maven-3.0.3\conf\settings.xml [DEBUG] Reading user settings from c:\….\.m2\settings.xml [DEBUG] Using local repository at C:\….\repository … (Original directory names are removed by me)

Changing Vim indentation behavior by file type

You can add .vim files to be executed whenever vim switches to a particular filetype. For example, I have a file ~/.vim/after/ftplugin/html.vim with this contents: setlocal shiftwidth=2 setlocal tabstop=2 Which causes vim to use tabs with a width of 2 characters for indenting (the noexpandtab option is set globally elsewhere in my configuration). This is … Read more

IntelliJ: Never use wildcard imports

It’s obvious why you’d want to disable this: To force IntelliJ to include each and every import individually. It makes it easier for people to figure out exactly where classes you’re using come from. Click on the Settings “wrench” icon on the toolbar, open “Imports” under “Code Style”, and check the “Use single class import” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)