Re: Django on REDHAT ES

2007-01-04 Thread Adrian Holovaty
http://www.djangobook.com/en/beta/chapter14/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: RFC newforms usage

2007-01-05 Thread Adrian Holovaty
e/') else: context = {'form': form, 'error_msg': "Please correct the error(s) below"} else: context = {'form': AcademicYearForm()} return render_to_response('academic_year.html', context) Adrian -- Adrian Holovaty holovaty.

Re: RFC newforms usage

2007-01-05 Thread Adrian Holovaty
atting) Here's the code: http://dpaste.com/hold/4382/ Also, delete_academic_year() should check request.method == 'POST'. As it stands, anybody who visits that page via GET will cause deletion. Deletion should only happen via POST. Adrian -- Adrian Holovaty holovaty.co

Re: Handling bad URLs

2007-01-05 Thread Adrian Holovaty
uldn't be a good thing. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-user

Re: newforms & object save

2007-01-06 Thread Adrian Holovaty
currently naive about foreign-key values. We should improve it so that it handles foreign-key values properly. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: License Terms

2007-01-06 Thread Adrian Holovaty
of BSD license. But what about thee code we have written? Can we sell it with our own license? Yes, you can sell it with your own license. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subs

Re: newforms and umlaut

2007-01-08 Thread Adrian Holovaty
ant to display "Überschrift" instead of Überschrift", use "Überschrift" instead of Überschrift" for the label. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are

Re: Removing SQL From Templates

2007-01-08 Thread Adrian Holovaty
attribute access in the template. The template system itself knows nothing about SQL. So, I'm not sure what you're proposing here... Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are

Re: dynamic newforms in a template

2007-01-08 Thread Adrian Holovaty
em in a template, rather than using something like {{ form.as_p }}. Pass the whole Form object to the template, not a list of Fields. Then use lookup syntax to access the field: {{ form.field_name }} Adrian -- Adrian Holovaty holovaty.com | d

Re: Django i18n How

2007-01-10 Thread Adrian Holovaty
" I'll be adding a section to that chapter about how strategies for internationalizing data. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: The order of ""Add-on applications (contrib)" section

