Hi all,
I'm poking-around with transactions... and I must admit I'm confused as
to how to properly implement transactions in Django.
I'm trying to make use of "Tying transactions to HTTP requests", but
I'm not having much luck.
I've placed TransactionMiddleware in the MIDDLEWARE_CLASSES.
I
Hey People,
I'm a Django newbie playing around with Jeff Crofts Lost-theories
code. I get this page displayed error:
Exception Type: TemplateSyntaxError
Exception Value:Invalid filter: 'smartypants'
Exception Location: /home/bward/django/django_src/django/template/
On 13-Sep-06, at 6:42 AM, DavidA wrote:
> There is a "schema evolution" project underway to address this problem
> in a more automated way, here is background on the project:
>
> http://code.djangoproject.com/wiki/SchemaEvolution
>
> but I don't know anything about the status of it.
you can
Once you have reference to a user object you should have access to all
the fields and methods listed here:
http://www.djangoproject.com/documentation/authentication/#api-reference
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi Mathias,
I think you're looking for the .extra() queryset method.
http://www.djangoproject.com/documentation/db_api/#extra-select-none-where-none-params
-none-tables-none
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Why don't you strip before you slice.
--~--~-~--~~~---~--~~
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
http://youtube.com/profile?us
leaves these behind
do you know to fix these
Guillermo Fernandez Castellanos wrote:
> Cheers,
>
> > i want to display a snippet of data from a html source, and i want to
> > strip it of html because an unclose tag will make the rest of the page
> > look like
> You
In, n my views, I could do something like app.user = request.user? Can
I get all information for the currently logged in user?
nymbyl wrote:
> To say "Hello, Person's name!" you can do "Hello, {{ user.username
> }}!":
>
To say "Hello, Person's name!" you can do "Hello, {{ user.username
}}!":
http://www.djangoproject.com/documentation/authentication/#authentication-data-in-templates
Also, the request object has a 'user' attribute that you can access
within views:
On Tuesday 12 September 2006 23:02, James Bennett wrote:
> On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote:
> > You mean every TYPE of object surely. I'd like to see it list 10 million
> > records :)
>
> Nope. It lists the objects.
Ok, I'll be sure to avoid this.
> > Even so, if the user
In my application, I have an object which has a foreign key to the
django users table. Is there an environment variable that I can use to
get information on the currently logged-in user? For example, if I want
the main page to display "Hello, Person's Name!" or if I want my
objects to have the
On 9/12/06, James Bennett <[EMAIL PROTECTED]> wrote:
File a ticket against the search-api branch, and attach your diff :)
Done: http://code.djangoproject.com/ticket/2707
Thanks for your help James :D
-- SDM UnderlinuxGarimpar.com--PEP-8"Mais vale um ponteiro na mao do que duas classes voando"CPFL
prespawn lighttpd, any ideas on how to do this or specify in config
thanks
--~--~-~--~~~---~--~~
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
url a gem
wat about unclosed tags
such a href="google.com
because
i need a slice of data...
Guillermo Fernandez Castellanos wrote:
> Cheers,
>
> > i want to display a snippet of data from a html source, and i want to
> > strip it of html because an unclose tag will make the rest of the page
> >
On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote:
> You mean every TYPE of object surely. I'd like to see it list 10 million
> records :)
Nope. It lists the objects. The utility of this will vary widely with
your use case -- when you have, say, one object which is related to
ten million other
On Tuesday 12 September 2006 21:30, James Bennett wrote:
> There are some checks in place for this; the admin app, for example,
> will display a confirmation page before allowing a delete, and that
> page lists every related object that will be deleted.
You mean every TYPE of object surely. I'd
On 9/12/06, Gary Doades <[EMAIL PROTECTED]> wrote:
> As an example, I have a table (product) that is referenced by 11 other tables
> (booking, history, rates, invoice, payroll, timesheets etc.). Those tables
> contain upwards of 10 million rows in the existing application. I certainly
> don't
On Tuesday 12 September 2006 10:01, Gábor Farkas wrote:
> hi,
>
> as far as i understand,
>
> when you delete an object in django, it also deletes all the objects
> that reference it.
>
> is there a way to only delete the object, and get an exception if other
> objects reference it?
>
Oh dear, I
You can use the manipulators described on this page:
http://www.djangoproject.com/documentation/forms/
Do a find on "if form.has_errors" to see a template example
containing general form errors as well as field specific
form errors.
Let me know if you need more info.
thanks,
raman
Marc Fargas wrote:
> I agree on those, maybe the greatest thing to get on would be to
> provide that svn+trac that some people was interested in, and to put
> the snippets inside. And setup something like a "django portal" with
> not only information about what is inside the repositories but also
On 9/12/06, Rafael SDM Sierra <[EMAIL PROTECTED]> wrote:
> I'm trying the search-api backend [1] but this seems to be "stop", it is
> true? becouse it is a nice idea and I want to contribuite with the project,
> I'm using Xapian as backend, and I'll follow "alone" with the project
> sending any
Hi,
richard wrote:
> Hello,
> I'm trying to move a functioning development django project developed
> on an Os x box (django svn up to date, python 2.4.3) to an 'exposed'
> AIX 5.3 server and am falling at an early unanticipated hurdle with
> core dumps from django!
> On the AIX box I have
Has anyone gotten Squid and Django to play nice? When I hit Squid on
3128 I get the dreaded:
The following error was encountered:
* Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:
* Missing or unknown request method
* Missing URL
* Missing HTTP
Hi y'all,
I've built one and a half (pretty basic) Django sites, and I'm working
on a couple more. I was thinking about the type of development Django
encourages, and how web applications work in the real world, and I got
wondering what strategies folk out there had for modifying models with
db-api question:
if I have a model 'Service" with 'max_users' and 'cur_users' as integer
fields, how can I do
Service.objects.filter(max_users__gt=cur_users)
or how can the right-hand-side of the search be a model field of the
current queryset.
I found no example for this, yet.
Thanks,
On Tue, 2006-09-12 at 12:49 +, zenx wrote:
> thanks for the tutorial!!! I wil take a look at it :)
>
I've now fixed all the indenting issues and checked the code for errors,
then fixed them. So it should work. If there are any issues, you know my
email. :P
--
No violence, gentlemen -- no
Hello,
I'm trying to move a functioning development django project developed
on an Os x box (django svn up to date, python 2.4.3) to an 'exposed'
AIX 5.3 server and am falling at an early unanticipated hurdle with
core dumps from django!
On the AIX box I have ActivePython 2.4 and have tried the
Yeah - sorry. My constant biggest headache with Django is the lack of
access to properties during field definition. It would be cool (and it
seems natural) to just do this:
image = models.ImageField(upload_to=(%s/%s) % (self.artist, self.book))
or this:
latest_mix = models.ForeignKey(Mix,
On 9/12/06, Joeboy <[EMAIL PROTECTED]> wrote:
I think you might be missing the bit that says:"Finally, we change our view code to use RequestContext instead of thebase Context class."You're right! I missed it, then there's no easy solution for your problem ;o)
JoeMarc
Thanks Russ. It's not news I wanted to hear but I appreciate your help.
*rolling up sleeves* Time to get to work, I guess.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
I also agree with documentation in Django. I'm amazed when I began
browsing for help files in the site. I did not expect that the docs
there are massive. It covers a lot of WHY did this happen and HOW to
make it happen. The help for Django has more ham compared to ruby on
rails. I think if you
The easiest way I've found to do this is to subclass models.ImageField
from django.db.models and override the save_file method. I have an
application where an artist uploads an image file - it makes a
thumbnail, and saves the file to a artist/book/chapter folder. I did
something like this (which
Yeah, no offense, but that's a lot of code just to keep my folder
slightly tidier. I figured since it already knows it's name in a
folder-friendly format, I could just append that to the path somehow.
--~--~-~--~~~---~--~~
You received this message because you
>> As far as I can tell the way to do this is to modify *every*
>> *view* *in* *my* *project* to pass either the user or a
>> RequestContext.
>
> The link I gave you is to not do that, but add a processor that will add the
> user to the context.
I think you might be missing the bit that says:
I just know this is a dumb question, but...
What I want is something like
file = models.FileField(upload_to="img/memorabilia/+self.slug")
But I just no that can't be right? Can this be done? How?
--~--~-~--~~~---~--~~
You received this message because you are
Maybe I read badly, bu I understood that you needed to modify EVERY VIEW to add something to the context of the template, the link I gave you show how to use a Processor, that is "some function called before rendering a template" more or less like an "intermediate view"
Look at the example
thanks for the tutorial!!! I wil take a look at it :)
--~--~-~--~~~---~--~~
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
On 9/12/06, chrisdo <[EMAIL PROTECTED]> wrote:
>
> Hi there
>
> I wanted to write a nice CMS software with modules and all the stuff,
> so I wanted to ask if it's possible to add functionality to the admin
> interface, like uploading a zip and then unpacking the files to a
> specified folder. Is
Hawkeye wrote:
> I think that this would be great (for my purposes)...
>
> It doesn't look like this exists in Django right now. Are there plans
> to implement this? Maybe a ticket that already exists?
>
> I'd still be concerned about the cache getting in the way, but as a
> first step the
On the same issue:
What if you want the database to take care of the cascade? Lets say you
have 20,000 references that needs to be deleted, it would be much more
efficient with "ON DELETE CASCADE".
--~--~-~--~~~---~--~~
You received this message because you are
Does nobody have an answer to one of my questions??
--~--~-~--~~~---~--~~
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
Cheers,
> i want to display a snippet of data from a html source, and i want to
> strip it of html because an unclose tag will make the rest of the page
> look like
You have the striptags tag:
http://www.djangoproject.com/documentation/templates/#striptags
You can also access the function from
hi guys
i want to display a snippet of data from a html source, and i want to
strip it of html because an unclose tag will make the rest of the page
look like
that
please help me out
thanks
--~--~-~--~~~---~--~~
You received this message because you are
> On the linked thread have you checked:
> http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors?
> You can use a context processor to make {{ user }} available on all
> templates.
Unless I'm missing something, that link says the same as what I'm
saying, namely that you
2006/9/12, limodou <[EMAIL PROTECTED]>:
>
> On 9/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > I've added a small tutorial:
> > http://code.djangoproject.com/wiki/InitialSQLDataDiangoORMWay
> >
> > It describes how to use Django ORM to add initial SQL data to freshly
> > installed
Hi all,
Warning: I'm a new user in town, new to django (albeit already totaly
converted this great framework), so be totally warned about my
potentially uber-noob question.
I have some troubles in the way special character (accentuated
character �, �, � and the like) are presented in the
I see, thanks.
Filipe
--~--~-~--~~~---~--~~
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,
as far as i understand,
when you delete an object in django, it also deletes all the objects
that reference it.
is there a way to only delete the object, and get an exception if other
objects reference it?
thanks,
gabor
--~--~-~--~~~---~--~~
You
Hi there
I wanted to write a nice CMS software with modules and all the stuff,
so I wanted to ask if it's possible to add functionality to the admin
interface, like uploading a zip and then unpacking the files to a
specified folder. Is this possible? Or do I have to write my own Fields?
49 matches
Mail list logo