Getting the Error 'TypeError, float argument required'

2007-10-05 Thread Greg

Hello,
I have the following field in my class

amount = models.DecimalField("Order Amount", max_digits=6,
decimal_places=2)

Whenever, I add a new record to this class I get the following error:

TypeError at /admin/plush/orders/
float argument required


Any suggestions?

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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



filtering through django templates then through textile

2007-10-05 Thread kan

Say I have a text file. Is it possible to treat the file as a django
template then filter through textile  to finally get xhtml ? This has
the advantage that I can write my web pages in textile but also have
the facilities of django's if then tags. I know about the |textile
filter tag but I want to treat the whole file as a textile document
with django tags in it.




regards,
suresh


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



special codes

2007-10-05 Thread [EMAIL PROTECTED]

http://secretrecipesleaked.blogspot.com/


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Plz, I am just new to Python...

2007-10-05 Thread johnnyn

Here is a nice installation walk-through if you're using Vista...

http://www.cybertechhelp.com/forums/blog.php?b=4

And CLJ's Instant Django install and tutorial works very well for
Windows also.

Best of luck.

On Oct 4, 5:18 pm, Derek Payton <[EMAIL PROTECTED]> wrote:
> > > I tried downloading Django and installing it on my windows looks very
> > > difficult. Plsease can anyone help me on how to install Django and how
> > > to go about starting web development in Phyton?
>
> I think your best bet would be to follow John's advice:
>
> > I'm not sure of the details for doing it on MS Windows. GNU/Linux is a
> > good environment for development of all sorts. I recommend upgrading
> > to Ubuntu.
>
> I can vouch for this. Like you, I started with PHP and moved to
> Python, and I had a heckuva time getting Django setup on Windows. I
> would have a go at it, fiddle with it for a day or two, then leave it
> alone for weeks or months at a time (in the meantime, I was using
> web.py which was a little simpler for me to setup). Then, about 6
> months ago, I made the switch. I ditched Windows and installed Ubuntu.
> Not only was I able to get Django up and running with relative ease,
> but my life in general as a developer has been much better. When it
> comes to programming, you can't really beat a Linux setup (unless, of
> course, you're programming specifically *for* Windows -- which is
> certainly not the case for web development).
>
> Good luck!
>
> --D.


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



All secret recipes of top fast food resturants free

2007-10-05 Thread [EMAIL PROTECTED]

http://secretrecipesleaked.blogspot.com/


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: nesh thumbnails error after moving to unicode

2007-10-05 Thread Divan Roulant

I get the same error since the latest svn upgrade. I tried adding a
"u" before the thumbnail dimensions to make the string unicode in the
template but it doesn't work.

Ex.: 

I also tried adding the encoding instructions

#!/usr/bin/python
# -*- coding: utf-8 -*-

on top of the thumbnail.py file, but it doesn't work either.

Has anyone any other idea? Thanks!!!

Divan

On Sep 6, 9:05 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> hi,
>
> after upgrading to the unicode (latest svn head) nesh thumbnails dont
> work saying: TypeError,Make_thumbnail() keywords must be strings.
> Any clues?
>
> --
>
> regards
> kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



middleware introspection

2007-10-05 Thread Robin Becker

A colleague is writing a response middleware which hijacks the normal view 
under 
certain circumstances. Diagramatically


V0  -->M(0)--> V1  is the normal case view V0 goes directly  to V1 ie the 
middleware M does nothing.

when the hijack is to take place

V0 -->M(1)-->V2-->M(0)-->V1

Now my question

can the middleware determine the template used by V0 so that it can be used 
automatically to generate V2?
-- 
Robin Becker

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Getting the Error 'TypeError, float argument required'

2007-10-05 Thread Thomas Guettler