2007-01-11 Thread Adrian Holovaty
navigation. The Django Book, on the other hand, is meant to be a more linear way of learning the whole framework, so its "contrib" chapter (http://www.djangobook.com/en/beta/chapter15/) does indeed mention Sites before Flatpages. Adrian -- Adrian Holovaty holovaty.com | djangoproject

Re: date format other than YYYY-MM-DD

2007-01-12 Thread Adrian Holovaty
On 1/12/07, Andres Luga <[EMAIL PROTECTED]> wrote: > Any idea if newforms simplifies this? Yes, newforms DateFields let you specify the input format(s). This has yet to be integrated into the Django admin, but it will be sooner rather than later. Adrian -- Adrian Holovaty hol

Re: Geocoding in contrib admin

2007-01-16 Thread Adrian Holovaty
when clicked, would do the geocoding server-side and populate the long/lat fields with the result. You can do this by hooking into the admin site with JavaScript (the "js" option to "class Admin") or by overriding the template for that particular admin page. Adrian -- Ad

Re: CheckboxSelectMultiple widget

2007-01-16 Thread Adrian Holovaty
ode.djangoproject.com/ticket/3312 Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: Initialize _big_ form

2007-01-16 Thread Adrian Holovaty
tions for improvement are welcome! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: subclassing in newforms

2007-01-17 Thread Adrian Holovaty
ields in the same way. But you're not the first person who's tried to do this, so there's something intuitive about just subclassing a form and specifying some more fields as class attributes... Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~--

Re: anyone got Django running on Redhat ES in production?

2007-01-17 Thread Adrian Holovaty
;m not sure whether they're still using ES for everything, but it certainly works well with Django, if that's what you're asking. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you ar

Re: newforms validation

2007-01-17 Thread Adrian Holovaty
e form library itself knows nothing about request objects. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Stephane += Aspen 0.7 (Python webserver)

2007-01-17 Thread Adrian Holovaty
oduction, but it looks promising. However, it's super inelegant to require a Django project to be called "stephane" in order to use it with Stephane. Surely you could remove that requirement somehow? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~--

Re: newforms validation

2007-01-17 Thread Adrian Holovaty
nt know about its' form so how does this help my Field.clean(self, value) validator? With respect, I think you should wait until the library is fully documented. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this me

Re: Stephane += Aspen 0.7 (Python webserver)

2007-01-19 Thread Adrian Holovaty
http://code.google.com/p/aspen-commons/wiki/Stephane Does this address the issue? Looks much better! Good work. :-) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: SSL and Django ?

2007-01-21 Thread Adrian Holovaty
ages, except pages which are using render_to_response. > > Is it because of render_to_response ? Or some apache configuration ? It's because of Apache configuration. There's nothing in render_to_response that would have any effect on SSL. Adrian -- Adrian Holovat

Re: newforms: max_length or maxlength

2007-01-22 Thread Adrian Holovaty
th > too? Hi Michel, The newforms.CharField class intentionally uses max_length rather than maxlength. We'll eventually be changing the model field syntax to use max_length rather than maxlength, so this was a futureproofing decision. Adrian -- Adrian Holovaty holo

Re: dot asp files in wiki

2007-01-22 Thread Adrian Holovaty
On 1/22/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > on this page of the wiki: > http://code.djangoproject.com/wiki/AJAX > > i see something that looks like asp and vb files ... do they belong > here? I've removed them. Thanks for the heads-up. Adrian -- Ad

Re: UnicodeDecodeError with labels of choices (for newforms.ChoiceField with RadioSelect widget)

2007-01-23 Thread Adrian Holovaty
ary expects Unicode strings. If this indeed is the problem, one solution would be to change django/newforms/fields.py to wrap every occurrence of gettext() in smart_unicode(), like so: smart_unicode(gettext(u'Some characters')) Would you be willing to test this out in you

Re: dynamic form with newforms

2007-01-23 Thread Adrian Holovaty
the self.fields dictionary. Judging by what you said about your lack of Python experience, my advice would be for you to wait until we've got documentation on building forms dynamically. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~

Re: Sites crashing after moving to 4431

2007-01-26 Thread Adrian Holovaty
with the changes made to the Django repository. This is always a risk when you make local changes to your copy of the Django framework. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subs

Re: OT: .pystartup

2007-01-28 Thread Adrian Holovaty
istory entries) and I have to paste it manually. Can I make > manage.py read the file? Hi Baurzhan, The "manage.py shell" command doesn't take into account your .pystartup file, but that would be a nice improvement if it would. If you could figure out how to make that happen and

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread Adrian Holovaty
On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > C'mon guys... anyone? Hey there, Please don't "bump" your threads like this -- it's unacceptable mailing-list behavior. Adrian -- Adrian Holovat

Re: fiter for week

2007-01-30 Thread Adrian Holovaty
On 1/30/07, Rob Slotboom <[EMAIL PROTECTED]> wrote: > Before re-inventing, I want to ask if there is some build-in for > getting objects for [a || this] week. > > Something like: > > objects.filter(pubdate__week=now.week) Hi Rob, That database lookup type doesn'

Re: New Forms + Validation

2007-02-01 Thread Adrian Holovaty
You can either implement a custom Field class *or* implement a clean_* method. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To p

Re: Newforms usage and documentation

2007-02-05 Thread Adrian Holovaty
is here: http://www.djangoproject.com/documentation/newforms/ I can't vouch for any non-djangoproject.com documentation, or anything posted on our wiki (code.djangoproject.com). In those cases, the docs may or may not be correct. Adrian -- Adrian Holovaty holovaty.com

Re: create_object(follow) what is parameter follow?

2007-02-05 Thread Adrian Holovaty
On 2/4/07, James Bennett <[EMAIL PROTECTED]> wrote: > Its existence has always been a bit of a hack, and I'm hoping newforms > will get rid of it once and for all. Yes, "follow" is going away, and good riddance. Adrian -- Adrian Holovaty holov

Re: Forms inheritance

2007-02-05 Thread Adrian Holovaty
to do as Honza suggested, but in the long term, you'll be able to subclass forms and add fields declaratively. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: Using __str__ with DateField

