Django fast hints

Here some fast hints to remember: Migration:

  Alias /static/ «/var/www/smm_tools/site/»   Read more —>

How tired I am of Google way how get API tokens

You must: Create application and take its id and secret. Make a GET request to send secret and id with needed scopes of access. Obtain TEMPORARY access token and refresh token (first lives about 3000 — 5000 sec, the second can probably live infinite) Use this access token to GET something through REST, check if this token is not expires already.Short Read more —>

Google Drive API

Thanks to this guy, whose question and gist helps me understand the google api and requests for it to get access for google drive. http://stackoverflow.com/questions/22534959/access-google-drive-api-in-python-whithout-google-api-python-client-installed-a I found everything! If anybody will be confused like me: Get your google drive your_api_key from here: https://console.developers.google.com/apis/credentials?project=[your_project] in section with name «API keys» — or you can generate it by pushing «New Credentials» ->Short Read more —>

Django static files

How to find where def. static stores?

Then move it into the folder you need. Then update django’s.conf file:

And check the settings.py:

https://docs.djangoproject.com/en/1.8/howto/static-files/   Read more —>

Django + Python3.4 + Mysql(MariaDB)

Just hint for future me:

Using sources: http://www.8host.com/blog/django-prilozhenie-na-mariadb-v-centos-7/ http://stackoverflow.com/questions/14087598/python-3-3-importerror-no-module-named-configparser http://stackoverflow.com/questions/27748556/python3-4-cant-install-mysql-python http://geckich.blogspot.com/2012/08/django-djangocoreexceptionsimproperlyco.html MyOwnCommonSence     Read more —>

Django + apache2 + mod_wsgi

This is conf file to allow apache run Django applications.

Use these links: https://www.digitalocean.com/community/tutorials/how-to-run-django-with-mod_wsgi-and-apache-with-a-virtualenv-python-environment-on-a-debian-vps https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04 https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ Don’t forget to use correct IPs — domains, and addresses. Especially if proxy pass is used.     Read more —>

Allow Apache run python scripts

This is a simple ex. to allow apache run .py

    Read more —>

ADDM Comunity Edition install and configure

Here I’ll describe how to install and configure ADDM — Atrium Discovery and dependency Mapping virtual appliance and allow it to run as I want it to run. You can request a free trial on bmc site and they will email you link where you can find virtual appliances.   Tasks are: change root password allow ‘root’ — to logShort Read more —>

Going deeper with Python or HTMLParser and Vkontakte randomizer comes back!

Hello, for anybody who read this blog. Last time I’m trying to parse saved HTML page to get Vkontakte ids and randomly select one of them each time: here and here. Now I’ll try to go deeper and use different way to extract data from life webpage without sawing it to the folder with python script. For my opinion, using someShort Read more —>

Redmine update 3.0.1

Redmine Update Great, there is a new Redmine 3.0.1 published! Changelog: http://www.redmine.org/projects/redmine/wiki/Changelog How to update: http://trianglesis.org.ua/update-redmine-2-6 (RU) Difficulties: http://trianglesis.org.ua/update-redmine-2-5-2 Bad Update https://www.redmine.org/boards/2/topics/46141?r=46253 Some plugins can produce error like: My lost plugins: redmine_digest global_roles redmine_ckeditor (update found) redmine_people hooks_manager redmine_issue_checklist (update found) Also it has another warning I can’t figure out still:

If anybody can show me where does this require — I’ll change. ButShort Read more —>