Friday, April 22, 2016

Debug django and MySQL project with PyCharm community on Mac

The Problem...

I've been using PyCram community edition on and off lately on my Mac. It does some things good and something just annoy me so much that I go back to ST2.
One of them is that you can't debug or run out of the box a django project. I was always getting the missing image error as you can see in the image.

The Solution...

The solution was super simple once I figured out that it was not reading my MySQL install's bin directory.
Steps are as follows:
Click on Run -> Edit Configurations menu option
Click on the '+' icon to create a new one (1)
Enter the name and select the file
Add new Environment variable (2)
Win :)

Here are some images to help you with it. 

First arrow (1) shows the creation of the new Run Config
Second arrow (2) shows where to click to add new Environment Variable.

before you can enter the variable in you need to know where on your system it was installed. For me it is in the default location of /usr/local/mysql/lib

After you click on the Env Var icon add a new key named DYLD_LIBRARY_PATH 
then add in the following value: /usr/local/mysql/lib/:$DYLD_LIBRARY_PATH

After this click Apply and run your new new configuration. If all went well you will see the out put from django's runserver in the bottom of your editor.

You can find me on twitter @LZAntal

Monday, February 29, 2016

Busy month I am glad it's over

I am trying hard to blog once a month but again I am doing it in the very last day :/
More to come...

You can find me on twitter @LZAntal

Sunday, January 31, 2016

Quick post before January is over

Well my plan to write a post every month didn't happen. So here is this post to try to stick with it lol. I know it's not anything special but at least it's a post. 
Have been crazy busy with learning the ins and outs of NWJS library and the chromium APIs it wraps around. This has led me to brush up on C++11 which was on my todo list anyway. I am hoping to start to contribute to this awesome project. Especially since RaptorGL editor and tools using it. 
Python 3.5 came out and with its unicode, async lib and other goodies I decided to move all my new projects over Py3 and move my own libraries over it as well. I tested a few of my lobs and surprisingly they run close to 2-3x faster.
Some new projects I have to write in Swift so I've been having frustrating time converting my base Objc lobs over. Swift's annoying optional and unwrapping "!?" stuff makes it feel I am writing perl again. It's also a very rapidly changing language so hopefully it will be more user friendly soon.

Happy coding :))
You can find me on twitter @LZAntal