On 5/25/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>
> I know I could use the templating and put all of this in a template or
> possibly a template tag, but wouldn't it be superb if I could do:
Sure. It doesn't need to be in a templatetag, though - just override
the format_output metho
On Fri, 2007-05-25 at 22:46 -0700, Grant D. Watson wrote:
> > No idea about the core dump -- it's not very usual
> > (for Python).
>
> Definitely my experience.
>
> > However, you will have to do something about your
> > Python version. Either
>
> I checked, and as Jeremy said an update was jus
> No idea about the core dump -- it's not very usual
> (for Python).
Definitely my experience.
> However, you will have to do something about your
> Python version. Either
I checked, and as Jeremy said an update was just
released recently; I've upgraded to 2.5.1. Thanks for
the heads-up.
> Is
On 5/25/07, blabla <[EMAIL PROTECTED]> wrote:
>
> I have python 2.5 installed at C:\Python25
> I then downloaded and unzipped the django file to the c:\
> I then open up command and cd to C:\DJANGO-0.96
> and sudo and python are unrecognized commands,
> so i merely enter setup.py install
> and rec
On 5/25/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> However, you will have to do something about your Python version. Either
> downgrade to 2.5.0 or upgrade to 2.5.1 proper. The problem is that there
> was a regression in the 2.5.1-pre-releases with the way dictionary
> subclasses are init
On Fri, 2007-05-25 at 20:51 -0700, Grant D. Watson wrote:
> I'm a newbie to Django. It looks amazing, and I've
> decided to give it a whirl, but when I try a syncdb on
> my new project I get a core dump; the only things I've
> changed in settings.py are ADMINS and DATABASE_*.
> Given the context
I have python 2.5 installed at C:\Python25
I then downloaded and unzipped the django file to the c:\
I then open up command and cd to C:\DJANGO-0.96
and sudo and python are unrecognized commands,
so i merely enter setup.py install
and recieve the error
error: package directory '\django' does not e
I'm a newbie to Django. It looks amazing, and I've
decided to give it a whirl, but when I try a syncdb on
my new project I get a core dump; the only things I've
changed in settings.py are ADMINS and DATABASE_*.
Given the context I assume it's something to do with
the psycopg2 library and Django?
As always, depends. Just think about how source control (i.e. code
ownership), re-usability and IDE integration/navigation would fit with
each approach. Contrary to Russ, I have my form classes near to my
view functions, but I won't bet my C++ Builder 4 CD that its the best
way :)
Probably not an
On 5/26/07, Siah <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a many to many relationships between Model1 and Model2. So
> django gives me the ability to add an object of Model2 to Model1 as
> follows:
>
> Model1_Object.model2_set.add( model2_Object )
>
> Now, I need to have some clean up done on
If your projects are in c:\django-projects\Project1, you would add "c:
\django-projects" as an include path. You must reference your modules
like:
from Project1.articles.models import Article
the "Project1" is important.
On May 10, 1:59 pm, oliver <[EMAIL PROTECTED]> wrote:
> Thanks, for both c
On 5/26/07, ringemup <[EMAIL PROTECTED]> wrote:
>
> Obviously, this doesn't *really* matter, but I'm looking for best
> practices:
>
> Where would you recommend putting the code for a custom form class?
> In views.py? In models.py? In a separate forms.py?
Personally, I've been putting forms in
Obviously, this doesn't *really* matter, but I'm looking for best
practices:
Where would you recommend putting the code for a custom form class?
In views.py? In models.py? In a separate forms.py?
Thanks!
--~--~-~--~~~---~--~~
You received this message because
On Fri, 2007-05-25 at 09:54 -0700, John M wrote:
> Tim,
>
> great answer, but I'm thinking I might need to build a true queryset
> myself.
>
> I was really hoping to hack the queryset model to allow this to happen
> in the django classes.
I answered this with a reasonably detailed explanation o
On Fri, 2007-05-25 at 17:17 +0200, Michael Radziej wrote:
> Hi Malcolm,
>
> A short disclaimer: I'm currently trying the unicode branch with the
> autoescape patch and a
> couple of other patches, so my problems might really be my own problems,
> but I don't expect it.
>
>
> First, I found tha
Hi,
you could use the related_for_model function in your view:
tag = Tag.objects.get(pk=1)
assoc_entries = Tag.objects.related_for_model(tag, BlogEntry)
On 25 Mai, 18:56, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm trying to write a view to return a list of blog entries associated
> wi
Tim..your sample works like a champ! Thanks... I also overrode
the .delete method on all of my classes to just set the flag to
zero .
On May 25, 2:08 pm, "Ben Jones" <[EMAIL PROTECTED]> wrote:
> > Just as an aside, when I use this approach I find it handy to use a
> > date field, 'deletedate
On 5/25/07, Bob Dively <[EMAIL PROTECTED]> wrote:
>
> On May 25, 4:06 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
>
> > That appears related to filters, somehow. Please include the full
> > code for your templates.
>
> Not really feasible since there are dozens.
Then try to simplify the situat
On May 25, 4:06 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> That appears related to filters, somehow. Please include the full
> code for your templates.
Not really feasible since there are dozens.
--~--~-~--~~~---~--~~
You received this message because you
Assuming you are using an SVN checkout, you may want to look at my
Django Documentation application which provides access to the official
Django documentation as HTML inside of your local Django
administration documentation.
http://smileychris.tactful.co.nz/ramblings/django-documentation/
On May
On 5/25/07, Bob Dively <[EMAIL PROTECTED]> wrote:
...
> Exception Type: TemplateSyntaxError
> Exception Value:Could not parse the remainder: custom_tags
> Exception Location: D:\python24\Lib\site-packages\django\template
> \__init__.py in __init__, line 558
>
> Still scratching
On May 25, 11:13 am, Marc Fargas <[EMAIL PROTECTED]> wrote:
> You can use a templatetag for
> MEDIA_URL,http://code.djangoproject.com/ticket/4105this is currently being
> discussed on django-developers.
Thanks for the response, Marc. Your pointer helped me decide to used a
custom template tag, a
Thanks for the info, Jeremy. If I change register.simple_tag("media")
to register.simple_tag(media), and I remove that extraneous path from
INSTALLED_APPS, I now get this error, also from template/__init.py__:
Exception Type: TemplateSyntaxError
Exception Value:Could not parse the
On May 25, 2:28 pm, Greg <[EMAIL PROTECTED]> wrote:
> I have three tables (Manufacturer, Collection, Style). I have 10
> manufacturers. Each manufacturer contains approx. 20 collection.
> Each collection contains approx. 20 Styles. I was wondering if it's
> possible when I'm adding styles I can
On 5/25/07, Bob Dively <[EMAIL PROTECTED]> wrote:
This:
> register.simple_tag("media")
Should be this:
register.simple_tag(media)
And I doubt this is causing this problem, but this:
> 'myapp.main.templatetags',
shouldn't be in your INSTALLED_APPS.
'myapp.main' is the app; Django looks in
Despite several hours of poking around, I'm just not getting how to
make custom template tags and would greatly appreciate a little hand
holding.
I've created a directory called "templatetags" that's in the same
directory as models.py and views.py. In the templatetags directory,
there's an __init
I have three tables (Manufacturer, Collection, Style). I have 10
manufacturers. Each manufacturer contains approx. 20 collection.
Each collection contains approx. 20 Styles. I was wondering if it's
possible when I'm adding styles I can select the manufacturer then my
collection (foreign key) fi
Hi,
I have a many to many relationships between Model1 and Model2. So
django gives me the ability to add an object of Model2 to Model1 as
follows:
Model1_Object.model2_set.add( model2_Object )
Now, I need to have some clean up done once the above takes place. So,
i was considering overriding th
> Just as an aside, when I use this approach I find it handy to use a
> date field, 'deletedate' rather than a flag. This provides the extra
> bit about when an item was deleted, which can sometimes be useful
> later information on.
And since you brought it up . . . a deleted_by field. Because t
Tim,
great answer, but I'm thinking I might need to build a true queryset
myself.
I was really hoping to hack the queryset model to allow this to happen
in the django classes.
Unless I'm missing something, the examples given, can I use those
'basically' as querysets in my templates? i.e. displ
I'm trying to write a view to return a list of blog entries associated
with a specific tag (using the django-tagging app).
Can I do this with a generic view? I've managed to use that for
returning a list of all tags.
--~--~-~--~~~---~--~~
You received this messag
Well, most dyno's (http://en.wikipedia.org/wiki/Dynamometer) should
allow you to download the output to a file, and using Tim's example
for loading, you should be able to put the data into the django app
pretty easy.
Here's what I would try, create a CSV or XML file for testing and
loading into y
Easy way?
Create the model. Probably don't need much more than the user, the
photo and maybe a description.
Create an upload form.
You'll need a view that takes the form and updates the db. One little
gotcha here is that the normal django fileupload won't really work for
you. Use the python file
Thanks guys!
I will mess around with it more to get the feel.
--~--~-~--~~~---~--~~
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
> When I'm at home the best connection I can get is 28.8 dial up. Yeah,
> that's right. When I moved there, the phone company said that we'd
> have DSL "very soon", which apparently means more than 5 years.Since
> I'm not always connected, sometimes checking the docs is less than
> convenient . .
I have done a similar work. What I have done so far :
- use the LocaleURLMiddleware from contribution page
- add a new variable in the context {{LANGUAGE_CODE}}
- change the ereg in my urls.py '^([a-z]{,2}/|)news/$'
I have in mind to :
- hack the url tag to add the language code.
- find
> If, like me, you're constantly referring to the docs on the web site
> when developing, you may enjoy the following: a single PDF of all the
> web docs from djangoproject.com. If you'd like a copy, it is available
> at the URL below.
When I'm at home the best connection I can get is 28.8 dial u
Hi Malcolm,
A short disclaimer: I'm currently trying the unicode branch with the autoescape
patch and a
couple of other patches, so my problems might really be my own problems,
but I don't expect it.
First, I found that I have a problem with commit 5255 together with the test
client. It breaks
You can use a templatetag for MEDIA_URL,
http://code.djangoproject.com/ticket/4105 this is currently being
discussed on django-developers.
El vie, 25-05-2007 a las 14:55 +, Bob Dively escribi�:
> I'm using Django's built-in authentication views to provide login and
> logout capabilities for a
I'm using Django's built-in authentication views to provide login and
logout capabilities for an app. Everything is working great, except
that I can't figure out how to pass context (namely,
settings.MEDIA_URL) to the template that
django.contrib.auth.views.login uses. Any ideas?
--~--~-
Hello,
I'm creating Django multilingual app using django-multilingual and
homebrew middleware. My middleware is similar to Django
LocaleMiddleware but it doesn't perform language negotiation (because
search engines doesn't perform language negotiations and I need to
provide them with a way to inde
Get Guaranteed TOP-10 Ranking in GOOGLE now 1st-Time in PAKISTAN!
For Order Now Pls Call/SMS at
0333-2303103
0345-3034510
For Order by E-mail pls Contact us at
[EMAIL PROTECTED]
TOP-10 Ranking Proved!
SEO Pakistan: In Google TOP 10:
SEO Specialist Pakistan:
I recently emailed the Weborb guys at: http://www.themidnightcoders.com
to see about the possibility of a python version that we could use
with django and he responded like this:
"I would love to add Python to our product line. The biggest challenge
is
finding talent to do it We do not have any
On 24/05/07, robo <[EMAIL PROTECTED]> wrote:
>
> Hi everyone. for the code below at
> http://www.djangoproject.com/documentation/forms/
>
> def create_place(request):
> manipulator = Place.AddManipulator()
>
> if request.method == 'POST':
> # If data was POSTed, we're trying to cr
On May 25, 2:56 pm, myblogs1 <[EMAIL PROTECTED]> wrote:
> Promote yourself/your company/products through a Very Significant and
> Innovative way
>
> Dear Friends,
> Would you like to promote yourself/your company/products through a
> very significant and innovative way?
> Half of the world's poo
hello everyone,
I'm trying to recreate reCaptcha ( http://recaptcha.net/learnmore.html )
in newforms. Trouble is: I want this to be represented by a sinlge Field
inside a form and then do the API calls in the clean() of that Field.
This is how this field/widget should render:
http://api.reca
Promote yourself/your company/products through a Very Significant and
Innovative way
Dear Friends,
Would you like to promote yourself/your company/products through a
very significant and innovative way?
Half of the world's poorest people are children, one out of four
babies is born into poverty a
Promote yourself/your company/products through a Very Significant and
Innovative way
Dear Friends,
Would you like to promote yourself/your company/products through a
very significant and innovative way?
Half of the world's poorest people are children, one out of four
babies is born into poverty a
> H... that is intriguing. Probably overkill for my immediate needs,
> but I see how a simplified version might do it for me. And definitely
> opens up some intriguing possibilities.
>
> John, how do you think you'd hook a dyno up to the app... that could
> be VERY useful, given this little a
akonsu wrote:
> yes, it is an innovative feature. i think it is difficult to implement
> right. the general problem in my understanding is to be able to
> generate a regex that accepts a (partial) input string. then, to
> compare the generated regex with the list in the urls module. this
> involve
It looks ugly to me but did you try:
>>> ustr
u"{'var': 'val'}"
>>> dic = eval(ustr)
>>> dic
{'var': 'val'}
On 25 mai, 12:40, Christian Schmidt <[EMAIL PROTECTED]>
wrote:
> > To validate your images, just try to open it with PIL
>
> When I said I validate the image then did I mean that I try to
Malcolm Tredinnick wrote:
> On Fri, 2007-05-25 at 11:07 +0200, Olivier Guilyardi wrote:
>> Malcolm Tredinnick wrote:
>>
This seems to mean that the resolver and the reverse resolver are not
symmetrical. Is this a bug?
>>> It is. There's a sort of correct patch to fix a few things like th
> To validate your images, just try to open it with PIL
When I said I validate the image then did I mean that I try to open it
with PIL. I do this in the view an if something went wrong I would
save an error variable in the postdata. It is the same like in
http://www.oluyede.org/blog/2007/03/18/d
yes, it is an innovative feature. i think it is difficult to implement
right. the general problem in my understanding is to be able to
generate a regex that accepts a (partial) input string. then, to
compare the generated regex with the list in the urls module. this
involves programming language t
I couldn't find ImageField validation in .96
To validate your images, just try to open it with PIL
from PIL import Image
from cStringIO import StringIO
try:
image = Image.open(StringIO(request.FILES['picture']
['content']))
except:
# raise error here
In practice, I handle pictu
ok, thats the fact. But I can not imagine whats wrong in my code. I
have nearly copy and paste all of it from
http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/
There, it seems to work... how do you validate files or images with
django newforms? Is there somet
On Fri, 2007-05-25 at 09:20 +, Sam wrote:
> Most of the table mapping is taken from a GPL project.
>
> I've just emailed the authors to see if they would relicense the file
> to include it inside django.
>
> I'll update as soon as i have their replies.
Thanks. We only need the mapping table
On Fri, 2007-05-25 at 11:07 +0200, Olivier Guilyardi wrote:
> Malcolm Tredinnick wrote:
>
> >> This seems to mean that the resolver and the reverse resolver are not
> >> symmetrical. Is this a bug?
> >
> > It is. There's a sort of correct patch to fix a few things like this in
> > Trac, so we'll
Most of the table mapping is taken from a GPL project.
I've just emailed the authors to see if they would relicense the file
to include it inside django.
I'll update as soon as i have their replies.
On 25 mai, 10:44, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> On Fri, 2007-05-25 at 10:31 +0
akonsu wrote:
> i would say that yes it is a bug. i have seen many bugs in the reverse
> resolver code. for example, it crashes (throws a python exception) if
> a regex pattern contains question marks (optional elements) and i am
> sure it has a lot more. my personal opinoin is that this code is
>
Malcolm Tredinnick wrote:
>> This seems to mean that the resolver and the reverse resolver are not
>> symmetrical. Is this a bug?
>
> It is. There's a sort of correct patch to fix a few things like this in
> Trac, so we'll get to checking it in at some point.
Should I post a ticket?
Regards,
Hi,
the upload_to argument to FileField evals strftime formatting.
I would like to have the ID of the belonging row.
Example: One MyObject has N attachments.
class Attachment(models.Model):
file=models.FileField(upload_to="%(myobject_id)s")
myobject=models.ForeignKey(MyObject)
This w
On Fri, 2007-05-25 at 10:31 +0200, David Larlet wrote:
> 2007/5/24, Malcolm Tredinnick <[EMAIL PROTECTED]>:
> >
> > Hi folks,
> >
> > The unicode branch, [1], is now at a point where it is essentially
> > feature-complete and could do with a bit of heavy testing from the wider
> > community.
>
>
Hi,
Is there way to customize admin interface for django.contrib.auth?
We are using external authentication and authorization database, so several
options in admin interface are to be hidden (user's password, permissions, 'add
group' button etc), other are to be read-only (user's staff/active st
> > File "/usr/lib/python2.4/urllib.py", line 1162, in urlencode
> > v = quote_plus(str(v))
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\xf2' in
> > position 1: ordinal not in range(128)
>
> This should be fixed in [5338].
well... you already know it works like a charm!
2007/5/24, Malcolm Tredinnick <[EMAIL PROTECTED]>:
>
> Hi folks,
>
> The unicode branch, [1], is now at a point where it is essentially
> feature-complete and could do with a bit of heavy testing from the wider
> community.
Thank you so much for this branch!
> Similarly, the slugify filter still
Hi everyone,
I'm trying to write a view that displays a selection from some Flickr
groups on a page.
I'm unsure where to begin...
I've read this:
http://code.djangoproject.com/wiki/FlickrIntegration
But unsure whether to use FlickrClient or FlickrApi
http://beej.us/flickr/flickrapi/
http://
Jens Diemer schrieb:
> How can i change the help_text after i have generate the form with
> form_for_model() ?
I found a solution:
--
from django.contrib.auth.models import User
UserForm = forms.form_for_model(User, fields=("us
On Fri, 2007-05-25 at 10:02 +0200, Jens Diemer wrote:
>
> How can i change the help_text after i have generate the form with
> form_for_model() ?
At some point you shouldn't be afraid to read the relevant code in
newforms, since it is very well commented and answers to questions like
this just
On May 25, 2:56 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-05-25 at 07:47 +, [EMAIL PROTECTED] wrote:
> > Hi,
>
> > If I have text area like this, > rows="5"> and I load a template using render_to_response.
> > When I load a page and click on text area, A cusor will mo
How can i change the help_text after i have generate the form with
form_for_model() ?
--
Mfg.
Jens Diemer
A django powered CMS: http://www.pylucid.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
On Fri, 2007-05-25 at 07:47 +, [EMAIL PROTECTED] wrote:
> Hi,
>
> If I have text area like this, rows="5"> and I load a template using render_to_response.
> When I load a page and click on text area, A cusor will move to some
> where else instead of at begin of text box. I check a text using
Hi,
If I have text area like this, and I load a template using render_to_response.
When I load a page and click on text area, A cusor will move to some
where else instead of at begin of text box. I check a text using
javascript (escape/unescape) and found that %09 was added.
Is I did something
I want to return 304 (HTTP not modified) for views in my application.
I noticed that both the ConditionalMiddleware and the CommonMiddleware
are capable of doing this for me. Currently, I am using the
CommonMiddleware the USE_ETAGS = True, but I was wondering if this is
the whole story. In my limi
On Thu, 2007-05-24 at 09:13 -0700, sandro dentella wrote:
> Hi Malcom,
>
> I really welcome this branch and thank you all for the effort.
>
> Before I consider a bug what follows I'd ask if this should entitle
> me to use
> non ASCII letters in tests with test.client.
>
>I tried somet
Thanks for the suggestions Russ and Adam.
My first go at this was to use the source. I wrote a script that takes
all the rst files and combines into one. It's not as straight forward
as it sounds because there are conflicts with files using the same
names for link targets and sources which needs
76 matches
Mail list logo