First of all, If you read the last few lines, It looks like you don't
have the Mysql package loaded in python.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
Partially inspired by the discussion at
http://www.jrandolph.com/blog/?p=45 regarding evaluating frameworks,
I'd like to make an observation.
Within the Python web framework ecosystem(and I mean for ecosystem to
imply a mind-bendingly complex system of interconnected parts) we don't
really 'get'
On 8/12/06, James Bennett <[EMAIL PROTECTED]> wrote:
> A little validation in the save() method for Price (or maybe even a
> custom validator) to ensure that only one "active" price exists for a
> given Material at any time, and you're good to go; given an instance
> of Material, say in a
On 8/12/06, Vizcayno <[EMAIL PROTECTED]> wrote:
> For material-1 I know that the price $13.59 is valid from 2006-05-04 to
> the infinite, until a new price is established for this material.
..snip...
> If a record has the field date/time="2999-12-31 23:59:59" it means it
> is in effect, but if
It is about temporality of a record.
Suppose I have a price table for each material:
Material Price Valid to
-
material-1 $12.50 2006-01-01
material-1 $12:52 2006-05-03
material-1 $13:59 2999-12-31
material-2 $54.32 2999-12-31
On 12-Aug-06, at 3:45 PM, Maciej Bliziński wrote:
>> committee = models.ForeignKey( 'Committee' )
>
> You shouldn't use the string argument (I mean, I never do that). And
> what if one person is in two committees?
since the class 'Committee' is not yet defined, it wont work without
the
I've decided to code my new site with Django, becuase I've grown tired
of PHP and I've always loved Python. So, I followed a guide written by
my webhost that tells how to setup Django on their server using FCGI.
Here is the guide: http://wiki.asmallorange.com/HOWTODjangoFastCGI
I followed
On 8/12/06, Vizcayno <[EMAIL PROTECTED]> wrote:
> You will agree however that "default=datetime.max" would have been a
> clean solution (not hardcoding) to establish the maximum date/time into
> the models.py file, unless you kindly suggest me another.
Actually, I don't see how
Adrian:
Thanks for your attention and answer.
You will agree however that "default=datetime.max" would have been a
clean solution (not hardcoding) to establish the maximum date/time into
the models.py file, unless you kindly suggest me another.
Thanks again!!
On 8/13/06, GinTon <[EMAIL PROTECTED]> wrote:
>
> To convert the names to lower or UPPER case in the templates is used {{
> foo.name|lower }} and {{ foo.name|upper }}
>
> But is possible convert characters non-ASCII? Is there any of use
> foo.name.decode('utf-8').upper() in the templates?
>
>
On 8/12/06, Vizcayno <[EMAIL PROTECTED]> wrote:
> end_date = models.DateTimeField('End date'', default=datetime.max)
>
> end_time value is = -12-31 23:59:59
>
> However Django indicates it is not a valid date when I want to save a
> record.
> What is wrong?
Hi Vizcayno,
The Django date
On 7/25/06, Chris H. <[EMAIL PROTECTED]> wrote:
> I'm trying to deploy Django into a subfolder of a domain,
> http://www.mydomain.com/projects/
>
> I can call up http://www.mydomain.com/projects/admin/ and I get the
> login screen OK, but when I successfully log in I get sent to
>
Hi:
I have next code:
from datetime import datetime
.
.
.
end_date = models.DateTimeField('End date'', default=datetime.max)
end_time value is = -12-31 23:59:59
However Django indicates it is not a valid date when I want to save a
record.
What is wrong?
Regards
On 7/29/06, ToddG <[EMAIL PROTECTED]> wrote:
> Is there any way to preview updates in the auto-admin? From what I can
> tell the answer is "no".
Yeah, we don't have support for previewing data in the admin site.
Some fun trivia, though, is that we used to have something like this,
in old-school
On 7/29/06, skullvulture <[EMAIL PROTECTED]> wrote:
> I want to do:
>
>
> Home
> Shows
> Merch
>
>
>
> SCRIPT_URL is an item that print with debug when I add {% debug
> %}, and it's value is '/home/ when I'm on the home page. However,
> I can't access the value of that variable.
>
> Is there a
On Sat, 2006-08-12 at 21:56 +0400, Ivan Sagalaev wrote:
> 一首诗 wrote:
> > But how can I give some information to user that the delete is not
> > allowed?
> > By the codes above, the user just see that the delete was done!
>
> This is exactly the case for using exceptions. Define your own
On 8/4/06, medhat <[EMAIL PROTECTED]> wrote:
> Is there an easy way to create filds on the admin side that don't have
> database columns behind them? I am thinking of something whose value
> will drive some functionality in the save() method in the model, but
> does not need to be saved.
Hey
On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> I would actually be okay writing the function in the view code, if we
> had a map filter.
>
> {{ s.teachers|map:list_func|join:";" }}
>
> Then add the following to the context:
>
> "list_func": lambda(x): x.userinfo.informal_name()
>
> How
On 7/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Is there a way to find currently active sessions, out of all sessions
> stored in the database?
> Say I want to put a "users currently active" box on my page (*), how
> would I do that. I've had a look at the session model but didn't find
On 7/25/06, Tamara D. Snyder <[EMAIL PROTECTED]> wrote:
> I am wondering if there is a way to make changes from the admin
> change list, instead of only from the admin edit list.
>
> For example, I have a model called "stories" that have a boolean
> field called "visible." In order for the story
On 8/12/06, GinTon <[EMAIL PROTECTED]> wrote:
> To convert the names to lower or UPPER case in the templates is used {{
> foo.name|lower }} and {{ foo.name|upper }}
>
> But is possible convert characters non-ASCII? Is there any of use
> foo.name.decode('utf-8').upper() in the templates?
Hi
On Sat, 2006-08-12 at 22:17 +, ToddG wrote:
> What you probably want is the low-level cache API, and use it to store
> the results of your long-running calculations. Since you're setting the
> entry in the cache the key generation is up to you. So you wont' be
> caching at the page or view
Wiktor Grębla napisał(a):
> I was thinking about it for a while, and I found another simple
> problem. Setting the cache the way I do is also error-prone. I use the
> same cache keys for different connections, so every time a user
> connects and the cache is saved (wherever I think it's sane
Great! That's exactly what I wanted! Thanks.
On 8/8/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>
> another alternative you may want to consider is to piggybak ontop of the
> generic view
>
> have a look
> at
> http://svn.zyons.python-hosting.com/trunk/zilbo/common/utils/views/create_update.py
On Sat, 2006-08-12 at 21:17 +, ToddG wrote:
> Maciej, you mentioned "turned on the caching" -- that sounds like using
> the caching middleware, not the view-level cache functionality. Or am I
> guessing wrong?
You're guessing right. Sorry for not being specific enough.
> To my understanding
Eugene Lazutkin napisał(a):
> 'locmem:///' is a thread-safe process-local memory cache. Every process
> has its own unique instance. Why? It was meant to be used for caching of
> immutable, but expensive-to-calculate values. In your case (making a
> global snapshot of a variable) it'll create
Maciej, you mentioned "turned on the caching" -- that sounds like using
the caching middleware, not the view-level cache functionality. Or am I
guessing wrong?
To my understanding if you need to be able to manuallly get and clear
cached pages you'll need to use the view level caching, not the
On 8/12/06, Maciej Bliziñski <[EMAIL PROTECTED]> wrote:
> It's fine, except the trailing MD5 sum. Is there a way to guess the key
> of the view? Otherwise, I could use SQL to find everything that begins
> with "views.decorators.cache.cache_page.myprefix./myproject/something/"
> and nuke it, but
On Sat, 2006-08-12 at 13:13 -0700, Don Arbow wrote:
> On Aug 12, 2006, at 12:38 PM, Maciej Bliziński wrote:
> >
> > This is a data-analysis site, and after I change some parameters, I
> > want
> > to clear the cache for one of the views. How can I force a view to
> > expire?
>
> Take a look at
Dennis wrote:
> hello to all I am new in the use of Django, I find it very interesting.
> But I have not been able to install it, I think is because I have
> windows. If somebody could say me, How I can install it, I would thank
> it to him a lot. Greetings.
Some time ago I created a simple
Wiktor Grębla wrote:
>
> I've a "testing" Django configuration with lighttpd (flup +
> django-fastcgi.py) on FreeBSD. Everything seems to work fine, but there
> is one thing "misbehaving": cacheing when CACHE_BACKEND = 'locmem:///'.
...
> If I set CACHE_BACKEND = 'db://some_table' it's working
On Aug 12, 2006, at 12:38 PM, Maciej Bliziński wrote:
>
> This is a data-analysis site, and after I change some parameters, I
> want
> to clear the cache for one of the views. How can I force a view to
> expire?
Take a look at the example just above the "Upstream Caches"
paragraph. It shows
Hello, Djangoers,
I've got a site where some pages take really long to calculate and
display (~40s), so I've turned on the caching and it works like a
breeze. I'm amazed.
This is a data-analysis site, and after I change some parameters, I want
to clear the cache for one of the views. How can I
On effbot.org you can find the article "Installing Django on Windows in
less than 5 minutes": http://effbot.org/zone/django.htm#installing
Maybe that can help you gettings started.
- Kjell Magne Fauske
--~--~-~--~~~---~--~~
You received this message because you
Op vr, 04-08-2006 te 16:55 +1000, schreef Ian Holsman:
> To quote the paper: This “Give-It-Away” license provides no protection
> for anyone if the donated software causes harm.
>
> ie.. even if you didn't mean it, if I used a piece of public domain
> code in a app I write and it fails, i can
To convert the names to lower or UPPER case in the templates is used {{
foo.name|lower }} and {{ foo.name|upper }}
But is possible convert characters non-ASCII? Is there any of use
foo.name.decode('utf-8').upper() in the templates?
Thanks in advance!
一首诗 wrote:
> But how can I give some information to user that the delete is not
> allowed?
> By the codes above, the user just see that the delete was done!
This is exactly the case for using exceptions. Define your own exception
and raise it where user shouldn't delete an object. Then define a
More information please. What steps have you taken to install Django?
Have you read the installation guide? There are some tips for
installing Django on Windows in the comments.
http://www.djangoproject.com/documentation/install/
Bryan
On 8/12/06, Dennis <[EMAIL PROTECTED]> wrote:
> hello to
Hi.
I've a "testing" Django configuration with lighttpd (flup +
django-fastcgi.py) on FreeBSD. Everything seems to work fine, but there
is one thing "misbehaving": cacheing when CACHE_BACKEND = 'locmem:///'.
In my views I often use something like:
images = cache.get('images')
entries =
I want to override delete()
===
from django.db import models
class Person(models.Model):
first_name = models.CharField(maxlength=20)
last_name = models.CharField(maxlength=20)
def delete(self):
if ( A ):
super(Person,
hello to all I am new in the use of Django, I find it very interesting.
But I have not been able to install it, I think is because I have
windows. If somebody could say me, How I can install it, I would thank
it to him a lot. Greetings.
--~--~-~--~~~---~--~~
You
Op vr, 04-08-2006 te 15:43 -0700, schreef Joseph Heck:
> Ah - brilliant. (Thanks for the "Shrink" tip - I looked around and
> couldn't find anywhere to invoke it up). That's got it down to just at
> 1Gb.
An Ubuntu live-cd fits on a 650 MiB CD-R, while it includes lots of
software that you don't
Thanks you guys.
Sia
--~--~-~--~~~---~--~~
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 Jay,
Here's a custom field that automatically resizes the uploaded image
using PIL. You should be able to modify save_file() to adjust the JPEG
compression level on pil_obj.save()
In fact we might add this as an optional parameter in the next version.
http://www.verdjn.com/wiki/PhotoField
+1 for James' excellent tutorial.
Here's the context processor that I use in most of my projects:
http://www.verdjn.com/wiki/Siteroot
http://www.verdjn.com/browser/verdjnlib/context_processors/__init__.py
--~--~-~--~~~---~--~~
You received this message because
On 8/11/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 8/11/06, Deryck Hodge <[EMAIL PROTECTED]> wrote:
> > Anyone planning to attend LinuxWorld next week? I'll be there doing a
> > tutorial on Monday, but I have free time Monday night and Tuesday
> > night. I don't mind trying to get an
On 8/12/06, Maciej Bliziñski <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2006-08-11 at 22:02 -0700, Bryan Murdock wrote:
> > First I must admit that I'm a databse dummy. I'm using fairly recent
> > django code from svn. I have a simple desire. I want people who can
> > be organized into committees,
Hi,
thanks for the hints, that exactly what I was looking for.
May I'm not the first who asked this question.
The solution maybe should be placed somewhere on the django-wiki ?
Or the context_processor.media_url should go into the django-distro ?
Regards,
Dirk
--
Der GMX SmartSurfer hilft
On 8/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is it possible to get the value of MEDIA_URL from settings.py in the
> templates ?
You can write a template context processor, and use the
`RequestContext` subclass of the normal Context.
See the official documentation (and list of
On 8/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> is it possible to get the value of MEDIA_URL from settings.py in the
> templates ?
>
> Regards,
> Dirk
You can pass it manually through Context, for example:
from django.conf import settings
...
return
Hi all,
is it possible to get the value of MEDIA_URL from settings.py in the templates ?
Regards,
Dirk
--
"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
--~--~-~--~~~---~--~~
You received this
Malcom,
Thank you very much for your time and help.
I found the reason of my problem.
I had two different template tags but in both the same context variable
and one overwrote the other.
Best regards,
L.
--~--~-~--~~~---~--~~
You received this message because
On Fri, 2006-08-11 at 22:02 -0700, Bryan Murdock wrote:
> First I must admit that I'm a databse dummy. I'm using fairly recent
> django code from svn. I have a simple desire. I want people who can
> be organized into committees, with each committee having a committee
> leader, also a person.
On 8/12/06, Michal <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I was trying to include some of the menu templates according to
> flatpage.url variable (I have several local menu templates):
>
> {% include flatpage.url|menu %}
>
> But this doesn't work. It seems to me, that flatpage.url|menu isn't
>
[EMAIL PROTECTED] wrote:
> I just tried two loops "for" imbricated, it does'nt seems to work.
Imbricated? That's a new one on me. I just looked it up and it means
overlapping like roof tiles, edge over edge, which makes me think of
two for loops like this:
for i = 1 to 10
for j = 1 to 10
print
Hi,
thank you Ian for the link. I saw a post for SavePost.py, but with a broken
link.
Brian, I thought to implement a templatetag SAFEHTML, since I came through the
admin_doc which has nice links on the doc-model for cross referencing models.
But those links will be escaped through a policy
56 matches
Mail list logo