#551 in Computers & technology books
Use arrows to jump to the previous/next product

Reddit mentions of Two Scoops of Django: Best Practices For Django 1.6

Sentiment score: 5
Reddit mentions: 7

We found 7 Reddit mentions of Two Scoops of Django: Best Practices For Django 1.6. Here are the top ones.

Two Scoops of Django: Best Practices For Django 1.6
Buying options
View on Amazon.com
or
    Features:
  • PREMIUM QUALITY ACRYLIC MATERIALS: Insert Size 5"w x 7"h.Made with extra thick, crystal clear 2 mm acrylic for enhanced strength and durability, making this holder super sturdy and scratch free item, lightweight, durability and easily to clean.
  • PREMIUM QUALITY ACRYLIC MATERIALS: Insert Size 5"w x 7"h.Made with extra thick, crystal clear 2 mm acrylic for enhanced strength and durability, making this holder super sturdy and scratch free item, lightweight, durability and easily to clean.
  • DOUBLE SIDED SIGN HOLDER DISPLAYS: Means twice the visibility. Double your message space and your visibility compared to a single sided slanted holder Vertical sign holder features an open top design for loading one item or you can insert two prints back-to-back to create a double-sided display.
  • MULTIPLE USE: Excellent way to get attention when you want to display marketing advertisements, restaurant menu, promotions, important messages or any personal photo frame. These holders can be used in a multipurpose setting, whether this maybe at your place of business, office, hairdressers studios, outdoors markets, even your home
  • TOP LOADING: Has the benefit of being able to load paper from the top to prevent tampering of the contents inside, making it easy to clean and rapid content change
  • READ BEFORE BUYING…100% quality assurance, make sure you only have to make this investment once!Don’t chance it with a cheap imitator, proudly display your signs with these superior wall mounted acrylic sign holders!
Specs:
Height9.25 Inches
Length7.5 Inches
Number of items1
Weight1.7 Pounds
Width1.01 Inches

idea-bulb Interested in what Redditors like? Check out our Shuffle feature

Shuffle: random products popular on Reddit

Found 7 comments on Two Scoops of Django: Best Practices For Django 1.6:

u/sudipkafle · 8 pointsr/django

Here are a couple of things I would recommend anyone diving in more depth into Django:

  • Learn about Class Based Views. You are going to implement them most of the time in projects.
  • Implement Test Driven Development on your new projects. Here's a nice book on TDD with Django which is available online for free.
  • Go though the book 2 scoops of Django to know about best practices.
  • Implement best practices like - multiple requirements.txt and settings.py for production and local, using named urls and reverse, profiling with tools like Django Debug Toolbar.
u/dynamowku · 7 pointsr/django

Like those before me, I had been doing the same thing. It's a practice I borrowed from the 2 Scoops of Django book.

It's served me well and I think it's fine to do this, but in a recent project I started using the project django-configurations which has also been pretty nice to use. It allows me to create individual python modules (common, local, staging, production, etc.), but where it's completely different is each module contains a class-based representation of the settings your'e interested in. Each non-common/base configuration (like staging) would inherit from the common class. It's quite nice in my opinion and recommend a look to see if it works for you.

EDIT: By the way, I discovered django-configurations via setting up my initial Django projects using django-cookiecutter and using the cookiecutter-django template. Take a look at their requirements files to see the load of stuff they start you off with. There's serious efficiency boosters in there that I've been using a lot lately and makes my life a bit easier once you get the hang of it all. Hope that helps!

u/cyberxndr · 2 pointsr/django

This book should help.

u/druski · 1 pointr/django

There are a few basic ways of customizing the display of form fields.

Without using outside packages

  1. Pass an attrs dictionary to the form field, ex name = forms.TextInput(attrs={'class': 'myclass',}) see here for documentation https://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs

  2. Alternately, for even more fine control you can skip using the built in form renderers, {{form.as_p}} {{form.as_table}}, and override the form template completely, see here https://docs.djangoproject.com/en/dev/topics/forms/#customizing-the-form-template

    Using 3rd party packages

  3. Crispy forms lets you do very advanced layout control, including full support for bootstrap all in python, check out https://github.com/maraujop/django-crispy-forms.

  4. Widget tweaks gives you some template tags to make overriding the indvidual templates easier, see https://github.com/kmike/django-widget-tweaks


    I recommend that you do use django forms, as they are quite easy to use and handle all of the validation for you (use required=True on each field, and you are done for the simple 'not blank' checking you mentioned). I'd start with just setting the class in the attrs dict if your needs are simple, and if you have more complex needs, check out crispy forms. I quite like that package.

    The excellent Two Scoops of Django 1.6 book covers forms quite well, if you are familiar with the basics of Django and want expert advice on best practices I highly recommend it. Available on amazon.


    Edit: actually I may have misread your post, if you are just talking about adding css to the form tag itself, that is simply as described here https://docs.djangoproject.com/en/dev/topics/forms/#displaying-a-form-using-a-template:

    <form action="/contact/" method="post" class='myclass'>
    {% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Submit" />
    </form>
u/souldeux · 1 pointr/django

Yeah, absolutely! Feel free to PM me anytime.

Also, I'd highly recommend picking up a copy of Two Scoops of Django 1.6 if you've got $35 lying around. Even though we're in 1.7 now, the info in that book is pure gold.