Re: Shopping cart paradigm in Django?

2005-10-08 Thread Adrian Holovaty
ased on a lot of data and > user interaction before getting the final end result, with the chance > to back out and redo, etc. Hey Fried Egg, Check out the sessions documentation: http://www.djangoproject.com/documentation/sessions/ We should have some other example apps (besides the p

Re: meta.OneToOneField() problemo

2005-10-08 Thread Adrian Holovaty
s out the other database wrappers (Postgres and SQLite) don't mind if you pass an integer value to autocommit(), so I've added that to the code in revision 805. Thanks again for the heads-up on this! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Proper use of db_column attribute for fields

2005-10-11 Thread Adrian Holovaty
me to do this. > > This doesn't seem to work though and the resulting object's attribute > names are actually those of the database columns and not the field > names I've specified in the class. Is this a bug? Not a bug -- the object's attributes are mapped to the

Re: help with admin screens and many2many model

2005-10-11 Thread Adrian Holovaty
UI is capable of this; if it is then what > do i have to do to my model? if it isn't then does anyone have any ideas > about where to start? Hey Ranting Hippy, The current admin UI isn't capable of this. The many-to-many has to be either in one or the other. Adrian -- Adrian Holo

Re: More Installation/Deployment Linkage

2005-10-12 Thread Adrian Holovaty
x27;server arrangements' wiki page? > http://code.djangoproject.com/wiki/ServerArrangements Great idea. I've added the link. http://www.djangoproject.com/documentation/install/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: LIST[object.attribute] lookup in template

2005-10-12 Thread Adrian Holovaty
he slippery slope of turning the template language into a programming language. In your case, pass ITEM_NAMES[item.type] to the template context. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Middleware Old-Style Classes

2005-10-13 Thread Adrian Holovaty
hout the Django code, we use new-style classes only when there's a specific need to do so -- like when we want to use properties. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: templates with multiple repeating blocks

2005-10-14 Thread Adrian Holovaty
03293554cece Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: templates with multiple repeating blocks

2005-10-14 Thread Adrian Holovaty
#x27;t assume that the template doesn't already have a variable named "content", and the double underscores are a bit crufty. Perhaps {% get_block_value "content" %} ? That's kind of verbose... Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: specifying the name of a many-to-many table

2005-10-16 Thread Adrian Holovaty
many-to-many relationship. If there's a demonstrable need, we can consider adding it, though. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: "runserver" vs. "runserver :" : a bug?

2005-10-17 Thread Adrian Holovaty
; spend lots of time in this pitfall. I've updated the docs to point this out. Thanks for bringing it up! http://www.djangoproject.com/documentation/django_admin/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Middleware Old-Style Classes

2005-10-17 Thread Adrian Holovaty
to subclass "object" in class definitions? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Tag library not found

2005-10-19 Thread Adrian Holovaty
On 10/19/05, tomass <[EMAIL PROTECTED]> wrote: > TemplateSyntaxError: 'auth.log' is not a valid tag library > [...] > Should mention that I've just upgraded to the latest version. Delete django/templatetags/*.pyc and django/templatetags/*.pyo, and let us know if

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Adrian Holovaty
On 10/20/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > great start. just two comments. why use mnemosyne as the example? why > not something more generic like "myapp" ? I had this same question: What's a mnemosyne? We should change it to "myapp". Ad

Re: Do's and Dont's for Application Writers

2005-10-20 Thread Adrian Holovaty
#x27;d even go so far as to say we could include the above base.html and base_generic.html in the Django distribution proper, to give people a starting point when creating their templates. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Error in DateFormat

2005-10-20 Thread Adrian Holovaty
.append(str(getattr(self, piece)())) > > AttributeError: DateFormat instance has no attribute 'P' Fixed as of revision 976. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Pb with Backwards-incompatible admin changes

2005-10-20 Thread Adrian Holovaty
On 10/20/05, Laurent RAHUEL <[EMAIL PROTECTED]> wrote: > THX, it was the problem. I guess this should be added to the documentation. I've updated the docs at http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges . Adrian -- Adrian Holovaty holovaty.com | dja

