![]() As an example, our blog was taking around 40 seconds to load at times, entirely because of the number of different “share-to-social” systems being used. If you watch most blogs (that allow multiple sharing) load, they take ages. So they go away to the social network and load it all in. Why do they do this? Aren’t the “like” buttons just graphics? Well, no, most of these systems like to tell you how many people have “liked” or “tweeted” the post. We could easily add another 20, but it’d be madly confusing. Our blog currently has links for Twitter, Facebook and Disqus. If you’ve built a website or blog that allows social sharing, you’ll have found an increasing proliferation of “Like” buttons. How to Like Things Faster! Speed up Your Social Sharing Links 10x. pgAdmin III to connect, using host=127.0.0.1, port=5433 You should now be able to use a tool of your choice, e.g. Save and exit, then service postgresql restart.This should be the public IP of your server, and trusts the connection coming via the SSL tunnel. Near the end, after “If you want to allow non-local connections…”, add one lines.nano /etc/postgresql/8.4/main/pg_hba.conf.ssh to the server then: sudo su - postgres.Allow remote connections to postgresql, instructions here.From your local development machine, open an SSH tunnel to the production machine, which we’ll assume is , e.g.:.ssh to your server and follow the same steps for installing postgresql, until you get to the pgAdmin steps.“PORT”: “5432”, # Set to empty string for default. “HOST”: “127.0.0.1”, # Set to empty string for localhost. “PASSWORD”: “noyb”, # Not used with sqlite3. “USER”: “put_your_username_here”, # Not used with sqlite3. “NAME”: “tweetcache”, # Or path to database file if using sqlite3. “ENGINE”: “django.db.backends.postgresql_psycopg2”, # Add “postgresql_psycopg2”, “postgresql”, “mysql”, “sqlite3” or “oracle”. Configure the DATABASES in settings.py, e.g.sudo apt-get install libpq-dev python-dev (if you forget - may get error “Please add the directory containing pg_config to the PATH” - for why, see here).Name=local, host=127.0.0.1, username=put_your-username_here, untick “Store password”. (enter a password for the SQL user you just created).exit (leave postgres terminal connection).(If creating a user that can’t logon to Linux, use: createuser put_your_username_here –password).createuser –superuser put_your_username_here.createdb mydb_name (detailed docs here).Download and install pgAdmin III using the Ubuntu Software Centre.Download and install postgresql: sudo apt-get install postgresql.I’m going to try the latter, just because I know some people who like it better than mysql. ![]() the automatic provision of admin pages - then for production use most people go for either mysql or Postgresql. If you’re using a relational database with Django, and it gives certain advantages - e.g. Installing and running Postgresql for Django on Ubuntu 11 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |