Re: Model vanishes from Admin

2006-06-23 Thread arthur debert
Hi Steven. this one got me stuck for hours (grin). if your INSTALLED_APPS is right and your admin inner class too, you probably have an error on an import on your model class. fire up the shell on your server setup. can you import your model module?

Re: resolve_variable in custom filter

2006-06-23 Thread Don Arbow
On Jun 23, 2006, at 8:06 PM, RajeshD wrote: > This is a very useful tip! > > It would be great if this statement in the doc were revised: "Filter > arguments always are in double quotes." I would expect it works that way, just like python. If i have a dictionary named dict, these two are

Re: Model vanishes from Admin

2006-06-23 Thread Waylan Limberg
First, make sure it is listed in the installed apps in your settings file. Then, make sure the Admin() innerclass is defined in the model (and that is has proper whitespacing etc.) On 6/23/06, Steven Ametjan <[EMAIL PROTECTED]> wrote: > > I'm not quite sure how it happened, but one of my models

Re: PyISAPIe now supports Django

2006-06-23 Thread Jeremy Dunck
On 6/23/06, Rune Strand <[EMAIL PROTECTED]> wrote: > > I just saw this news. It says PyISAPIe now includes Django support. I'm > a little confused here - does this mean that Django can now be run on > MS IIS? > > http://pyisapie.sourceforge.net/ I haven't tried it yet, but yeah, that's what it

Model vanishes from Admin

2006-06-23 Thread Steven Ametjan
I'm not quite sure how it happened, but one of my models disappeared from the Admin interface today, but is still present on my dev server. To make things even more interesting, just to see if I could fix it, I set both my production, and my dev projects to use the same directory, and

Re: Having many of one application.

2006-06-23 Thread Malcolm Tredinnick
On Fri, 2006-06-23 at 17:58 +0100, Frankie Robertson wrote: > Please, is there any way of doing this? I've dumped the last approach, > I'm planning on using inclusion tags to query the database, but the > templates would still need to know the slug of the hostee's current > page. So generic views

PyISAPIe now supports Django

2006-06-23 Thread Rune Strand
I just saw this news. It says PyISAPIe now includes Django support. I'm a little confused here - does this mean that Django can now be run on MS IIS? http://pyisapie.sourceforge.net/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: resolve_variable in custom filter

2006-06-23 Thread Malcolm Tredinnick
On Fri, 2006-06-23 at 10:28 -0700, DavidA wrote: > I'm trying to write a filter that will highlight substrings in text > that matched a search pattern. I was hoping to do something like this: > >{{ obj.field|highlight:search }} > > where 'search' is a template-context variable that is the

Re: Can a custom field have two database columns?

2006-06-23 Thread arthur debert
HI Ian. Thanks for the pointer. It's an interesting approach though, if I did understand it, that requeries the "raw" markup source's name to be hardcoded into the middleware, right (e.g. 'description')? If so, I am back to square one, for among all models I have quite a few that must be parsed

Re: resolve_variable in custom filter

2006-06-23 Thread DavidA
RajeshD wrote: > Don't know if a filter can do what you need. But you could turn this > into a tag instead of a filter: > > {{ highlight search obj.field }} Thanks. That worked nicely. It would be nice, however, if filters had access to the template context so you could do more sophisticated

RE: Anonymous Users/Session in Template

2006-06-23 Thread Kevin Fullerton
Hi, I've got 'django.contrib.sessions' and 'django.contrib.auth' in my INSTALLED_APPS, and 'django.contrib.sessions.middleware.SessionMiddleware' in MIDDLEWARE_CLASSES I'm running from the svn version of django which is up to date. I'm using render_to_response from django.shortcuts for

Re: list_display (ManyToManyField)