2007-02-10 Thread Adrian Holovaty
On 2/10/07, Andrew Diederich <[EMAIL PROTECTED]> wrote: > Is there an easy way to munge the return self.end_date into a string? This is a Python requirement -- __str__() methods must return a string. To fix the problem, wrap self.end_date in str(), like so: return str(self.end_date

Re: Clone DjangoBook.com -- Open book platform beta release

2007-02-11 Thread Adrian Holovaty
cool. Thanks, Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com

Re: Preliminary or draft Django Book as PDF?

2007-02-13 Thread Adrian Holovaty
m the site. > > Do the authors have something of the sort somewhere? Not yet, but stay tuned. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: load comments

2006-05-03 Thread Adrian Holovaty
d-on; we'd rather not force the installation of those database tables for every Django user, so it's up to you to opt into installing it. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you a

Re: get parameters in template

2006-05-04 Thread Adrian Holovaty
u couldn't pass in " request.GET" in > that dict. That wouldn't work, because you pass the argument in the URLconf, and the URLconf doesn't have access to request objects. The solution here is either the global TEMPLATE_CONTEXT_PROCESSORS setting or the "context_

Re: Suggestions wanted for keeping place in admin

2006-05-04 Thread Adrian Holovaty
vailable for this that I've missed? I haven't seen any patches that add this functionality. Here are a couple of stop-gap solutions: * She could bookmark the filtered change-list page and return to it after editing the object. * From the filtered change-list page, she could open the

Re: auth templates in the wrong directory in trunk?

2006-05-04 Thread Adrian Holovaty
e this by setting them in my settings.py > file, or are they in different namespaces? That constant is in a different namespace. (Python loves namespaces, which is one of its best features!) You can't change it cleanly without editing the file. Now that you mention it, though, we should make t

Re: _post_save() problem with an empty file field

2006-05-04 Thread Adrian Holovaty
een set. If it's been set, then do the image resizing, etc. If it hasn't been set yet, it's the first time through _post_save() and you shouldn't do anything. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You re

Re: Admin Functionality Enhancement

2006-05-06 Thread Adrian Holovaty
ault template in django/contrib/admin/templates/admin/index.html. Hope this helps, Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Admin "Page not found"

2006-05-06 Thread Adrian Holovaty
ule_name" to the > class Meta. But, in the django latest development version (the svn > one), the "module_name" attribute does not exist anymore. If you can add an object successfully but get a 404 error on the change form, perhaps your user account has "add&quo

Re: TTW templates?

2006-05-08 Thread Adrian Holovaty
already been done: https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/file/stuff/trunk/dbtemplate/loader.py Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Template Tags in MR

2006-05-09 Thread Adrian Holovaty
> @register.filter > def bash_special(value): > value = value.replace('[00;34m', '') > return value > - > > Not quite sure what I'm missing here... Hi Tom, I can't recreate your problem; it works

Re: Manager overriding error

2006-05-09 Thread Adrian Holovaty
On 5/9/06, Kevin <[EMAIL PROTECTED]> wrote: > I ran into this problem as well. The issue is that super() expects the > child class not the parent class (the documentation is wrong), Ah, thanks for pointing this out! I've corrected the docs. Adrian -- Adrian Holo

Re: DSN useful for database settings?

2006-05-09 Thread Adrian Holovaty
improvements to the framework, shall we? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: adding stored procedures / postgres functions to db?

2006-05-10 Thread Adrian Holovaty
the sql/ directory. Is there something similar I can do for > functions? Hi Mikah, Those .sql files that you put in the sql/ directory can contain arbitrary SQL, including CREATE FUNCTION statements. So go right ahead and put your function(s) in there. Adrian -- Adrian Holovaty holova

Re: Best practice for separating Model and Control?

2006-05-11 Thread Adrian Holovaty
all data and logic about that type of object; this way, everything model-related lives in one place. As you point out, this means sometimes models have a lot of methods, but I don't see how that's a problem in practice. Does this answer your question? Adrian -- Adrian Holovaty holovaty.

Re: Flatpages shows "FlatPage object" instead of friendly name

2006-05-11 Thread Adrian Holovaty
a wrapper > around the object and use a def __repr__(self) to take care of this, > but just wondering... I've fixed this for both the FlatPage and Site models. Thanks for bringing it up! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~--

Re: Django without database

2006-05-12 Thread Adrian Holovaty
s we made in the magic-removal branch, which is now the new development version. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Django without database

2006-05-12 Thread Adrian Holovaty
letter from yourself in the mail, don't send yourself a letter in the mail. :) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Accessing an element in a list inside a dictionary

2006-05-16 Thread Adrian Holovaty
e trick: {% for prov in provs.items %} {{ prov.0 }} {{ prov.1.0 }} {{ prov.1.1 }} {% endfor %} Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Transactions and model.save()

2006-05-16 Thread Adrian Holovaty
e; it'd be better to do "UPDATE choices SET votes=votes+1 WHERE id=X", which would always increment rather than setting the value directly. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message b

Re: Having problems with inspectdb / introspection

2006-05-17 Thread Adrian Holovaty
4.1.19 and MySQLDB-python 1.2.1-p2 Hi Josh, I tried that CREATE TABLE statement in my MySQL database (version 4.1.12), and it gave me the following error: ERROR 1005 (HY000): Can't create table './myproject/registrant.frm' (errno: 150) I removed the "ENGINE=InnoDB DEFAULT CHARS

Re: Getting just the IDs?

2006-05-19 Thread Adrian Holovaty
djangoproject.com/documentation/0_91/db_api/#get-values-kwargs For the current trunk (post-magic-removal): http://www.djangoproject.com/documentation/db_api/#values-fields To answer your other question, yes, get_list() fully loads objects into memory. Adrian -- Adrian Holovaty holovaty.com |

Re: Trying to use ado_mssql on MR to no success

2006-05-21 Thread Adrian Holovaty
there is at least one patch in the Django ticket system (code.djangoproject.com) for SQL-Server support. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: How to add a superuser?

2006-05-21 Thread Adrian Holovaty
On 5/20/06, favo <[EMAIL PROTECTED]> wrote: I know there's createsuperuser in old django, however how to now? See the "Creating superusers" section of the documentation: http://www.djangoproject.com/documentation/authentication/#creating-superusers Adrian -- Adrian

Re: remedial django - what IS a "site" exactly?

2006-05-22 Thread Adrian Holovaty
n't been able to figure out how "site ID" ends up factoring into things. Hey David, I've added documentation about the "sites" mini framework. http://www.djangoproject.com/documentation/sites/ Let me know if it doesn't make sense... Ad

Re: mod_python and admin css suggestion?

2006-05-22 Thread Adrian Holovaty
d.conf? > > Alias /media > /your/path/to/python/lib/python2.4/site-packages/django/contrib/admin/media Yeah, I've started doing that, too. We might as well mention that alternative in the documentation -- good point! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--

Re: Development Admin Date

2006-05-22 Thread Adrian Holovaty
it for the > development server? Sounds like a problem on your server. Are you sure your system date is set correctly? Are your development and Apache servers running on the same OS on the same machine? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~--

Re: remedial django - what IS a "site" exactly?

2006-05-23 Thread Adrian Holovaty
xed the docs. Should be live on the site within 15 minutes. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Function caching

2006-05-23 Thread Adrian Holovaty
7) cache.set(cache_key, val, 60) # Save in cache for 60 seconds. return val See http://www.djangoproject.com/documentation/cache/#the-low-level-cache-api for documentation. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~