Re: templates for newbies

2005-10-22 Thread Adrian Holovaty
e all excited about that. :) Finally, if you just want to "redesign" the admin, feel free to create your own admin/base.html and admin/base_site.html templates. Those provide the look and feel, and CSS, for the entire admin site; i.e., that's not hard-coded. Hope this answers your questions, Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: templates for newbies

2005-10-22 Thread Adrian Holovaty
e django stuff (as it seems). Would you > think the new-admin branch is mature enough to be used instead of the > trunk? I've never used the new-admin branch myself, so I can't vouch for its stability or maturity. It's completely unofficial (and under heavy development) at this point. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: approaches to deployment

2005-10-22 Thread Adrian Holovaty
s or whatever) is executed manually in a transaction. As World Online deals with different versions of Django apps on different servers, Jacob has been talking about creating a "versioning" subframework for apps, which would manage things so that they don't get out of sync. Adri

Re: Apps and 'subapps', or how closely to couple parts of a site

2005-10-22 Thread Adrian Holovaty
s and changing a couple of import statements. I realize this doesn't give you a definitive answer, but I hope it helps somehow. :) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Tag library not found

2005-10-22 Thread Adrian Holovaty
On 10/22/05, Dan Lipsitt <[EMAIL PROTECTED]> wrote: > TemplateSyntaxError: 'log' is not a valid tag library > [...] > I just upgraded to rev 992. I deleted the old egg first, and I also > tried removing the .pyc files as Adrian described (there were no > .p

Re: Searching items with (ManyToMany+something else) relations

2005-10-23 Thread Adrian Holovaty
rants.get_list(city__id__exact=n, categories__contain=category) Hey Pistahh, Try this: restaurants.get_list(city__id__exact=n, categories__id__exact=3) (Assuming you want category 3.) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: auth_messages

2005-10-24 Thread Adrian Holovaty
ion, which doesn't yet mention how messages work, is here: http://www.djangoproject.com/documentation/authentication/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Is admin completely separated from middleware?

2005-10-24 Thread Adrian Holovaty
ot;django.contrib.admin" needs to be in INSTALLED_APPS. * Your database needs to contain the admin table (i.e., you need to have executed "django-admin.py install admin"). Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Newbie questions

2005-10-24 Thread Adrian Holovaty
pt or process that adds correct site info in the DB -- that's a manual thing at this point. That's definitely up for discussion, though. The only reason sites aren't editable in the admin is to save people from themselves -- so they don't inadvertently delete a site, wh

Re: Admin refuses to save on an unspecified error

2005-10-24 Thread Adrian Holovaty
the millisecond (or maybe even microsecond?) level, whereas editing the date/time value via the form field is only accurate to the second. So Django things the value has changed. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Newbie questions

2005-10-25 Thread Adrian Holovaty
go is full of surprises. ;-) Yes, that's in the template. See Tutorial 2 for information on how to change that: http://www.djangoproject.com/documentation/tutorial2/#customize-the-admin-look-and-feel It's the part that begins: "Clearly, having 'Django administration' and &

Re: Custom Manipulator File Upload

2005-10-26 Thread Adrian Holovaty
;" > 2. I need to resize the image and play with it with PIL. Is it possible > to transfer the image to an image object without saving it and then > giving it's full path to load it? I haven't tested this, but PIL's Image.open() function takes any file-like object, so you might be able to pass it a StringIO proxy. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: flatpages and templates

2005-10-31 Thread Adrian Holovaty
s that don't deserve their own > actual file? It's always better to put the content in the database rather than in the template. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Problems with Admin interface and one-to-one rels