2006-06-23 Thread Patrick J. Anderson
Thanks, that works well. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to [EMAIL

Anonymous Users/Session in Template

2006-06-23 Thread Kevin Fullerton
Hi,   I've searched through the documentation and the mailing list, and can't see anywhere that describes how to get the user object (for logged in or anonymous users) available in templates through the {{ user }} template tag.   Can anyone point me in the right direction?   Many thanks  

Re: render to screen and dynamic file

2006-06-23 Thread Jay Parlar
On 6/23/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote: > I've read both previously to posting, but those don't seem to address my > question of generating both a web page and a file at the same time of > the latter after pressing a button in the former. > Ok, I *think* I understand your problem

Re: Can a custom field have two database columns?

2006-06-23 Thread Ian Holsman
Hi Arthur. I do something similar to this. I chose to implement it in middleware http://svn.zyons.python-hosting.com/trunk/zilbo/common/text/ middleware/Markup.py in a nutshell, if the 'description' field exists it will create the description_html field in the post, which would get applied

Re: render to screen and dynamic file

2006-06-23 Thread Luis P. Mendes
Jay Parlar escreveu: > These might be of some assistance to you: > > http://www.djangoproject.com/documentation/outputting_pdfs/ > http://www.djangoproject.com/documentation/outputting_csv/ > > Jay P. I've read both previously to posting, but those don't seem to address my question of

Re: Splitting the databases

2006-06-23 Thread patrickk
thanks, I´ll check out the different possibilities. Am 23.06.2006 um 22:07 schrieb Jacob Kaplan-Moss: > > On Jun 23, 2006, at 2:44 PM, patrickk wrote: >> another reason for splitting databases: >> we have several websites sharing the same userdata (so that users >> only have to register once).

Re: Splitting the databases

2006-06-23 Thread Don Arbow
On Jun 23, 2006, at 12:39 PM, Jacob Kaplan-Moss wrote: > > On Jun 23, 2006, at 11:51 AM, sean wrote: >> The only reason I wanted to split the db in the first place is that I >> don't really like the thought of having the application data (like >> auth, flatpages etc.) and the production database

Re: Splitting the databases

2006-06-23 Thread Jacob Kaplan-Moss
On Jun 23, 2006, at 2:44 PM, patrickk wrote: > another reason for splitting databases: > we have several websites sharing the same userdata (so that users > only have to register once). with every app having about 300 tables, > one database may not be the right decision. > > any ideas on how to

Re: render to screen and dynamic file

2006-06-23 Thread Jay Parlar
These might be of some assistance to you: http://www.djangoproject.com/documentation/outputting_pdfs/ http://www.djangoproject.com/documentation/outputting_csv/ Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Splitting the databases

2006-06-23 Thread patrickk
another reason for splitting databases: we have several websites sharing the same userdata (so that users only have to register once). with every app having about 300 tables, one database may not be the right decision. any ideas on how to solve this? thanks, patrick Am 23.06.2006 um 21:39

render to screen and dynamic file

2006-06-23 Thread Luis P. Mendes
Hi, The problem is I want to create a dynamic web page and to build a dynamic excel file based on the same data used for screen output. I haven't decided yet on: a) if the file is built only after a user presses a button in the rendered page and the request activates another view function; b)

Re: Splitting the databases

2006-06-23 Thread Jacob Kaplan-Moss
On Jun 23, 2006, at 11:51 AM, sean wrote: > The only reason I wanted to split the db in the first place is that I > don't really like the thought of having the application data (like > auth, flatpages etc.) and the production database (which is also > accessed by other applications) in one db. I

Re: GenericForeignKey in admin

2006-06-23 Thread Jacob Kaplan-Moss
On Jun 22, 2006, at 2:00 PM, Jay Parlar wrote: > I noticed you just checked the patch in, thanks very much. I do have > the question though: Was the patch actually doing the overall right > thing? My patch modified the admin itself, instead of any of your > generic stuff. > > Maybe because of the

Re: Customizing form.x widgets - how?

2006-06-23 Thread Jacob Kaplan-Moss
On Jun 22, 2006, at 1:36 PM, [EMAIL PROTECTED] wrote: > The use-case and problem I have is when using a generic view and a > form; suppose my object being edited has a field called "description". > I'd like to just use {{form.description}} in the template, but the > default size (cols=, rows=)

Re: Having many of one application.

2006-06-23 Thread Jay Parlar
On 6/23/06, Frankie Robertson <[EMAIL PROTECTED]> wrote: > > Please, is there any way of doing this? I've dumped the last approach, > I'm planning on using inclusion tags to query the database, but the > templates would still need to know the slug of the hostee's current > page. So generic views

Re: resolve_variable in custom filter

2006-06-23 Thread RajeshD
Don't know if a filter can do what you need. But you could turn this into a tag instead of a filter: {{ highlight search obj.field }} The highlight tag's Node render method will provide you with the context from which you can resolve your variables.

Re: Which IDE to debug django app? (Was "Using Pyscripter with Django")

2006-06-23 Thread RajeshD
You can use the Python debugger too. Simply import pdb and add pdb.set_trace() where you want your first breakpoint. You can step through after that point and inspect variables, etc. http://www.ferg.org/papers/debugging_in_python.html Don't forget to wrap your breakpoints with "if

resolve_variable in custom filter

2006-06-23 Thread DavidA
I'm trying to write a filter that will highlight substrings in text that matched a search pattern. I was hoping to do something like this: {{ obj.field|highlight:search }} where 'search' is a template-context variable that is the string the user was searching for and the highlight filter

Re: Trouble with default values in model w/ sqlite

2006-06-23 Thread Jamie Scheinblum
Following up on my own question to help future googlers of this problem.  It turns out there is a bug open on this already, http://code.djangoproject.com/ticket/1207 .  The problem is that the do_html2python method replaces all the empty values with None, effectively blowing away any chance of the

Re: Having many of one application.

2006-06-23 Thread Frankie Robertson
Please, is there any way of doing this? I've dumped the last approach, I'm planning on using inclusion tags to query the database, but the templates would still need to know the slug of the hostee's current page. So generic views don't work because they don't know what the blog_slug is, as it is

Re: Splitting the databases

2006-06-23 Thread sean
This sounds interesting. The only reason I wanted to split the db in the first place is that I don't really like the thought of having the application data (like auth, flatpages etc.) and the production database (which is also accessed by other applications) in one db. I guess a few extra columns

Re: Splitting the databases

2006-06-23 Thread Jay Parlar
Jason Pellerin is currently working on multi database support, is this the sort of thing you need? http://code.djangoproject.com/wiki/MultipleDatabaseSupport Jay P. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Splitting the databases

2006-06-23 Thread Rock
This is not quite precise. I use two different databases on a single installation. In fact, using the virtual hosting capability of apache and modpython, I have one set of Django applications uses a PostgreSQL database and an entirely different set of Django applications that use a MySQL

Can a custom field have two database columns?

2006-06-23 Thread arthur debert
In a current project, I've got a lot of fields that must accept markup. Currently I am using markdown to parse the raw text. I am aware of the useful template tags to apply markdown on the template itself, but since reads are much more common than writes I would like to store the markup on the

Re: Photo gallery

2006-06-23 Thread arthur debert
Hi Guillermo. I haven't looked at those galleries but if you are going to code some of it, take a look at nesh's ImageWithThumbnail[1] field and related utilities. You might reduce the ammount of biolerplate code greatly. cheers arthur [1] http://djangoutils.python-hosting.com/wiki/Thumbnails

Re: Photo gallery

2006-06-23 Thread Jay Parlar
On 6/23/06, William McVey <[EMAIL PROTECTED]> wrote: > I have mostly finished the conversion of stockphoto to the current trunk > (it's been delayed as I was on an extended vacation where I didn't work > on it at all). It's still not entirely completed, as loading the albums > from uploaded zip

Re: list_display (ManyToManyField)

2006-06-23 Thread rajesh . dhawan
I believe that this is not possible directly with m2m fields. You could define a custom function in your model that returns a list of tags. Then, list that function in Admin.list_display. Something like this: def show_tags(self): tags = ", ".join([t.__str__() for t in self.tags.all()])

Re: Photo gallery

2006-06-23 Thread William McVey
On Fri, 2006-06-23 at 08:16 -0400, Jay Parlar wrote: > I've been half-heartedly looking for a photogallery as well, and I've > run across both of those. One immediate complaint is that they both > use the pre-magic-removal codebase (ie. 0.91), so you'd have to > convert them over to MR to use

list_display (ManyToManyField)

2006-06-23 Thread Patrick J. Anderson
I'd like to display a list of tags (ManyToMany relationship to Articles) in admin list_display. I'm getting a reference to an object. Is there a way to do this in Admin class inside my model? Below is a code chunk from my model: class Article(models.Model): #... tags=

Re: Forein keys from application tables to Authentication tables

2006-06-23 Thread Jay Parlar
On 6/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > i like to use the authentication modules in the contrib modul of django > (using 0.95). > But i have to build a foreign key with the user id to my tables in my > application. > > I have to know which record in my local tables is

Re: How do I use a custom FilterSpec?

2006-06-23 Thread Adrian Holovaty
On 6/23/06, MattiasN <[EMAIL PROTECTED]> wrote: > You say this is sketchy because (as you say) it uses the underlying > implementation. Is FilterSpec not something you are supposed to be able > to define by yourself? Or will there be some "official" fix for this? > Like

Re: Photo gallery

2006-06-23 Thread Jay Parlar
On 6/23/06, Guillermo Fernandez Castellanos <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm looking to integrate a photo gallery into a blog, while trying not > to reinvent the wheel. > > I've identified two that look nice: > Stockphoto: > http://www.carcosa.net/jason/software/django/stockphoto/ >

Photo gallery

2006-06-23 Thread Guillermo Fernandez Castellanos
Hi, I'm looking to integrate a photo gallery into a blog, while trying not to reinvent the wheel. I've identified two that look nice: Stockphoto: http://www.carcosa.net/jason/software/django/stockphoto/ DjangoGallery: http://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoGallery

Re: Splitting the databases

2006-06-23 Thread James Bennett
On 6/23/06, sean <[EMAIL PROTECTED]> wrote: > Ok. > Thanks for the quick reply. Since you seem to be particularly worried about the auth system, you might want to either A) take a look at how the auth system salts and hashes the stored passwords and controls access to the user system. B) take a

