On 4/20/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> On 4/19/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
> >
> > ---
> > class Benga(models.Model):
> > wenga=ForeignKey("Wenga")
> >
> > class Wenga(models.Model):
> > ...
> >
>
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
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 hel
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, my_filt
hi,
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 the settings.py file in an app?
Even if this can be
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 the
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
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
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
What
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/
> Djan
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 FilterSpec.register_before(
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
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= mo
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 them
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()])
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 fi
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
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 dat
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 database.
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
"D
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
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 I
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
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 woul
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 settings.DEBU
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.
--~--~-~--~~~---
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 d
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=) isn
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
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 g
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) or
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 s
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 Groups
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 so
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
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). w
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 generati
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 by
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
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
K
Do you have 'django.contrib.sessions' and 'django.contrib.auth' in
your INSTALLED_APPS, and do you have
'django.contrib.sessions.middleware.SessionMiddleware' in your
MIDDLEWARE_CLASSES?
Are you using RequestContext instead of Context in your views?
The docs all say that you need 'django.core.c
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
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 processi
On 6/23/06, Kevin Fullerton <[EMAIL PROTECTED]> wrote:
>
> 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 d
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 th
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
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 st
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 th
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
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 they'
Hi all,
It is indeed good news that stockphoto will soon be available. I'll
give it a try.
Otherwise, the Thumbnail looks as a good alternative, as I am looking
for a very simple application where I think I'll make use of tags
instead of galleries .
I'll probably give a quick try to both and mak
Malcom,
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."
Cheers,
-Raj
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
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 so
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 d
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 diff
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?
--~--~-~--~~~---
56 matches
Mail list logo