Changes between Version 72 and Version 73 of IrcFAQ
- Timestamp:
- May 2, 2008, 11:27:30 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IrcFAQ
v72 v73 76 76 `null=True` means that the database will accept a `NULL` value for that field; `blank=True` means that Django's validation system won't complain about a missing value. If you use `blank=True` but ''not'' `null=True` you will need to have your code fill in a value before storage in the database -- specifying a default on a field, or putting something in the model's `save` method to generate a value are two good ways to handle this, and can be extremely useful when you want to calculate one field's value based on others. 77 77 78 == Which runs faster, X or Y? == #WhichIsFaster 79 80 This is a tempting question to answer in hopes of getting a quick answer on the "best" way to do something. Unfortunately, the answer is generally "profile your app and see". Performance tuning always starts with a baseline. If you haven't measured current performance to get a baseline, you aren't in a position to do much with the answer to the question anyway. 81 82 You can learn more about Python's handy profiling tools in the [http://docs.python.org/lib/profile.html Python documentation]. 78 83 79 84 = How to do Stuff = #HowTo