Re: Searching on a calculated value

2006-05-23 Thread Adrian Holovaty
em. I'm assuming you want your users to be able to enter a full name in a single text box, right? In that case, just split the input by spaces and assume the first string is the first_name and the second string is the last_name. (Of course, you'd want some error correction in there to

Re: thanks for the BadContent

2006-05-24 Thread Adrian Holovaty
On 5/23/06, pbx <[EMAIL PROTECTED]> wrote: > Just wanted to offer my thanks to Adrian (and anybody else who worked > on this) for adding some spam defense to the Trac server. For those of > us who check the timeline often, it's a big relief. Hey, it's my pleasure. The s

Re: is_active isn't honored by django.contrib.auth.views.login()

2006-05-24 Thread Adrian Holovaty
l there's no place in the bug > database for contrib stuff. Hey David, Go ahead and log that bug under "Core". Don't let the lack of an appropriate category prevent you from filing helpful tickets! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~

Re: Unhappy, reinventing

2006-05-24 Thread Adrian Holovaty
It's just my 2 cents, but, hell, I really really really dislike the > current choices. > > Oh and the comments are moderated due to spam. And I'm sleepy. So > it'll take some time for them to show up. Cheer up, Elver! Life's too short. :

Re: Searching on a calculated value

2006-05-25 Thread Adrian Holovaty
ot very difficult to implement, unless you want to let your users put phrases in double quotes, which can be a pain to parse. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: New Django manage.py bugs

