Services Blog Français

Django & DBAs: "Performance problems due to incorrect many-many primary key on many tables"

| by jpic | django django-developers
Extract from a great thread on the django-developper mailing list started by Trey Raymond: I’m a DB engineer working for Yahoo, and we have a new product using django that I’m onboarding. We see a variety of easily fixed issues, but one major one - there are 21 many-many tables here, yet they have auto increment primary keys -- Example, existing: CREATE TABLE `accounts_profile_starred_groups` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `profile_id` int(10) unsigned NOT NULL, `group_id` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `profile_id` (`profile_id`,`group_id`), KEY `group_id_refs_id_e2f1545` (`group_id`) ) ENGINE=InnoDB; -- Fixed: CREATE TABLE `accounts_profile_starred_groups` ( `profile_id` int(10) unsigned NOT NULL, `group_id` int(10) unsigned NOT NULL, PRIMARY KEY (`profile_id`,`group_id`), KEY `group_id_refs_id_e2f1545` (`group_id`) ) ENGINE=InnoDB; Looking forward to see how it goes ! Read More

PythonAnywhere: free and awesome Django web host

| by jpic | python service
Here’s a really cool contribution. Harry Percival emailed django-developers about his employer, PythonAnywhere: We do offer Django hosting as part of our Free plan, so it’s a nice place for people to come and try out Django, for free, maybe host a prototype web app… I registered to give it a tried and received an amazing welcome email, which I won’t spoil for you !

Django & ajax & HATEOAS: how to reverse urls in javascript (not)

| by jpic | http hateoas api
This is the second article about reversing urls in javascript. The previous article actually presented a bad idea. Github API v3 Github’s API is undubitably quite suprising for a web developer that isn’t aware of the HATEOAS concept, here’s the kind of things you can see for example: [ { "updated_at": "2012-11-27T14:42:24Z", "svn_url": "https://github.com/yourlabs/django-cities-light", "language": "Python", "milestones_url": "https://api.github.com/repos/yourlabs/django-cities-light/milestones{/number}", "downloads_url": "https://api.github.com/repos/yourlabs/django-cities-light/downloads", "subscription_url": "https://api.github.com/repos/yourlabs/django-cities-light/subscription", "teams_url": "https://api.github.com/repos/yourlabs/django-cities-light/teams", "full_name": "yourlabs/django-cities-light", "git_url": "git://github.com/yourlabs/django-cities-light.git", "git_tags_url": "https://api.github.com/repos/yourlabs/django-cities-light/git/tags{/sha}", "owner": { "login": "yourlabs", "organizations_url": "https://api. Read More

How to: fully use gmail with the keyboard

| by jpic | keyboard
Keeping your inbox clean can be quite a pain. Except with keyboard shortcuts. ? shows the list of shortcuts, / to search mails, c to compose a message, gi brings you to the inbox, j and k moves the little blue cursor between threads, x selects the thread that has the blue cursor, e archives selected threads, o opens selected thread a is for reply to all, r is for reply. Read More

html5 unquoted tag attributes

| by jpic
http://www.w3.org/TR/html-markup/syntax.html#syntax-attr-unquoted Stuff like this: Can now be: That should save some bits !

html5 modal dialog api

| by jpic
http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-showmodaldialog This specification of HTML5 provides an API for modal dialogs, we will not need a plugin anymore. This blog will present a cool HTML5 feature every now and then.
Previous Page 29 of 32 Next Page

They trust us

Contact

logo