Hi, yes i was approaching it very wrong, but figured it out.
Here is a little test which i got to work with the help of some IRC
django people! (Thanks).
I didnt know that django would also send all the related items from
the intermediate table to the template. Very nice!
I guess I should do some
Hello,
I was following tutorial on django built-in comment system in wiki on
djangoproject.com; Everything went fine, however, I can't figure out
how to use them with custom views, I keep getting different errors.
Tutorial example works only with generic views.
--~--~-~--~~-
On 4/3/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> I remember having some concerns about your approach a while back, but
> apparently they weren't significant enough for me to attach a comment to
> the ticket. A bit careless on my part. :-(
>
> I'll try to reconstruct my thinking in the ba
I use two registration forms one for clients one for vendors.
Depending on form used I would like to assign the user to a group.
How do I use new_user.groups.add('Client')
Below is my code that does not raise any errors but also does not add
the user to the group.
= CODE =
def registe
Stephen Mizell wrote:
> I'm wanting to have upload_to for my file so it uploads to a different
> directory for each user. This works when I use it with a newform, but
> when I try to use the Django admin, it puts None as the username (I
> want to base it on whatever username I select for "user").
Ahh... botched post.
Anyway, check the Page Info "Type" & post your view method if there
are still problems.
-rob
On Apr 2, 9:02 pm, "oggie rob" <[EMAIL PROTECTED]> wrote:
> Try looking at Firefox's "Page Info". That will tell you whether
> Django or Firefox is the issue. It should say Why don
Hey Jay,
On Mon, 2007-04-02 at 23:48 -0400, Jay Parlar wrote:
> On 4/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > At the moment, there is no easy way to change the base directory for
> > file uploads. You can however, change the filename to include
> > sub-directories, I believe (so ch
Try looking at Firefox's "Page Info". That will tell you whether
Django or Firefox is the issue. It should say Why don't you post some
of your view method. It might be
On Apr 2, 7:27 pm, queezy <[EMAIL PROTECTED]> wrote:
> Hi All!
>
> I used response = HttpResponse(pdfbytes, mimetype='applic
On 4/2/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> At the moment, there is no easy way to change the base directory for
> file uploads. You can however, change the filename to include
> sub-directories, I believe (so change foo.blah to upload/dir/foo.blah).
> If you want to try and change
On Mon, 2007-04-02 at 19:17 -0700, [EMAIL PROTECTED] wrote:
> I hope I explain this well.
>
> I'm building a site that will have X number of categories. I don't
> know how many.
> Each category will have at least one item, but I don't know how many.
>
> So, I need to display all categories, then
Hi All!
I used response = HttpResponse(pdfbytes, mimetype='application/pdf') in my
view (of course returning the response var) and firefox still has issues - it
shows pdfbytes instead of rendering.
Is there anything more that I should be doing to make this work with firefox?
I am sure tha
I hope I explain this well.
I'm building a site that will have X number of categories. I don't
know how many.
Each category will have at least one item, but I don't know how many.
So, I need to display all categories, then each item in the category,
then a detail view, without hardcoding the cat
Very cool!
Thanks so much, Ned!! Certainly this will do the trick. ( I have a demo of
this app coming up on Thursday and it would be great if I could actually show
the pdfs rendered.)
Sincerely,
-Warren
- Original Message -
From: Ned Batchelder
To: django-users@googlegroup
We serve PDFs, both in-browser, and out. Here the lines to set the type
and disposition:
response = HttpResponse(pdfbytes, mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename=foo.pdf'
return response
Here pdfbytes are the actual bytes of the PDF file.
Thanks Malcolm! Your post does tell me that one route might be a plugin.
I also figure that Django could send a signal of some sort to the browser.
So your post is helpful!
-Warren
- Original Message -
From: "Malcolm Tredinnick" <[EMAIL PROTECTED]>
To:
Sent: Monday, April 02, 2007
On Mon, 2007-04-02 at 15:35 +, Nuno Mariz wrote:
> The problem is not when the user do /i18n/setlang/?language=pt-br, but
> is in the first visit on the site. The language is not selected(i.e.
> not in the user cookies) and the middleware tries the locale of the
> user browser and sets it even
On Mon, 2007-04-02 at 18:02 -0700, queezy wrote:
> Hi All!
>
> We have a Django application that uses a form to allow users to select
> offices and it sends them off to a pdf. At the present time we are using
> FireFox on a Linux box and we are just using the Django loopback server for
> the
Aha, I applied the patch (#2897), and it works like a charrm!
Thanks everybody!
Leon
On Apr 2, 5:30 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2007-04-02 at 12:19 +, [EMAIL PROTECTED] wrote:
> > Hi,
>
> > Has anyone successfully used gmail's smtp to send mail? I've been
> >
Somebody ja obtained here to setup django in bluehost? I do not obtain
to install psycopg in this server.
--
Andrews Medina
http://pyman.blogspot.com/
www.andrewsmedina.com.br
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
As far as I can tell, every purpose of do_html2python() is handled by
the "clean" methods of newforms. Every clean is performed (different
for each form field) when you call form.is_valid() - this also
involves the new custom validation system.
If you check out the newforms fields.py (http://cod
On Mon, 2007-04-02 at 20:04 +, Stephen Mizell wrote:
> I'm wanting to have upload_to for my file so it uploads to a different
> directory for each user. This works when I use it with a newform, but
> when I try to use the Django admin, it puts None as the username (I
> want to base it on what
Hi All!
We have a Django application that uses a form to allow users to select
offices and it sends them off to a pdf. At the present time we are using
FireFox on a Linux box and we are just using the Django loopback server for
the time being. This means that we don't have a secondary, or ev
Hi all
Thanks for this help.
[EMAIL PROTECTED] wrote:
> There is an advanced RestructuredText django plugin I wrote with the
> help of David Goodger:
> https://svn.python.org/conference/django/trunk/pycon/markup/
That code looks useful, thanks. It will take me a while to have a look at it
and s
something like this works for me...
q = Q( tag__name=first_tag )
for tag in other_tags:
q = q | Q( tag__name=tag )
Model.objects.filter( q )
On 4/2/07, Christian Hoppner <[EMAIL PROTECTED]> wrote:
>
> Hi there!
>
> I've been thinking about including in my new app a kind of tag browser. The
> u
On 4/2/07, johncock <[EMAIL PROTECTED]> wrote:
> would like to use the development version in creating life websites
> So if i make svn update does this affect my projects
It's pretty safe to use the development version, but if you do it's
important to keep an eye on the development timeline and
I'm wanting to have upload_to for my file so it uploads to a different
directory for each user. This works when I use it with a newform, but
when I try to use the Django admin, it puts None as the username (I
want to base it on whatever username I select for "user"). I'm using
some middleware fo
Should I just manually check every Charfield value after a POST and
set it's value to 'None' when I find an empty string? Not sure if
that's the best practise or not!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Download Weather Toolbar - Instant weather reports, forecasts, and
radar images anytime for FREE! - http://offr.biz/HLWTD238206SVRAKSX-groups
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Hi there!
I've been thinking about including in my new app a kind of tag browser. The
url is meant to be in the form of tags/A+B+C.
Of course I know I can use OR queries for this kind of stuff... When the query
string is constructed manually (as a string), I could simply get the tags
from the
I noticed that manipulators use do_html2python() to update blank
values to null so that single quotes don't get inserted into records.
Is there anything like that for newForms? I am trying to save a model
that I manually load information from my newForm data, but all the
blank fields get loaded l
If you use the current trunk, don't be surprised if changes are made that
you have to react to when you get an update on it. It's good stuff, but if
you're not willing to track it as you update and change/fix things
appropriately, you'd be much better off getting a "release" version.
That "bleedin
There is an advanced RestructuredText django plugin I wrote with the
help of David Goodger:
https://svn.python.org/conference/django/trunk/pycon/markup/
This worked very very well, and deals with the problem you ran into by
default.
You can also set overrides in the settings file:
class NullStre
I've had no real problems with the SVN version; if there are you can be
sure to hear about them on this list.
On Mon, 02 Apr 2007 15:48:43 +0100, johncock <[EMAIL PROTECTED]>
wrote:
>
> would like to use the development version in creating life websites
> So if i make svn update does this a
The problem is not when the user do /i18n/setlang/?language=pt-br, but
is in the first visit on the site. The language is not selected(i.e.
not in the user cookies) and the middleware tries the locale of the
user browser and sets it even if the locale is not in the settings.py.
Im testing with the
would like to use the development version in creating life websites
So if i make svn update does this affect my projects
and if so shall i use the stable version instead??
Thank you in advance;
Mary Adel
--~--~-~--~~~---~--~~
You received this message because
On Apr 2, 10:02 am, Atilla <[EMAIL PROTECTED]> wrote:
> On 01/04/07, TaMeR <[EMAIL PROTECTED]> wrote:
>
>
>
> > The standard URLField is to short for the google maps.
> > I have a basic route that is almost 300 char long and they will get
> > longer.
> > I am developing on sqlite3 but I think it
On 01/04/07, TaMeR <[EMAIL PROTECTED]> wrote:
>
> The standard URLField is to short for the google maps.
> I have a basic route that is almost 300 char long and they will get
> longer.
> I am developing on sqlite3 but I think it has something to do with
> Django.
> Does anybody know how I can fix
>
> This is normal Restructured Text behaviour, although I agree it's a bit
> weird when you first see it. It's kind of a consequence of a ReST
> feature combined with us (Django) diving into the middle of the output
> processing pipeline to extract only what we need.
Ah yes, it is the "normal b
> Has anyone successfully used gmail's smtp to send mail? I've been
> trying, but so far no luck. I've added this to my settings.py:
>
> EMAIL_TLS = True
> EMAIL_HOST = smtp.gmail.com
> EMAIL_HOST_PASSWORD = mypassword
> EMAIL_HOST_USER = myusername
> EMAIL_PORT = 465
>
> Is something incorrect/mi
On 4/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Has anyone successfully used gmail's smtp to send mail? I've been
> trying, but so far no luck. I've added this to my settings.py:
>
> EMAIL_TLS = True
> EMAIL_HOST = smtp.gmail.com
> EMAIL_HOST_PASSWORD = mypassword
> EMAIL_HOST_
On Mon, 2007-04-02 at 12:19 +, [EMAIL PROTECTED] wrote:
> Hi,
>
> Has anyone successfully used gmail's smtp to send mail? I've been
> trying, but so far no luck. I've added this to my settings.py:
>
> EMAIL_TLS = True
> EMAIL_HOST = smtp.gmail.com
> EMAIL_HOST_PASSWORD = mypassword
> EMAIL_H
Hi,
Has anyone successfully used gmail's smtp to send mail? I've been
trying, but so far no luck. I've added this to my settings.py:
EMAIL_TLS = True
EMAIL_HOST = smtp.gmail.com
EMAIL_HOST_PASSWORD = mypassword
EMAIL_HOST_USER = myusername
EMAIL_PORT = 465
Is something incorrect/missing, or is
On Sun, 2007-04-01 at 20:36 +1000, Malcolm Tredinnick wrote:
> Hi Colin,
>
> On Sun, 2007-04-01 at 03:18 -0700, CColin wrote:
> > Hi,
> > Recently downloaded the various prerequisites and am following the
> > online manual.
> >
> > All going reasonably well except until chapter 4, Templates.
> >
On Mon, 2007-04-02 at 13:11 +0200, enquest wrote:
> When can we expect the newforms docs to be complete. Is there somewhere
> a beta version of it?
The standard reply to that question in Open Source software is "when
it's ready" -- we prefer to aim for quality, rather than deadlines,
usually.
H
When can we expect the newforms docs to be complete. Is there somewhere
a beta version of 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@g
Donald trump slaps the bitch rosie o donnell
http://www.teenwag.com/playvideo/3539
--~--~-~--~~~---~--~~
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
On Monday 02 April 2007 09:05, Atilla wrote:
> Have you tried specifying "project__name" ? That should be resolved
> correctly in the query set. If it doesn't work, you'll have to
> redefine the order_by method and include the join of the tables there
> explicitly.
TaMeR solved my problem. Thank
On Monday 02 April 2007 09:20, TaMeR wrote:
> On Mar 31, 7:14 am, Gilhad <[EMAIL PROTECTED]> wrote:
> > I have something like this:
> >
> > class Project(models.Model):
> > name = models.CharField(maxlength=10)
> > order = models.IntegerField()
> >
> > def __st
On 30/03/07, oliver <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I am starting out with django and python, don't have much experience
> in either. I have managed to create a few "simple" website with django
> and really enjoy working with it.
>
> But I am a bit stuck on my latest project. I am using a M2M
> The problem is caused by the way that Django loads and indexes
> applications. I haven't tried putting code in __init__.py, but it
> certainly doesn't surprise me that it has caused you difficulties.
>
> > If this is not the
> > case, where
> > is the best place to do the kind of initialisation
Michael Lake wrote:
> Hi all
>
> I have a problem I think when I use the markup package. This provides
> markdown,
> textile and restructuredtext markups. I have the following in views.py:
>
> def testwiki:
>
> content = '''
> Restructured Text Test
> ==
>
> How de d
On Mar 31, 7:14 am, Gilhad <[EMAIL PROTECTED]> wrote:
> I have something like this:
>
> class Project(models.Model):
> name = models.CharField(maxlength=10)
> order = models.IntegerField()
>
> def __str__(self): return self.name
>
> class Task(models.Model):
Thanks Malcolm,
Link number 2 is great and I feel like I got real close.
Reason
The reason I am doing this:
1) this isn't just for weekdays, I am planning on using this for most
of my array/dictionaries
2) Also, I like to give the stuff more control over the site via the
admin
Have you tried specifying "project__name" ? That should be resolved
correctly in the query set. If it doesn't work, you'll have to
redefine the order_by method and include the join of the tables there
explicitly.
On 31/03/07, Gilhad <[EMAIL PROTECTED]> wrote:
>
> I have something like this:
>
> c
54 matches
Mail list logo