2005-10-31 Thread Adrian Holovaty
work properly with these models. I > either get errors or strange behavior. It'd be a great help if you gave details about which errors and strange behavior you got. Without that, we can't help much. :) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-10-31 Thread Adrian Holovaty
t field, but I > want to add a constraint and a default value in this way: > - default value should be "Unknown" > - "Unknown" value has not to be accepted as a valid value for that > field by the admin interface If "Unknown" values are not allowed, it seem

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-10-31 Thread Adrian Holovaty
from django.core import validators def is_not_null(field_data, all_data): if field_data in (None, ''): raise validators.ValidationError, "This field is required." # ... meta.NullBooleanField(validator_list=[is_not_null]) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-10-31 Thread Adrian Holovaty
7;s late in the > night :) Solution 1 avoids "" as a possible choice because the field doesn't have "blank=True". By default, "blank" is set to False, which means the field is required (i.e. cannot have a blank value). Hope that clears it up for ya! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: I want to start a django project for a forum

2005-10-31 Thread Adrian Holovaty
I'd be happy to help! Note that the World Online forum application (e.g. http://www2.ljworld.com/forums/) is just a light wrapper around the django.contrib.comments framework, which ships with Django. Writing a basic forum app is easy. The hard part will be integrating *all* the various features

Re: NullBooleanField & default=Unknown & Unknown not acceptable: how to do it?

2005-11-01 Thread Adrian Holovaty
On 11/1/05, James Bennett <[EMAIL PROTECTED]> wrote: > On 11/1/05, Emanuele <[EMAIL PROTECTED]> wrote: > > Now I see. So "" means blank value. I missed it in the docs. Thank > > you again!! > > No, the example Adrian provided had the tuple ('

Re: pre_save problem

2005-11-01 Thread Adrian Holovaty
rdinate items prior to being saved to database (well, it's > called pre_save, right?) in order to do some simple calculations before > the items get saved. > > Does anyone know how this could be done? A model's _pre_save() method doesn't have access to any re

Re: post_save problem

2005-11-01 Thread Adrian Holovaty
ger transaction, and no knowledge of related objects. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Catching IntegrityError?

2005-11-01 Thread Adrian Holovaty
ulates validation and form display.) See the docs here: http://www.djangoproject.com/documentation/forms/#custom-forms-and-manipulators Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: foreign key lookup problem

2005-11-01 Thread Adrian Holovaty
is "state", so here's what you'd want: items.get_list(state__state__in=['Open']) The first "state" refers to the "state" field in Item. The second refers to the "state" field in State. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: foreign key lookup problem

2005-11-01 Thread Adrian Holovaty
lso work is that removing "primary_key = True" in the State model implicitly creates an "id" field. In that case, state__id__in would be a valid lookup parameter. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Doing "OR" operation with Database API?

2005-11-02 Thread Adrian Holovaty
it! See http://code.djangoproject.com/ticket/251 for the probable replacement. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Cascade on delete?

2005-11-03 Thread Adrian Holovaty
child objects? Yes, if you use the .delete() method on model objects, child objects are deleted recursively. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: runserver problem

2005-11-03 Thread Adrian Holovaty
little unnerving. Yup, it's the same error. I'm not sure why it started happening...It didn't *use* to do this, up until a couple of weeks ago. Anybody have any ideas? Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Manipulator.save() not hitting the DB

2005-11-03 Thread Adrian Holovaty
g > them to the db? There's no way to do this in the default (automatic) Manipulators, but doing it on your own, with a custom manipulator, should be easy. Check out the docs: http://www.djangoproject.com/documentation/forms/#custom-forms-and-manipulators Adrian -- Adrian Holovaty holova

Re: Admin filter and search parameters

2005-11-03 Thread Adrian Holovaty
min change-list page after you've applied a filter or done a search. The query parameters are, essentially, the same as keyword arguments that can be passed to get_list(). Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Foreign Key lookups in Both Directions

2005-11-03 Thread Adrian Holovaty
urse. If you're concerned with efficiency, you can write the SQL manually. See the example here: http://www.djangoproject.com/documentation/models/custom_methods/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Admin filter and search parameters

2005-11-03 Thread Adrian Holovaty
t_list(). > > > Ok, I get that. But, can I load those applied parameters in my code or > in my models? Yes, just use those keyword arguments to get_list() in your own code. I'm not sure I understand what you mean...Hope this answers your question. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: about i18n question

2005-11-04 Thread Adrian Holovaty
On 11/4/05, limodou <[EMAIL PROTECTED]> wrote: > I found that the zh_CN translation option should be "Simplified > Chinese", but not "Traditional Chinese" in the global_settings.py in > conf directory。 Fixed! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: datetime, timestamp and check statements

2005-11-04 Thread Adrian Holovaty
Feel free to add the CHECK to your SQL manually. django-admin.py sqlall myapp > myapp.sql vim myapp.sql # add the CHECK cat myapp.sql | sqlite # pipe the SQL into SQLite, however that's done Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Using API to bulk populate data

2005-11-04 Thread Adrian Holovaty
x27;s "COPY" statement. If you're not worried about efficiency, just use the API to insert one record at a time. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: datetime, timestamp and check statements

2005-11-04 Thread Adrian Holovaty
d found something about > including .sql files in a sql folder in the project directory. I guess > the alter table statement could be included here. I am assuming the > sql from the install gets loaded after the tables are created. Yes, the SQL from the install gets loaded after the tab

Re: getting currently logged-in user

2005-11-04 Thread Adrian Holovaty
cept of Web applications. As of now, there's no way to specify that the currently logged-in user should be stored in a field in the admin interface. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: question / suggestion for one to many fields

2005-11-05 Thread Adrian Holovaty
n next to select boxes (for foreign-key fields), which lets you add a foreign-key object. This appears on the add and change forms. The catch is that the foreign-key object needs to have "admin" set in its model, and the currently-logged-in admin user needs to have permission to add

Re: how do I tell the admin interface to do lookups with select_related?

2005-11-05 Thread Adrian Holovaty
select_related=True to its query on the "change list" page if the list_display includes a ForeignKey field. As you noted, though, using a custom method ("get_owner_fullname") doesn't tell Django that you're using a ForeignKey. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: django-admin not seeing settings.py

2005-11-07 Thread Adrian Holovaty
fference. Any > suggestions? Django isn't finding your settings.py file. It's falling back to "postgresql" because that's the default fallback (according to the file django/conf/global_settings.py). Make sure your "myproject" directory is on the PYTHONPATH. You should be able to switch to another, unrelated directory -- such as "/temp/" -- start the Python interactive interpreter and type "import myproject.settings". Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Editing inline object individually

2005-11-07 Thread Adrian Holovaty
quot; of edit_inline is supported. It's not possible for edit_inline to span more than one level. However, this should be changing soon, with the new-admin code branch, which is currently being developed. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: edit_inline and collapse

2005-11-08 Thread Adrian Holovaty
On 11/8/05, wrb <[EMAIL PROTECTED]> wrote: > Does (or should) the edit_inline functionality for related class also > support collapse option? No, objects that are edited inline don't support the "collapse" option. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: SQL 'group by' and 'having'?

2005-11-08 Thread Adrian Holovaty
and HAVING. In your case, I'd suggest writing custom SQL, which is very easy in Django. Check out this example: http://www.djangoproject.com/documentation/models/custom_methods/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: multiple object form?

2005-11-08 Thread Adrian Holovaty
i = 0 > %}, but that gave me an "invalid block tag" error. Check out {{ forloop.counter }} or {{ forloop.counter0 }} (zero-based). Those variables are automatically available to you within any {% for %} loop. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Dictionary keys in templates

