I Failed the Turing Test

When in doubt, overengineer.

  1. Updated

    Database Routers in Django

    Category: Database, Python, Web Development

    把部分 models / tables 獨立到一台資料庫

  2. Updated

    elasticsearch-dsl-py: The Official Elasticsearch ORM in Python

    Category: Database, Python, Web Development

    elasticsearch-dsl 就是官方發佈的一套用來操作 Query DSL 的 Python package,用起來有點像 Django 的 ORM。

  3. Updated

    Elasticsearch: More than a Search Engine

    Category: Database

    Elasticsearch is a schemaless, document-oriented search engine, has a bunch of powerful quering APIs. It's also a great NoSQL database.

  4. Updated

    Read and Write Files in Django and Python

    Category: Python, Web Development

    File and ImageFile take a Python file or StringIO object, ContentFile takes a string. Examples for saving an upload to a model field included.

  5. Updated

    HTTP Cache Headers in Django

    Category: Python, Web Development

    Conditional view processing with @condition, and what Django's cache middleware adds to Cache-Control, Expires, and Last-Modified. no-store vs no-cache included.

  6. Updated

    Scrapy: The Web Scraping Framework for Python

    Category: Python, Web Development

    Scrapy is a fast high-level web crawling and web scraping framework. Notes on install, the interactive shell, spiders, items, pipelines, and debugging.

  7. Updated

    Parse datetime in Python and JavaScript

    Category: JavaScript, Python, Web Development

    Use dateutil and moment.js

  8. Updated

    Send Emails in Django

    Category: Python, Web Development

    Sending emails with Amazon SES, Mailgun, Zoho, or Gmail in Django.

  9. Updated

    Send Email Attachments with Unicode Filenames in Django

    Category: Python, Web Development

    Use MIMEApplication and set the attachment header yourself. Otherwise Gmail shows a Chinese filename as noname.

  10. Updated

    Upload your Java Artifacts to Maven Central Repository

    Category: Misc

    Publishing a Java library to Maven Central: a GPG key, a Sonatype JIRA account, a ticket for your groupId, then deploy to snapshot and staging. Only the first release needs the ticket.