{ "info": { "author": "Eric Florenzano", "author_email": "floguy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "django-simplestatic\n===================\n\nDjango SimpleStatic is an opinionated Django app which makes it very simple to\ndeal with static media, with extremely minimal configuration, as long as:\n\n* You store your static media in one directory, rather than alongside each app.\n* You want your files served from S3, rather from your own servers.\n* You want to use Google Closure Compiler to compress your JavaScript.\n* You want to compress your javascript ahead of time, rather than during the\n request.\n* You don't use any of those fancy CSS precompilers like LESS or SCSS. (This\n may change someday as my personal preferences change.)\n\nIf any of the above don't hold true, then this library probably won't work for\nyou. That said, if all of the above do hold true for you, then this app will\nlikely be the simplest and best way to handle your static media.\n\n\nInstallation\n------------\n\n1. pip install django-simplestatic\n\n2. Add 'simplestatic' to your INSTALLED_APPS:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.admin',\n\n # ... all your installed apps\n\n 'simplestatic',\n )\n\n3. In your settings file, set the following values:\n\n.. code-block:: python\n\n SIMPLESTATIC_DIR = '/path/to/your/static/media/directory'\n\n AWS_ACCESS_KEY_ID = 'YOUR_ACCESS_KEY_HERE'\n AWS_SECRET_ACCESS_KEY = 'YOUR_SECRET_KEY_HERE'\n AWS_STORAGE_BUCKET_NAME = 'YOUR_STATIC_BUCKET_HERE'\n\n4. In your urls.py, import the simplestatic_debug_urls function and execute it\n to the end of your urlpatterns:\n\n.. code-block:: python\n\n from simplestatic.urls import simplestatic_debug_urls\n\n urlpatterns = patterns('',\n # ... all of your url patterns right here\n ) + simplestatic_debug_urls()\n\n5. In your template (or templates) import and use the simplestatic template\n tags, which might look something like this:\n\n.. code-block:: html+django\n\n {% load simplestatic_tags %}\n\n \n I love django-simplestatic!\n\n {% simplestatic %}\n {% compress_css \"css/bootstrap.css\" %}\n {% compress_css \"css/screen.css\" %}\n {% compress_js \"js/jquery-1.9.1.js\" %}\n {% compress_js \"js/global.js\" %}\n {% endsimplestatic %}\n \n\n6. Before you push your code, run the static_sync management command to\n compress any CSS and JS and upload the whole directory to S3:\n\n.. code-block:: console\n\n python manage.py static_sync\n\n\nAdvanced Configuration\n----------------------\n\nEven though in the vast majority of cases, you'll only need to do what was\nmentioned above, django-simplestatic offers a number of settings that you might\nwant to tweak. Provided here is a reference of every setting\n\n\nRequired Settings\n~~~~~~~~~~~~~~~~~\n\nSIMPLESTATIC_DIR:\n The directory where you store all of your static media.\n\nAWS_ACCESS_KEY_ID:\n Your Amazon Web Services access key.\n\nAWS_SECRET_ACCESS_KEY:\n Your Amazon Web Services secret access key.\n\nAWS_STORAGE_BUCKET_NAME:\n The S3 bucket in which to store and serve all of your static media.\n\n\nOptional Settings\n~~~~~~~~~~~~~~~~~\n\nSIMPLESTATIC_DEBUG: (Defaults to DEBUG)\n A boolean determining whether to use the minimized, compressed versions of\n the files uploaded to S3. If set to True, then the full development\n versions of the files will be served instead. You shouldn't have to touch\n this, as by default it's set to the same value as your Django DEBUG value.\n\nSIMPLESTATIC_DEBUG_PATH: (Defaults to 'static/')\n The URL path from which to serve static media during development.\n\nSIMPLESTATIC_CUSTOM_DOMAIN: (Defaults to S3 subdomain URL)\n A custom domain from which to serve static media in production. For\n example, you may want to use CloudFront as a CDN in front of your S3\n bucket, which can be achieved by\n\n .. code-block:: python\n\n SIMPLESTATIC_CUSTOM_DOMAIN = 'asdfasdf.cloudfront.net'\n\n\nSIMPLESTATIC_COMPRESSED_DIR: (Defaults to 'compressed')\n The URL path in S3 to place the compressed and minified versions of the CSS\n and JS.\n\n For example, in the default case where this is set to 'compressed', your\n css and js might be located in a location like one of the following:\n\n http://example.s3.amazonaws.com/compressed/6bf0c67b74b26425832a17bbf27b9cb9.css\n http://example.s3.amazonaws.com/compressed/97a548fc6b62d5bb9f50e6a95b25d8db.js\n\nCLOSURE_COMPILATION_LEVEL: (Defaults to 'SIMPLE_OPTIMIZATIONS')\n The Google Closure Compiler compilation level option. See the following\n page for more information:\n\n https://developers.google.com/closure/compiler/docs/compilation_levels\n\nCLOSURE_COMPILER_COMMAND: (Defaults to 'java -jar /path/to/supplied/closure.jar')\n The command required to run Google Closure Compiler.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ericflo/django-simplestatic", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-simplestatic", "package_url": "https://pypi.org/project/django-simplestatic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-simplestatic/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ericflo/django-simplestatic" }, "release_url": "https://pypi.org/project/django-simplestatic/0.0.5/", "requires_dist": null, "requires_python": null, "summary": "A highly opinionated drop-in library for static file management in Django", "version": "0.0.5" }, "last_serial": 790647, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9316e208edda274612c555faa219fb88", "sha256": "0113b3d475495ed369d8a243ac00f21a192e6159908561d320820ae92b12793c" }, "downloads": -1, "filename": "django-simplestatic-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9316e208edda274612c555faa219fb88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7558, "upload_time": "2013-02-19T08:42:47", "url": "https://files.pythonhosted.org/packages/b1/b8/600fef2dbdb45925f245c560c3210410d3870eb47d6fb6a6555e8169d2d6/django-simplestatic-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "ac846d2c416168210a57b2f9037c1b42", "sha256": "83be4d91b64f967144606dd52d4e08a71d0e8a924d087965736ef24f8e8ebd02" }, "downloads": -1, "filename": "django-simplestatic-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ac846d2c416168210a57b2f9037c1b42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5444625, "upload_time": "2013-02-19T09:17:00", "url": "https://files.pythonhosted.org/packages/74/8b/79d4d5e796a21390761f3d0b4c5cd2aa4b7d6500aa81dc3455d1c493401c/django-simplestatic-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7ca53a77b716a8c8451844f381e8f938", "sha256": "6a96321cfcd85e58fa6cb41f62db6f64ab4326c343939d194cafe413c8303a20" }, "downloads": -1, "filename": "django-simplestatic-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7ca53a77b716a8c8451844f381e8f938", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5445151, "upload_time": "2013-02-26T04:21:18", "url": "https://files.pythonhosted.org/packages/ad/98/2fabc85059f2a84b135c7bc105c0653b4048ca6120bcd9d657b80e5a38ae/django-simplestatic-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "b2dd969e1a3a12b16b9fd678dfbf5b6d", "sha256": "def7466cf979aac1a684005b4bd8c5e9b675a3f9c5fb55e4ff19349f6741cf89" }, "downloads": -1, "filename": "django-simplestatic-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b2dd969e1a3a12b16b9fd678dfbf5b6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5445232, "upload_time": "2013-03-24T23:25:59", "url": "https://files.pythonhosted.org/packages/98/25/684ddc3128df1b9c621e37d87cf758c65010b779ae84d5341b3359ec2101/django-simplestatic-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ed799c171945905e53d147eca77ec047", "sha256": "1f11983bd77d93eb3b5fb5c4d53c89e8d65f3e37bbeec553831357fb736235ac" }, "downloads": -1, "filename": "django-simplestatic-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ed799c171945905e53d147eca77ec047", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5445238, "upload_time": "2013-04-29T05:24:33", "url": "https://files.pythonhosted.org/packages/7c/6d/ed1fde672372e36fb4fb3ba527f1a26e63234de95df4387553e9d0d35264/django-simplestatic-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ed799c171945905e53d147eca77ec047", "sha256": "1f11983bd77d93eb3b5fb5c4d53c89e8d65f3e37bbeec553831357fb736235ac" }, "downloads": -1, "filename": "django-simplestatic-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ed799c171945905e53d147eca77ec047", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5445238, "upload_time": "2013-04-29T05:24:33", "url": "https://files.pythonhosted.org/packages/7c/6d/ed1fde672372e36fb4fb3ba527f1a26e63234de95df4387553e9d0d35264/django-simplestatic-0.0.5.tar.gz" } ] }