It handles concatenation and minification of CoffeeScript, Stylus and Handlebar templates for us but it can work with almost any front end technology out there. #16 is one of the biggest pains we had to deal with but I think we now have a good solution for now. And let me tell you, plenty of my fellow Rails devs have said to me they also regularly return to the asset pipeline docs. And I consider time spent in documentation a negative compared to time finding your own solution if the API is not intuitive and you find yourself consistently returning to the docs about similar problems. Out of the box the asset pipeline is great for all the things that come for free but if you are doing a lot of development in the framework you probably return to the asset pipeline documentation on a regular basis. But it definitely doesn't save you hours. I don't mean to insult the asset pipeline, it provides a lot. If what you wish you had from rails is the asset pipeline you are either either an expert with with rails api or you are seeing things greener on the other side of the fence. The asset pipeline provides a lot of functionality but not a lot of simplicity or management of complexity. I have been developing with rails for a couple years, though I am comfortable with python I've never touched django because I haven't had to and one thing I will say is that the rails asset pipeline documentation is something I constantly return to. None of them are perfect solutions (there still isn't a sprockets-esque one-catch-all solution for django like in the rails world), so consider the pros and cons before you make a choice. I've used django-compressor, django-pipeline, webassets, and django-gears. If you're writing a javascript-heavy application, consider all of your options for static asset management before you get too deep. Pre_nnect(validate_model, dispatch_uid='validate_models')ġ6. This will save you from cleaning up your data later.įrom django.db.models.signals import pre_save Use a pre_save hook on all of your models to do full_clean for validation before anything goes to the database. Yes, it's obtuse, but it gets the job done.ġ5. Your bin/ folder will turn into an unmaintainable mess very quickly.ġ4. Use something like chef or puppet to do machine configuration. Use django management commands to write scripts that interact with your application. You almost never need to write bash scripts. Virtualenvburrito ( ) will help you set it all up.ġ3. Use virtualenv and virtualenvwrapper to keep your environment clean from other environments. Use `pip freeze` to keep a list of your requirements, and keep that requirements list in your repo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |