Profile

Achievement

first submission:submitting first snipplet popular snippet:having a snipplet with 20 favorites

magicrebirth's Recent Snippets



check the original blogpost for more how-to examples
0 1840 posted 15 years ago by magicrebirth
This will extend jquery to have a :Contains selector that is case insensitive, the :contains selector remains unchanged.
0 1528 posted 15 years ago by magicrebirth
0 1356 posted 15 years ago by magicrebirth
0 1380 posted 15 years ago by magicrebirth
Dictionaries cant be sorted, so you need to transform it into a list and sort that one!
0 1173 posted 15 years ago by magicrebirth
Turning a dictionary into a list or an iterator is easy. To get a list of keys, you can just cast the dict into a list. It's cleaner, though to call .keys() on the dictionary to get a list of the keys, or .iterkeys() to get an iterator. Similarly, yo...
0 1327 posted 15 years ago by magicrebirth
ElementTree is provided as part of the standard Python libs. ElementTree is pure python, and cElementTree is the faster C implementation: Here's an example usage, where I'm consuming xml from a RESTful web service:
0 1166 posted 16 years ago by magicrebirth
1 1179 posted 16 years ago by magicrebirth
checks who tagged a given url on delicious
0 1229 posted 16 years ago by magicrebirth
1 1043 posted 16 years ago by magicrebirth
1 1398 posted 16 years ago by magicrebirth
Now that you have set up your ManyToManyField to use your intermediary model (Membership, in this case), you're ready to start creating some many-to-many relationships. You do this by creating instances of the intermediate model:
0 1600 posted 16 years ago by magicrebirth
0 1492 posted 16 years ago by magicrebirth
0 1635 posted 16 years ago by magicrebirth