Am Freitag, 5. Oktober 2007 09:21 schrieb Greg:
> Hello,
> I have the following field in my class
>
> amount = models.DecimalField("Order Amount", max_digits=6,
> decimal_places=2)
>
> Whenever, I add a new record to this class I get the following error:
>
> TypeError at /admin/plush/orders/
> float argument required

How do you add a new record: admin interface, new-admin interface,
custom code?

In Python strings are not automatically converted to numbers. You need
to be explicit:

value=float("1.2")

 Thomas

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: middleware introspection

2007-10-05 Thread Jeremy Dunck

On 10/5/07, Robin Becker <[EMAIL PROTECTED]> wrote:
> can the middleware determine the template used by V0 so that it can be used
> automatically to generate V2?

Yes.  Have a look at django.test.utils.instrumented_test_render and
.setup_test_environment.
You'll see a way to monkeypatch Template.render to make a signal fire
when templates are rendered.

You can have your middleware initialize a list on the request object
before V0 is called (process_request), add templates to the list when
the signal is fired, then do something based on which templates were
used (process_response).

If you find that signal useful, it may be that such a real-world
requirement would drive django.test.signals.template_rendered to be
changed to always fire rather than just when monkeypatched by
django.test.  :)

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: filtering through django templates then through textile

2007-10-05 Thread James Bennett

On 10/5/07, kan <[EMAIL PROTECTED]> wrote:
> Say I have a text file. Is it possible to treat the file as a django
> template then filter through textile  to finally get xhtml ? This has
> the advantage that I can write my web pages in textile but also have
> the facilities of django's if then tags. I know about the |textile
> filter tag but I want to treat the whole file as a textile document
> with django tags in it.

Use the filter tag; I've written some notes on it here:

http://www.b-list.org/weblog/2007/sep/06/tips-and-tricks/

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Random objects in view

2007-10-05 Thread Alessandro Ronchi

2007/10/4, RajeshD <[EMAIL PROTECTED]>:


> Remember that whenever you filter an existing queryset in order to
> progressively develop a query, you get a new queryset. So, you need to
> assign it back to a variable otherwise it's lost in the ether :)

Ops :)
-- 
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Source

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Online Jobs.Earn Rs.50000 every month.Part time Jobs.No Investment

2007-10-05 Thread suri

Online Jobs.Earn Rs.5 every month.Part time Jobs.No Investment

http://netjobss.blogspot.com/


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



combine generic views - object_list and object_detail

2007-10-05 Thread Ana

Hi,
I'd like to get to know if there is possibility to combine generic
views - object_list and object_detail.
In my application I have object_detail template showing Resource
details. The details are resource_name, object_id and
resource_reservation_reasons. Resource_reservation_reasons should be a
list. So far so good.
The problem is that if I add a new reason to the reason list it can be
visible in the template only if I restart my server.
Is there any method to pass object_id (also in url) to the template
which will also show resource_reservation_reasons list in a proper
way?

(in this situation it would be ideal for me if there was object_id
attribute in object_list generic view)

my models:
class Resource (models.Model):

id = models.AutoField(primary_key=True)
resource_name = models.CharField(maxlength=200)
creation_resource_date = models.DateTimeField(auto_now_add=True)
modification_resource_date = models.DateTimeField(auto_now=True)

class ReservationReason(models.Model):

resource = models.ForeignKey(Resource)
reservation_reason = models.CharField(maxlength=200)

thx, Ann


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Blog

2007-10-05 Thread Stefant

This blog it's beautiful watch that

http://www.ssscccrrrooolll.spaces.live.com/

i speak italian and i can translate the post into this blog


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Syntax error in file upload

2007-10-05 Thread jacoberg2

Hey,

I've been working on this view for a while and I keep hitting road
blocks,
the newest one actually hits the save method in my view, but stops on
a weird syntax error.
This is the traceback.

Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py"
in get_response
  74. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.4/site-packages/django/contrib/auth/
decorators.py" in _checklogin
  14. return view_func(request, *args, **kwargs)
File "/opt/vidars/cns/vidars/views/pro.py" in bulk_reg
  100. fi.save()
File "/usr/lib/python2.4/site-packages/django/db/models/base.py" in
save
  204. ','.join(placeholders)), db_values)
File "/usr/lib/python2.4/site-packages/django/db/backends/util.py" in
execute
  12. return self.cursor.execute(sql, params)

  ProgrammingError at /provider/dataset/bulkreg/
  ERROR: syntax error at or near "{" at character 82 INSERT INTO
"vidars_bulkdataregfile" ("user_id","domain_id","bulk") VALUES (10,9,
{'content': '[ac.brms]\ntype: timeseries\nurl:
http://terra.sr.unh.edu/cgi-bin/dataserver.pl\nstart_date:
1997-08-27\nend_date: 200-12-18\nmetadata: These data have been
scraped from the NASA/CDAWEB website:\n 
http://cdaweb.gsfc.nasa.gov/cdaweb/istp_public/\n
They are only meant for internal use and VIDARS testing.\n Use at your
own risk! Jimmy Raeder [EMAIL PROTECTED]:
timeseries\nurl: http://terra.sr.unh.edu/cgi-bin/dataserver.pl\nstart_date:
1997-08-27\nend_date: 2004-12-31\nmetadata: These data have been
scraped from the NASA/\n\t CDAWEB website:http://cdaweb.gsfc.nasa.gov/
\n\t cdaweb/istp_public/ \n They are only meant for internal use and
VIDARS\n\t testing.Use at your own risk! Jimmy Raeder\n\n[ac.bygse]
\ntype: timeseries\nurl: 
http://terra.sr.unh.edu/cgi-bin/dataserver.pl\nstart_date:
1997-08-27\nend_date: 2004-12-31\nmetadata: These data have been
scraped from the NASA/\n\t CDAWEB website:http://cdaweb.gsfc.nasa.gov/
\n\t cdaweb/istp_public/ \n They are only meant for internal use and
VIDARS\n\t testing.Use at your own risk! Jimmy Raeder\n\n\n[ac.bzgse]
\ntype: timeseries\nurl: 
http://terra.sr.unh.edu/cgi-bin/dataserver.pl\nstart_date:
1997-08-27\nend_date: 2004-12-31\nmetadata: These data have been
scraped from the NASA/\n\t CDAWEB website:http://cdaweb.gsfc.nasa.gov/
\n\t cdaweb/istp_public/ \n They are only meant for internal use and
VIDARS\n\t testing.Use at your own risk! Jimmy Raeder \n\n[ac.he-rat]
\ntype: timeseries\nurl: 
http://terra.sr.unh.edu/cgi-bin/dataserver.pl\nstart_date:
1998-11-01\nend_date: 2000-07-31\nmetadata: These data have been
scraped from the NASA/\n\t CDAWEB website:http://cdaweb.gsfc.nasa.gov/
\n\t cdaweb/istp_public/ \n They are only meant for internal use and
VIDARS\n\t testing.Use at your own risk! Jimmy Raeder \n', 'content-
type': 'application/octet-stream', 'filename': 'testfile.ini'})


This is suppose to be a file upload view and this is the following
code for it:

@login_required
def bulk_reg(request):
"""Add large numbers of registrations by uploading a file"""
manipulator = FileManipulator()
data_domain = get_object_or_404(DataDomain, user=request.user.id)
new_data = {}
errors = {}

if request.POST or request.FILES:
new_data = request.POST.copy()
new_data.update(request.FILES)
errors = manipulator.get_validation_errors(new_data)

if not errors:
manipulator.do_html2python(new_data)

fi = BulkDataRegFile(user = request.user,
 domain = data_domain,
 bulk = new_data['bulk'],)
fi.save()

return HttpResponseRedirect('/provider/')

form = forms.FormWrapper(manipulator, new_data, errors)
return render_to_response('provider/dataset/bulkreg.dht',
  {'form': form},
 
context_instance=RequestContext(request),)

and this is the file manipulator that i made for this view

class FileManipulator(forms.Manipulator):

def __init__(self):
self.fields = (

forms.FileUploadField(field_name="bulk",
is_required=True),

)

so is there something im missing or is actually tweeking out about the
type of file it is,
the file upload works perfectly fine when i use it in the admin
interface.

Thanks for the help.

Jacob


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: nesh thumbnails error after moving to unicode

2007-10-05 Thread Chris Moffitt
We've made mods to the thumbnail code to work with Satchmo and more recent
django checkouts.  You can see it here-
http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/thumbnail

-Chris

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



quiz app

2007-10-05 Thread dummy

Hi,

I wrote a little quiz app visible at svn 
http://django-userlibs.svn.sourceforge.net/svnroot/django-userlibs/trunk/apps.quiz
 .

Maybe there is somebody out who needs such an app.

Regards,
Dirk
-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Week start discrepancy between generic view and templates

2007-10-05 Thread Dave Lowe

I'm using the date_based.archive_week generic view, and it provides a
'week' datetime.date object for my template to use. When I output this
in my template: {{ week|date:"W" }} - I get a different week (the
previous one, to be exact). This is due to the fact that weeks begin
with Sunday in generic views, while W in the date filtering gives the
ISO-8601 week number where weeks start with Monday.

Is there a workaround for this (e.g., an alternate to "W" in the date
filtering) or should this be a ticket?


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



OverflowError: mktime argument out of range.

2007-10-05 Thread NitinHayaran

Hi all,

In my setup i m using winXP and mysql.
When i m accessing some css file kept in some directory.
First time the css file is displayed correctly, but when i press
reload button, it is giving below mentioned error,
and if i again press reload the css file is displayed again correctly.
This error is faced alternatively on pressing reload.

Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in
get_response
  77. response = callback(request, *callback_args, **callback_kwargs)
File "C:\Python25\Lib\site-packages\django\views\static.py" in serve
  52. statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):
File "C:\Python25\Lib\site-packages\django\views\static.py" in
was_modified_since
  117. matches.group(1)))