2006-05-25 Thread Adrian Holovaty
" does the same thing but better. Even so, if you need to install the Django contrib apps specifically, you can do "django-admin install admin", "django-admin install contenttypes", etc. Easy as pie. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~

Re: How do I send an HttpRequest using the framework?

2006-05-29 Thread Adrian Holovaty
is most appropriate for you to use. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Wiki or Blogs done with django

2006-05-30 Thread Adrian Holovaty
en ported to magic-removal. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@

Re: Why is sqlall outputting INTEGER instead of SERIAL?

2006-05-30 Thread Adrian Holovaty
7;m using Postgres. This is a Postgres feature. "serial" isn't actually a data type -- it's a shortcut for an auto-incrementing INTEGER field. http://www.postgresql.org/docs/8.1/static/datatype.html#DATATYPE-SERIAL Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~-

Re: QuerySet._combine loses where clause

2006-05-31 Thread Adrian Holovaty
returns that. > > Has anyone else had a problem with this, or could suggest a solution ? > > I've filled a ticket about it here: > http://code.djangoproject.com/ticket/2038 Hey Graham, I've checked in that patch and closed the ticket. Thank you for repor

Re: Tutorial Repo

2006-05-31 Thread Adrian Holovaty
lize it's a case > of re-inventing the wheel but it'd be a better wheel. Hey Noah, Thanks for the comments. Actually, what you described is precisely the plan for upgrading the tutorial. Stay tuned! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~

Re: Improper quoting using extra() in Postgres

2006-05-31 Thread Adrian Holovaty
#x27;m missing? Hey Scott, As of just now, this is fixed in the latest Django development version (trunk). "svn update" your code, and Django will no longer quote "nlevel(hierarchy)". Thanks for the report! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~--

Re: update_object and preserving fields

2006-06-02 Thread Adrian Holovaty
On 6/2/06, Michael Radziej <[EMAIL PROTECTED]> wrote: > If Adrian/Jacob/Luke/etc. is listening: Would you accept patches that provide > docstrings for > classes and methods within the Django internals? It would help a lot in > understanding > what's happening in

Re: close connections and restart django?

2006-06-02 Thread Adrian Holovaty
from django.db import connection connection.close() This assumes you're using the development version. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

Re: freecomments not displaying after magic-removal

2006-06-03 Thread Adrian Holovaty
ments and > contenttypes- maybe that will help you check if that's the problem? Yeah, Django looks at the contenttypes table to hook into comments, so make sure what you're putting in the {% get_free_comment_list %} template tag matches what you have in th

Re: Upgrading to Magic-Removal

2006-06-05 Thread Adrian Holovaty
t replace the "django" directory with the new one. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Django developers wanted (London, England)

2006-06-05 Thread Adrian Holovaty
On 6/4/06, Richard Cooper <[EMAIL PROTECTED]> wrote: > I hope job openings are acceptable on this list. I can't see anything > to suggest they aren't. Just for the record: Job openings are perfectly acceptable on the list. Best of luck filling your position. Adria

Re: Log file analyze

2006-06-05 Thread Adrian Holovaty
n file, not in Django. See the Apache LogFormat directive: http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#logformat Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Change cols and row in generic update page textarea

2006-06-06 Thread Adrian Holovaty
t gets an ID in its HTML, which you can target that via a CSS rule. If your field is called "foo", the ID will be "id_foo", and you can target it with this CSS: #id_foo { width: 300px; height: 200px; } Adrian -

Re: Easy way to access extra User stuff in templates?

2006-06-06 Thread Adrian Holovaty
gt; > in the template, but this doesn't work because userinfo is actually > userinfo_set and I'd need to get the first element of that. I don't > think that's possible in the templating language, but I'd be happy to > be wrong. Get happy! :) {{ user.userinfo_

Re: Easy way to access extra User stuff in templates?