Re: Splitting the databases

2006-06-23 Thread sean
Ok. Thanks for the quick reply. --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to

Re: Splitting the databases

2006-06-23 Thread James Bennett
On 6/23/06, sean <[EMAIL PROTECTED]> wrote: > I was wondering if django provides the possibility to split up the > database. I don't feel comfortable with having all the auth tables, the > flatpages, the comment system and such in the same db as the content. > Maybe it's as easy as overwriting

Re: How do I use a custom FilterSpec?

2006-06-23 Thread MattiasN
Yes, that did it. Thank you very much! You say this is sketchy because (as you say) it uses the underlying implementation. Is FilterSpec not something you are supposed to be able to define by yourself? Or will there be some "official" fix for this? Like FilterSpec.register_before(my_func,

Re: Which IDE to debug django app? (Was "Using Pyscripter with Django")

2006-06-23 Thread Frankie Robertson
On 22/06/06, Filipe <[EMAIL PROTECTED]> wrote: > > Hi, > > That's definitely a better way to inspect values than modifying the > view's template every time I need to debug something. I found out today > that I can also print to the output console (yes, I'm that much of a > newbie :) which also

Re: Problems creating model.

2006-06-23 Thread Russell Keith-Magee
On 4/20/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > On 4/19/06, njharman <[EMAIL PROTECTED]> wrote: > > > class Foo(models.Model): > > myfield = models.OneToOneField('SomeModel') > > > > Fails because whatever "turns" 'SomeModel' from string into class object > > hasn't happened when