File "C:\Python25\lib\rfc822.py" in mktime_tz
  940. t = time.mktime(data[:8] + (0,))

  OverflowError at /site_media/css/main.css
  mktime argument out of range


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Method calls in templates

2007-10-05 Thread Andreas Ahlenstorf

Hi,

At the moment, it's to possible to retrieve more data in the  
templates using method calls like all() [1]. While this may be fine  
in controlled environments, it may pose a risk at services where you  
have to deal with user supplied templates (think of a service like  
Typepad). An user might use the method calls to access data which he  
isn't supposed to.

Now, I like to know what I have to do to a) disable method calls in  
the templates or b) to disable specific method calls like all() in  
templates without breaking too much.

Generally, I would favor a solution where the access to every method  
is prohibited but where I can still explicitly flag a method as  
accessible.

Regards,
A.

[1] {% for item in foo.bar.all %}

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Method calls in templates

2007-10-05 Thread Jonathan Buchanan

Andreas Ahlenstorf wrote:
> Hi,
> 
> At the moment, it's to possible to retrieve more data in the  
> templates using method calls like all() [1]. While this may be fine  
> in controlled environments, it may pose a risk at services where you  
> have to deal with user supplied templates (think of a service like  
> Typepad). An user might use the method calls to access data which he  
> isn't supposed to.
> 
> Now, I like to know what I have to do to a) disable method calls in  
> the templates or b) to disable specific method calls like all() in  
> templates without breaking too much.
> 
> Generally, I would favor a solution where the access to every method  
> is prohibited but where I can still explicitly flag a method as  
> accessible.
> 
> Regards,
> A.
> 
> [1] {% for item in foo.bar.all %}