2006-06-06 Thread Adrian Holovaty
> line I had missed about list lookup. (Actually, to slightly > complicate things, I tried user.userinfo_set[0].formalName first, but > that's another story.) No problem at all, Todd. A template context processor would be another way to do it. Slightly cleaner, if you don't like the

Re: FileFields, MEDIA_ROOT, and private media

2006-06-06 Thread Adrian Holovaty
t; setup, but lock down that subdirectory of MEDIA_ROOT in the > webserver's configuration? Something else? Are you using the Django admin for the file uploads? If not, you can just write your own views that upload the data to a place of your choosing. You'd be dealing with request

Re: Django Article on Developerworks

2006-06-06 Thread Adrian Holovaty
me via email and I will > see if I can get them fixed. Sweet! One thing I noticed is that the article should encourage the use of __str__(), not __repr__(), on models. This is something we changed in magic-removal. Adrian -- Adrian Holovaty

Harness our collective opinions -- Digg Django

2006-06-06 Thread Adrian Holovaty
Hey everybody, The IBM Developer Works article about Django is a good opportunity to get us some more exposure. If you have a Digg account (digg.com), Digg it! http://digg.com/programming/Develop_for_the_Web_with_Python_Django_Web_Framework Adrian -- Adrian Holovaty holovaty.com

Re: Backing HTML 'Compnents'

2006-06-06 Thread Adrian Holovaty
27;cart': cart, 'recent_items': recent_items}). Sounds like the perfect use case for a custom template tag via the "inclusion tag" helper. http://www.djangoproject.com/documentation/templates_python/#inclusion-tags Adrian -- Adrian Holovaty holovaty.com | djangoproject.com

Re: syncdb capabilities

2006-06-06 Thread Adrian Holovaty
tion/faq/#if-i-make-changes-to-a-model-how-do-i-update-the-database Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: I think I'm doing something wrong...

2006-06-06 Thread Adrian Holovaty
27;s CommonMiddleware is automatically adding the slash (according to the APPEND_SLASH setting), and POST data isn't transferred in redirects. Point the form action at /make/ (with the trailing slash) and your problem should be solved. Adrian -- Adrian Holovaty holovaty.com | djangoproject.co

Re: Log file analyze

2006-06-06 Thread Adrian Holovaty
ction sites, so adding that functionality isn't within the scope of this project. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Weird behaviour

2006-06-07 Thread Adrian Holovaty
#x27;t expect this behaviour from Django either. > > So, this a bug or a feature? And how can I turn it off? Turn it off with the SESSION_EXPIRE_AT_BROWSER_CLOSE setting. http://www.djangoproject.com/documentation/sessions/#browser-length-sessions-vs-persistent-sessions Adrian -- Adrian Ho

Re: Weird behaviour

2006-06-07 Thread Adrian Holovaty
easily write a middleware class that works like Django's SessionMiddleware but saves its session data in memory. You could also check out the patch here: http://code.djangoproject.com/ticket/2066 Hope this helps, Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~-

Re: Weird behaviour

2006-06-07 Thread Adrian Holovaty
these two commands in a shell script and off you go: python -c 'from django.contrib.sessions.models import Session; \ Session.objects.all().delete()' python manage.py runserver Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~---

Re: Reset all apps?

2006-06-08 Thread Adrian Holovaty
ou have nothing else in your database, you may as well just drop your database, create it again and run "syncdb". Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Django Article on Developerworks

2006-06-08 Thread Adrian Holovaty
ils.httpwrappers import HttpResponse ...should be: from django.http import HttpResponse I found this error via http://steffenoschatz.blogspot.com/2006/06/django-namespace-simplification.html . Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~--

Re: Extending admin?

2006-06-09 Thread Adrian Holovaty
s to make custom admin widgets for various things. This would have the benefit of integrating with the existing admin infrastructure, at the expense of JavaScript complexity. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this

Re: Whitespace in posts

2006-06-09 Thread Adrian Holovaty
it enter a few times, then type more > and have the blank space between the lines. Hi elake, You'll want to convert your data on output. For example, use either the "linebreaks" or "linebreaksbr" filter in your templates. Adrian

Re: Presenting information from an external system

2006-06-09 Thread Adrian Holovaty
ependent of Web requests, that grabs the XML and formats it once a minute. Then just point Django at that already-formatted data and present it. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~ You received this message because

<    1   2   3   4   5   6   7   8   9   10   >