2005-11-09 Thread Adrian Holovaty
value in dictionary.items() That should work, exactly as stated. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Important change: flatpages and redirects refactored into standalone/optional apps

2005-11-10 Thread Adrian Holovaty
nd to this thread if you have any questions! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Important change: flatpages and redirects refactored into standalone/optional apps

2005-11-11 Thread Adrian Holovaty
On 11/11/05, Maniac <[EMAIL PROTECTED]> wrote: > Looks like there are no links to these docs from the documentation index > (http://www.djangoproject.com/documentation/). > > I would look for them in the 'Available subframeworks' section. Thanks, Maniac. I&#

Re: templates for CSV

2005-11-11 Thread Adrian Holovaty
be done? Hi stava, I've written documentation for you. Check it out here: http://www.djangoproject.com/documentation/outputting_csv/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: templates for CSV

2005-11-11 Thread Adrian Holovaty
On 11/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Doesn't your template based approach require the model to do some > formatting of the output before passing to the template to get the > quotes in the right place? No...I'm not quite sure what you mean. A

Re: Django Hosting

2005-11-11 Thread Adrian Holovaty
On 11/10/05, Pablo Pernot <[EMAIL PROTECTED]> wrote: > somebody knows a good (and cheap) django hosting provider ? Check out http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts . Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

ANN: New syndication-feed framework (RSS and Atom)

2005-11-11 Thread Adrian Holovaty
smael, hugo, eric moritz and garthk for various patches and ideas. Enjoy! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: problem with sessions docs?

2005-11-12 Thread Adrian Holovaty
7;ve changed the example to use "member" instead of "user," to underscore the fact that it's some random concept of "member" -- not the "users" from the authentication system. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: enforce login on generic views

2005-11-12 Thread Adrian Holovaty
-generic-views Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Uniqueness validation in custom manipulator

2005-11-13 Thread Adrian Holovaty
dation functions, but if you want to do things like checking for uniqueness, you'll have to write the validator function yourself. Hope this answers your question. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Broken site since svn update

2005-11-15 Thread Adrian Holovaty
lumn names in its queries. Basically that means they're case-sensitive now. You can fix your problem by either doing an ALTER TABLE in your database to rename the column to "DMI_id" (note capitalization), or changing your Python code to be "dmi_id". Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

"startapp" now creates views.py, not views package

2005-11-15 Thread Adrian Holovaty
te" probably won't delete the directory "django/conf/app_template/views" in your Django distribution. You'll need to delete this file manually. Otherwise, "startproject" will create both a views.py and a "views" directory, which will confuse Python. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: templates & content-elements

2005-11-16 Thread Adrian Holovaty
n the admin, then you'll want to create a "page" model, which has foreign keys to the types of content it's displaying, a field for the URL, and fields representing the order. This is a bit hard to explain, but I hope this has helped. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: OneToOne relations broken (#527), any workarounds ?

2005-11-16 Thread Adrian Holovaty
his on my to-do list for this week. You're right -- it should be a high-priority fix. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: FileUploadField bug?

2005-11-16 Thread Adrian Holovaty
at stuff, and we'll be able to help you! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: svn up, admin has stopped working

2005-11-16 Thread Adrian Holovaty
On 11/16/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > I did an svn up last night and now the admin interface doesn't work. > Here is the error I'm getting: Hey Bryan, Are you using the new-admin branch? I can't recreate this error using trunk. Adrian -- A

Re: mod_python, MEDIA_*, frustration

2005-11-16 Thread Adrian Holovaty
e runs under) needs permission to read your templates. > Are my MEDIA_whatevers pointing at the correct places? MEDIA_ROOT and MEDIA_URL are mainly used by FileFields, so Django knows where to put uploaded files. They're not relevant in this particular problem. Hope this helps! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: DRY templates

2005-11-17 Thread Adrian Holovaty
classes have no knowledge of model objects. All they know about is the basics for displaying a form. If you want to pass the verbose_name of a model object, you'll need to create some sort of custom data structure and pass it to your template. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Access request object in model's hooks and display methods

2005-11-17 Thread Adrian Holovaty
real applications. Yes, this is by design. Models have no knowledge of whether they're being used in a Web context, or in a shell script, or in a desktop GUI app. Coupling models to Web requests would be convenient in some cases but a bad design decision overall. Adrian -- Adria

Django and Ruby on Rails framework roundtable: Dec. 3 in Chicago

2005-11-17 Thread Adrian Holovaty
questions, etc. It should be really fun. Full information is here: http://snakesandrubies.com/event/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Anonymous Sessions

2005-11-18 Thread Adrian Holovaty
this will eat up memory like a zombie. Because sessions are stored in the database, this won't eat up much memory. It's an interesting idea, and I'd encourage you to explore it more and report back to the list with how it's working. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Why it doesn't work in Django

2005-11-18 Thread Adrian Holovaty
-- so you'll need to use another server, such as Apache, to serve the CSS file. Alternatively, check out the django.views.static.serve, which is for development purposes only and isn't yet documented (but will be soon). Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Validator app+middleware

2005-11-18 Thread Adrian Holovaty
t on the Web if you get a chance -- I'm sure some people could find use in it. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Template user weirdness

2005-11-19 Thread Adrian Holovaty
gt; reproducible on specific views though. Hey Afternoon, I'm not sure how much we can help unless you show us the view and template code for the case in which it doesn't work. Post that, and we'll be able to help you much better. :) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Handling large applications

2005-11-19 Thread Adrian Holovaty
s" package isn't really a big deal. You can always split models across other *apps*, rather than creating subdirectories within "models". Hope this helps! Let me know if any of it wasn't clear. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: urlpattern help

2005-11-19 Thread Adrian Holovaty
documents so that they mention this explicitly. http://www.djangoproject.com/documentation/url_dispatch/ http://www.djangoproject.com/documentation/tutorial3/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: matplotlib and django usage?

2005-11-19 Thread Adrian Holovaty
generating PDFs, which should be very similar, but > I wanted to see if others have had any success or issues. Hey Warren, This should be easy to do; just generate the appropriate output and give it the appropriate mime_type. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Connecting to database via Unix sockets

2005-11-19 Thread Adrian Holovaty
ne has done this before then I'll do it myself and submit a patch. Nobody has brought this up before, and it sounds like it's just a case of changing the MySQLdb call. Check out django/core/db/backends/mysql.py. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: ZODB Anyone ?

2005-11-19 Thread Adrian Holovaty
ledge. It would be possible -- and relatively easy -- to do if there were a DB-API-compliant ZODB library. Is there one? I know nothing about ZODB, other than the fact that it's associated with Zope. I think. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

OneToOneField bug fixed

2005-11-20 Thread Adrian Holovaty
I've fixed the longstanding OneToOneField bug. If you're using OneToOneFields, update your trunk code and let me know whether things work for you! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Backwards-incompatible change in development version: Password change

2005-11-20 Thread Adrian Holovaty
Passwords section of the authentication docs for full information: http://www.djangoproject.com/documentation/authentication/#passwords Finally, note that this change applies only to the Django development version. If you're using Django 0.90, you won't see this change until the next

Re: Backwards-incompatible change in development version: Password change

2005-11-21 Thread Adrian Holovaty
d create it on the server side via XMLHttpRequest and populate the field. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Backwards-incompatible change in development version: Password change

2005-11-21 Thread Adrian Holovaty
racter is allowed in a password. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Backwards-incompatible change in development version: Password change

2005-11-21 Thread Adrian Holovaty
seen anything where > you have to encrypt the password yourself first. Take out the message > and nobody would even think about it. If we assume it's always plaintext, that would mean you'd have to enter the password for an individual user each time you changed that user.

Re: Why it doesn't work in Django

2005-11-21 Thread Adrian Holovaty
27;s in the development version. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Finding numbers of visitors

2005-11-21 Thread Adrian Holovaty
framework: http://www.djangoproject.com/documentation/sessions/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: 2nd database for a specific app

2005-11-21 Thread Adrian Holovaty
or all apps, > i´m not quite sure how to do this. Hey Patrick, Feel free to create a separate settings file for separate installations. Just point to the appropriate settings file in your server arrangement. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Unknown column 'auth_users.password' in 'field list'

2005-11-21 Thread Adrian Holovaty
On 11/21/05, patrick k <[EMAIL PROTECTED]> wrote: > when trying to login to the admin-interface i get the following error: > "Unknown column 'auth_users.password' in 'field list'" Hey Patrick, Check this out: http://www.djangoproject.com/weblog/2005

Re: Form Value Array

2005-11-21 Thread Adrian Holovaty
cts Example: Python code: items = request.POST.getlist('item') No ugly "[0]" and "[1]" are needed. :-D Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

Re: Close comments after a time?

2005-11-21 Thread Adrian Holovaty
gt; days). Is there any such functionality in there, or should I just add > a 'comments_allowed' method in my model which would handle this? The latter. Models are responsible for providing their own logic for opening/closing comments. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org

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