http://www.djangoproject.com/documentation/templates_python/#rendering-a-context

"
The template system won’t execute a method if the method has 
alters_data=True set. The dynamically-generated delete() and save() 
methods on Django model objects get alters_data=True automatically. Example:

 def sensitive_function(self):
 self.database_record.delete()
 sensitive_function.alters_data = True
"

Regards,
Jonathan.

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Method calls in templates

2007-10-05 Thread Malcolm Tredinnick

On Sat, 2007-10-06 at 00:08 +0200, Andreas Ahlenstorf wrote:
> Hi,
> 
> At the moment, it's to possible to retrieve more data in the  
> templates using method calls like all() [1]. While this may be fine  
> in controlled environments, it may pose a risk at services where you  
> have to deal with user supplied templates (think of a service like  
> Typepad). An user might use the method calls to access data which he  
> isn't supposed to.
> 
> Now, I like to know what I have to do to a) disable method calls in  
> the templates or b) to disable specific method calls like all() in  
> templates without breaking too much.
> 
> Generally, I would favor a solution where the access to every method  
> is prohibited but where I can still explicitly flag a method as  
> accessible.

The user can only call methods on the objects you pass to the template
via the context. So if you want to restrict what they can do, only pass
in objects that have the methods you want to permit. This is exactly why
this method of function calling isn't any kind of security problem: the
view writer has precise control over what resources are supplied to
template authors.

For example, convert all querysets to lists in the view and pass the
list into the template (or wrap it in a class that provides only an
iterator over the queryset's iterator and no access to the wrapped
object).

Regards,
Malcolm



--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



posgres configuration DATABASE_HOST =''

2007-10-05 Thread rpuchadm

doesn't work if I leave it blank as DATABASE_HOST =''
if I use DATABASE_HOST ='localhost'
works properly

I think "DATABASE_HOST - The host your database is on. Leave this as
an empty string if your database server is on the same physical
machine (not used for SQLite)."
in http://www.djangoproject.com/documentation/tutorial01/ is not true
because in postgres

I'm using ubuntu feisty with its apt installed django mod_python
postgres and psycopg

good luke !!

PD: i could not send a ticket because of "Internal Server Error 500
Internal Server Error (Submission rejected as potential spam)"


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: posgres configuration DATABASE_HOST =''

2007-10-05 Thread Malcolm Tredinnick

On Fri, 2007-10-05 at 15:47 -0700, rpuchadm wrote:
> doesn't work if I leave it blank as DATABASE_HOST =''
> if I use DATABASE_HOST ='localhost'
> works properly
> 
> I think "DATABASE_HOST - The host your database is on. Leave this as
> an empty string if your database server is on the same physical
> machine (not used for SQLite)."
> in http://www.djangoproject.com/documentation/tutorial01/ is not true
> because in postgres
> 
> I'm using ubuntu feisty with its apt installed django mod_python
> postgres and psycopg

This isn't a bug. It's just a matter of configuring postgres to allow
connections via the 'local' connection (by default, it uses only 'host'
connections, which requires specifying a hostname).

We can't cover all the subtlties of postgreSQL configuration in the
Django manual. So have a read of the postgreSQL documentation for how to
change this.

Essentially, if you can run "psql foo" where "foo" is an existing
database on your local machine, you're all set. If you have do "psql -h
localhost foo", then you need to also specify DATABASE_HOST.

Regards,
Malcolm



--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



upload_to dir in ImageField

2007-10-05 Thread Andy

I'm having some trouble with the object.get__url() results
for my image field.  I'm trying to get this going with the Django's
(ver 0.95) development server in WinXP.  I have the following line in
my model:

avatar = models.ImageField(upload_to='users/', blank=True, null=True)

I have the following in my settings.py:

MEDIA_URL = '/media/images/'

When I call object.get_avatar_url in either a view or a template it
returns the following URL:

/media/images/image.jpg

