Re: Returning a 503 response instead of a 500 response

2011-06-23 Thread Steven L Smith
Neat. I've been doing Django since the 0.9.6 days and have never written a middleware. I guess there's a first time for everything. Thanks! Steven L Smith, Web Developer Department of Information Technology Services Nazareth College of Rochester 585-389-2085

Returning a 503 response instead of a 500 response

2011-06-23 Thread Steven L Smith
ing to patch the actual django database backend code itself. ============ Steven L Smith, Web Developer Department of Information Technology Services Nazareth College of Rochester 585-389-2085 | ssmit...@naz.edu | KC2YTC http://www.naz.edu/pub/~ssmith46

Re: GET vs POST for read-only views

2011-06-14 Thread Steven L Smith
and such should always use GET, unless there's a truly compelling reason not to. POST should only be used for things that change stuff on the server... a contact form, a form that creates something in a database, etc... Cheers! -Steve Steven L Smith, Web

Re: code 128 or code 39 barcode generation

2011-04-18 Thread Steven L Smith
There's a great wrapper you can use to generate these in PIL using a postscript library. http://pypi.python.org/pypi/elaphe/ I did something similar with pyqrnative to generate QR Codes for a conference, basically just create a URL that wraps the output of the library in an HTTPResponse. On

How to create multi-leveled forms with freeform entry options

2011-01-20 Thread Steven L Smith
to have a "sub question" model that lets the admin users specify a label and field type, but then, where do I save the *answers* to the sub-questions? What's the most Djangonic / Pythonic way to do this type of thing? It seems like the kind of problem someone might have faced before.

Connecting to Multiple MSSQL Databases... I've hit an edge case. Help, please!

2010-10-25 Thread Steven L Smith
For one of our apps, I'm using django-pyodbc to connect to an MS SQL 2005 database (not my choice...) This database contains, among other things, rows for the Person model. I've written a function to connect to "Lenel", an access-card system used by our campus security department, which pulls the

Customizing the login generic view with a custom backend

2010-09-02 Thread Steven L Smith
I've written a custom backend for Django auth to hook into our Active Directory. It works great, but some users can't seem to figure out that "username" does not equal "email address". Since our AD is kind of borked, multiple users *might* have the same email addresses, so simply changing it to

Specifying column names for ManyToMany fields

2010-08-05 Thread Steven L Smith
n our naming schemes? Thanks! ============ Steven L Smith, Web Developer Department of Information Technology Services Nazareth College of Rochester 585-389-2085 | ssmit...@naz.edu http://www.naz.edu/pub/~ssmith46 -- You received this message because yo

re: i can't import newforms(newbie)

2010-06-08 Thread Steven L Smith
ransition was complete, you could simply change "import newforms as forms" to "import forms" and it would continue working. So, yes, anytime you see "import newforms as forms" it is safe to replace it with "import forms".

Re: Using array of URLs for MEDIA_URL

2010-06-08 Thread Steven L Smith
', 'site3.example.com'] return choice(media_urls) register.simple_tag(media_url) in some template -- {% load random_media %} {% media_url %} Steven L Smith, Web Developer Department of Information Technology Services Nazareth College

Re: Using array of URLs for MEDIA_URL

2010-06-08 Thread Steven L Smith
template -- {% load random_media %} {% media_url %} Steven L Smith, Web Developer Department of Information Technology Services Nazareth College of Rochester 585-389-2085 | ssmit...@naz.edu http://www.naz.edu/pub/~ssmith46

Re: Using array of URLs for MEDIA_URL

2010-06-07 Thread Steven L Smith
L': choice(MEDIA_URLS)} Then, in settings.py, include your custom context processor instead of the one built-in to to Django. -Steve ======== Steven L Smith, Web Developer Department of Information Technology Services Nazareth College of Rochester 585-389-2085 | ssmit.

UnicodeDecodeError Solution?

2010-03-19 Thread Steven L Smith
Some kind of way to replace weird characters with a bright pink blinking exclamation point? Something else? Thanks! Steven L Smith Web Developer Nazareth College of Rochester http://www.naz.edu/ -- You received this message because you are subscribed to the Google Groups "Django users&