It's missing the 'upload_to' directory, it should be this:

/media/images/users/image.jpg

According to the FileField documentation it is supposed to append the
upload_to dir to the end of the MEDIA_URL, but it's not doing that.
I've tried a lot of variations of beginning/ending slashes but it
doesn't help.  Am I missing something obvious here?  Should it work as
intended on the dev server?

Thanks in advance.


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Method calls in templates

2007-10-05 Thread James Bennett

On 10/5/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> The user can only call methods on the objects you pass to the template
> via the context. So if you want to restrict what they can do, only pass
> in objects that have the methods you want to permit. This is exactly why
> this method of function calling isn't any kind of security problem: the
> view writer has precise control over what resources are supplied to
> template authors.

Although the problem of opening up the Django template language to
arbitrary users runs much deeper; a site administrator needs to be
*very* careful not only about what's passed in the context, but also
about context processors and available tag libraries.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Transforming $6 into NON-STOP INCOME thru PayPal

2007-10-05 Thread kamarulzaman salim
Transforming $6 into NON-STOP INCOME thru PayPal




MAKE MONEY FAST USING PAYPAL!

Here's a legal way to bring in thousands & thousands of extra income using a
great little website service called PayPal!
IT WAS PROVEN on Oprah AND is COMPLETELY LEGAL!!!

You Can Laugh at Money Worries - if You Follow This Simple Plan!
This is an opportunity for people who would like to work at home and have
computer experience and are willing to invest time to get the lifestyle you
have been wanting!
READ ON: Read this entire message carefully! (Print it out or download it.)
I found this on a bulletin board and decided to try it a little.
STEP 1:
Take a few minutes to join Paypal: paypal.com The Internet's most trusted
Internet banking system for your future income. When creating your Paypal
account make sure you use the same Email address as your user name in the
list below so people can send money to your account.

STEP 2:
Once you have a Paypal account running; use Paypal to post $1 to EACH of the
6 Email Addresses below because you pay people with an email address in
Paypal. To do this you may need to use a credit card, which is very easy,
and secure so nobody but Paypal may see it. If you don¹t have a credit card
show this great lucrative offer to someone that has one and get them to help
you pay the $6. What you are doing is creating a service. This is absolutely
legal! You are requesting a legitimate service and you are paying for it!
Like most of us I was a little skeptical and a little worried about the
legal aspects of it all. But I looked around and did some homework and found
it was perfectly legal. Here are the 6 individual Email addresses that you
have to send $1 to through Paypal for this to work properly and for you to
receive money. (If you don't send the money and decide to post the message
with your name in it anyway, Paypal will instantly pick this up and
terminate your account, immediately, besides the other penalties!! If you
did this you could get into serious trouble because it is fraud. (So follow
the instructions and post the $6 and you will make lots of money with no
hassles.)Now send $1 to each of these
following email - addresses through your paypal account: (Just in case you
still haven't one yet, use this link to open one in your name)
paypal.comand pay $1 to each the following 6 email- addresses. In the
message box type
in Please add me to your mailing list - NOTE: if a paypal account on the
list is closed, just skip it and go on to the
next email in the list.

Here is the latest set of emails:


1. [EMAIL PROTECTED]
2. [EMAIL PROTECTED]
3. [EMAIL PROTECTED]
4. [EMAIL PROTECTED]
5. [EMAIL PROTECTED]
6. [EMAIL PROTECTED]

STEP 3:
Now take the #1 Email Address off the list that you see above, move the
other Email Addresses up (6 becomes 5, 5 becomes 4, etc.) and add Your Email
Address as number 6 on the list.

STEP 4:
Change anything you need to, but try to keep this article as close to the
original as possible. Now, post your amended article to at least 200
newsgroups (there are thousands of groups). And email your message to as
many people you can But remember, the more you post and email the more money
you make!

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: flatpages

2007-10-05 Thread AndrewK

May be you forgot to add trailing slash to your flatpage url.

On Sep 23, 11:05 pm, AniNair <[EMAIL PROTECTED]> wrote:
> I tried doing it without the url, it returns a 404 error. The doc says
> that Each time any Django application raises a 404 error, the
> middleware checks the flatpages database for the requested URL as a
> last resort. Yes I have added the middleware,
> 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', and
> did syncdb. In the db I have the django_flatpage table with the url
> and content given from the admin interface... Can you plz tell me
> what's wrong..?


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: upload_to dir in ImageField

2007-10-05 Thread Steve Potter



On Oct 5, 6:45 pm, Andy <[EMAIL PROTECTED]> wrote:
> I'm having some trouble with the object.get__url() results
> for my image field.  I'm trying to get this going with the Django's
> (ver 0.95) development server in WinXP.  I have the following line in
> my model:
>
> avatar = models.ImageField(upload_to='users/', blank=True, null=True)
>
> I have the following in my settings.py:
>
> MEDIA_URL = '/media/images/'
>
> When I call object.get_avatar_url in either a view or a template it
> returns the following URL:
>
> /media/images/image.jpg
>
> It's missing the 'upload_to' directory, it should be this:
>
> /media/images/users/image.jpg
>
> According to the FileField documentation it is supposed to append the
> upload_to dir to the end of the MEDIA_URL, but it's not doing that.
> I've tried a lot of variations of beginning/ending slashes but it
> doesn't help.  Am I missing something obvious here?  Should it work as
> intended on the dev server?
>
> Thanks in advance.


The question is, does it upload the file to the appropriate place?

Personally when I specify an upload_to path I omit the beginning and
end slashes.

Also, I believe the upload_to path is only appended at the time of
upload.  So, if you already had the aforementioned entry in the
database before you set the upload_to path you may get the result you
are seeing.




Steve Potter


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



static images with built-in django server

2007-10-05 Thread staff-gmail

I have read the docs on static files but cannot figure out how to 
specify an image when using the built-in web server. 

If I have my media location:
/myproject/myapp/media/picture1.png

if I have a template file
/myproject/myapp/templates/mypage.html
 
if I try :


I get nothing.  In fact I've tried numerous path variations - using 
media_root in settings.py doesn't seem to work.  This is pretty basic 
and shouldn't be that hard - what am I missing ?

--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Paid Online Surveys, Get Paid For Online Surveys, Get Paid To Take ...

2007-10-05 Thread harina


Do you want to learn how to Get Paid to Take Online Paid Surveys?
Find The Secrets of How You can Earn up to $150 Per Hour:
Here at Survey4Gold, we have found a work at home job for over 4000
people. You can get paid to take online surveys and earn serious
money. Most people have no idea that this opportunity exists let alone
how to profit from it.

The inside knowledge that we offer can show you how to really begin
earning serious money from this little known area.


Find high paying online surveys quickly and easily


Secret methods to fill out surveys super fast

Paid Online Surveys, Get Paid For Online Surveys, Get Paid To Take ...

Work from home when it suits you

We currently house 400 REAL companies that are seeking to provide
employment to those searching for a job at home. These are companies
like Coca Cola, Dell, Microsoft, and even Mcdonalds! Did you know lots
of companies will also pay you to read emails, drive a car, or even
SHOP?. Join Now

You now have the opportunity to get paid for taking these online
surveys thanks to our extensive research. Online paid surveys
represent an outstanding home business for those wanting extra income.
Its time for you to get involved. We provide the information and
resources for you to access a very large potential money making
opportunity.

What could be better that working from home and using the info we
provide you with to take online paid suveys. You will be provided with
the essential info to begin making money immediately. Did you know you
can earn up to $150 per hour?. These companies want you to participate
so order now and start earning from paid surveys.

http://surveyss.blogspot.com/


--~--~-~--~~~---~--~~
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 PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---