Sorry Carlos,
those patches are far from complete, and I don't use Oracle myself.
For the moment the backends in the patches use the following to get
the connection:
connection = self.model._default_manager.db.connection
Removing the import and putting in that line should do the trick.
so I installed django from "http://www.instantdjango.com/
chapter1.html" and then did the tutorial, and when I tried to execute
it, this is what I got:
Page not found (404)
Request Method: GET
Request URL:http://localhost/crime/arson/
No Crime matches the given query.
You're seeing
hi all
I'd like to have certain fields in several models, like alias field in
this:
class Person(models.Model):
name = models.CharField(max_length=255)
alias = models.ForeignKey('self', blank=True, null=True)
class Place(models.Model):
street = models.CharField(max_length=255)
a
You can also add the same tuple with the help of context processors.
http://www.djangoproject.com/documentation/templates_python/#django-core-context-processors-i18n
http://www.b-list.org/weblog/2006/jun/14/django-tips-template-context-processors/
On Oct 16, 9:58 pm, AniNair <[EMAIL PROTECTED]>
hi all
is there a way to search through all TextFields and CharFields in the
model without knowing their names? or just search through all fields
in the model, in other words I want something like
MyModel.objects.filter(*_icontains='search string')
thanks
Maxim
http://zeliboba.by.ru
--~--~---
I managed to do it by
return render_to_response ('language.html',{'LANGUAGES':LANGUAGES})
and it is working but I just wonder if this is the right way to do
this please help. Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Hi...
I am a beginner using django 0.97 pre with python 2.5.1. I am
trying choose language from the settings.py which has LANGUAGES tuple.
I have
{% for lang in LANGUAGES %}
{{ lang.1 }}
{% endfor %}
Can someone tell me the proper way to do this or suggest a tutorial?
should I return LANGUAGES
Michael,
Yea I'm already using stringformat in my template. However, in my
view code is where I create the order. When the order is added in the
view and I then look at it in the admin the price is displayed as 74.0
instead of 74.00. Here is part of my view code:
p = float(a['choice']) * int(a
You can use "stringformat" in template:
{{ price|stringformat:".2f"}}
On 10/17/07, Greg <[EMAIL PROTECTED]> wrote:
>
> Loren,
> Yes I got that working However, I'm still having the problem when the
> order amount decimal value is .00. So, if the order amount is 74.00.
> I only see 74.0 in the
Loren,
Yes I got that working However, I'm still having the problem when the
order amount decimal value is .00. So, if the order amount is 74.00.
I only see 74.0 in the admin. My admin field is setup this way:
amount = models.DecimalField("Order Amount", max_digits=6,
decimal_places=2)
Thanks
Graham,
You're right, removing the PythonPath line doesn't make any
difference, but the two virtual hosts still have the same problem...so
I guess the next thing that I will try is seeing if I can display the
environment variables via template debugging as you suggest. Thanks
again.
Wiley
> I
On Oct 17, 12:18 pm, Wiley <[EMAIL PROTECTED]> wrote:
> > 1. Why are you using:
>
> > PythonPath "['/usr/lib/python2.5/site-packages/django'] + sys.path"
>
> > It seems awfully odd that you would be adding django package directory
> > to sys.path explicitly.
>
> A friend of mine set it up this way
> 1. Why are you using:
>
> PythonPath "['/usr/lib/python2.5/site-packages/django'] + sys.path"
>
> It seems awfully odd that you would be adding django package directory
> to sys.path explicitly.
A friend of mine set it up this way for me, at the time I was only
using a single
virtual host and i
Thanks for all who repsonded...Graham, I'll go through your steps very
carefully.
Kenneth and Bob, the PythonInterpreter thing was the first thing I
checked (because it was in the official docs) if you notice I have
different PythonInterpreters already set in the two virtual hosts in
my original
On 17-Oct-07, at 12:19 AM, Wiley wrote:
> apache with only one of these hosts enabled, each works fine, its just
> when I run then both at the same time, if i go to mandarinland.com, it
> loads a css-free version of chinabites.comdoes anyone know what's
> going on here? I attach the apache
I am having trouble with Django revision 6110 patched with multi-
db-6110.patch.
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/local/lib64/python2.4/site-packages/django/db/models/
query.py", line 108, in __repr__
return repr(self._get_data())
File "/usr/local/lib6
Hi,
I need to support multiple database connections in our Django
application.
One option being considered is to use the multi-db branch at
http://code.djangoproject.com/svn/django/branches/multiple-db-support
which is already in alpha release.
However by examining the code, it seems the develop
The "choice = " is getting evaluated as a class, and the self.q_prime
is referring to an instance of the class myForm. At least I think
that's what's happening here...
-joe
On 10/16/07, johnny <[EMAIL PROTECTED]> wrote:
>
> Below is my form class. Inside myForm, I tried doing this:
>
> choice
Hmmm, I have been trying to track down what is behind this one for a
while. I only do this as someone who knows about mod_python and not as
a Django user, so dependent on people trying things and giving
feedback.
Although someone else suggested PythonInterpreter directive, you are
already doing t
Below is my form class. Inside myForm, I tried doing this:
choice = forms.ChoiceField(label="My choice",
choices=myChoice(self.q_prime).choices())
I get an error right here "choices=myChoice(self.q_prime).choices()":
name 'self' is not defined
My Form Class:
class myCh
On Oct 16, 11:58 pm, AndyB <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> Am I right in thinking the only way to do is this under CGI etc. is to
> either:
>
> 1. To use raw HTTP authentication
> or
> 2. To pipe all content through Python by reading the file in and
> serving it from a view
Can you exp
check out secdownload plugin using lighttpd server
http://trac.lighttpd.net/trac/wiki/Docs%3AModSecDownload
-Bedros
On Oct 16, 6:58 am, AndyB <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> Am I right in thinking the only way to do is this under CGI etc. is to
> either:
>
> 1. To use raw HTTP authen
> from the "Django with mod python" documentation.
Should have included the link:
http://www.djangoproject.com/documentation/modpython/#multiple-django-installations-on-the-same-apache
Bob
--~--~-~--~~~---~--~~
You received this message because you are subscribe
>
> if form.is_valid():
> clean_data = form.clean_data
> t = Image
If Image is a model class, the above should read:
t = Image()
>
> but it is showing an error saying 'module' object has no
> attribute 'save_photo_file'
--~--~-~--~~
Wiley, I ran into the same problem. Even though I wasn't running two
Django installations in the same VirtualHost caching seemed to be
crossing my installations together. Adding the PythonInterpreter
directive to the virtual hosts did the trick for me - you won't need
the Location directive, just
Hi guys, noob question here about setting up apache to serve up 2
different domains, each with a distinct django project. When I run
apache with only one of these hosts enabled, each works fine, its just
when I run then both at the same time, if i go to mandarinland.com, it
loads a css-free versio
2007/10/16, Joseph Heck <[EMAIL PROTECTED]>:
>
> If I'm reading it correctly, the lack of RESTful verbs was your
> primary consideration for what the API to the queue service failed to
> provide. Is that correct?
>
Exactly, I try to be as RESTful as I can in my current projects and
DQS can be a p
On 10/16/07, David Larlet <[EMAIL PROTECTED]> wrote:
> 2007/10/15, Joseph Heck <[EMAIL PROTECTED]>:
> >
> > Hi David,
> >
> > If you'd be willing to indulge me, why doesn't DQS doesn't fit your
> > requirements? I'd love to have some explicit feedback on where it
> > could be improved to match you
On 10/16/07, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote:
> As it can be seen from the code above, i want some tasks to have
> parent, and a parent must be a task too.
The Django documentation covers this.
http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships
http://www
Dmitriy Sodrianov wrote:
> Hi to all!
>
> Can anyone help me, why none of the following code works:
>
> class Task(models.Model):
> parent = models.ForeignKey(Task)
>
>
Try:
class Task(models.Model):
parent = models.ForeignKey('Task')
It will do the lookup lat
Hi to all!
Can anyone help me, why none of the following code works:
class Task(models.Model):
parent = models.ForeignKey(Task)
class Task(models.Model):
parent = models.ForeignKey(self)
As it can be seen from the code above, i want some tasks to have
parent, and a
On Oct 15, 5:10 pm, Stefan Bethge <[EMAIL PROTECTED]> wrote:
> Just an addition. I would not recommend using oracle with django if
> you don't have an enterprise version which contains the oracle
> connection manager. Without it you won't have connection pooling
> functionality which slows down dj
http://spielwelt6.knightfight.de/?ac=vid&vid=121044096
--~--~-~--~~~---~--~~
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 thi
http://spielwelt6.knightfight.de/?ac=vid&vid=121044096
--~--~-~--~~~---~--~~
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 thi
Am Dienstag, 16. Oktober 2007 15:48 schrieb Jeremy Dunck:
> On 10/16/07, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > you can use the extra() method of QuerySet:
> >
> > Example: Entry.objects.extra(where=['id IN (3, 4, 5, 20)'])
>
> How is this different from __in, and where did tha
On 10/16/07, Doug Van Horn <[EMAIL PROTECTED]> wrote:
>
> On Oct 16, 7:06 am, "Fco. Javier Nievas" <[EMAIL PROTECTED]> wrote:
> > Could you give a link to that patch?
> >
> > Thanks
>
> One last note, there's a link at the bottom of my post to Marty's
> patch. Here it is if you'd rather just hea
On Oct 16, 5:35 am, Divan Roulant <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I loose request data when I call a view with reverse from a previous
> view. Here is what I do:
[snip]
> Is request data supposed to follow or is it normal to loose it? Is
> there another way to preserve request data between
On Oct 16, 7:06 am, "Fco. Javier Nievas" <[EMAIL PROTECTED]> wrote:
> Could you give a link to that patch?
>
> Thanks
I wrote a post about how I handled including a model ID in the path of
an uploaded file:
http://dougblog.com/articles/2007/oct/11/dynamic-upload/
I didn't address any other issu
I've done some work on FileField lately that address some of your concerns.
On 10/16/07, Mark Green <[EMAIL PROTECTED]> wrote:
> * does django properly sanitize the filename or rather, use
> safe temp files? i wonder what would happen if i tried to
> upload a file called "../../traverse.txt"
Hi folks,
Am I right in thinking the only way to do is this under CGI etc. is to
either:
1. To use raw HTTP authentication
or
2. To pipe all content through Python by reading the file in and
serving it from a view
--~--~-~--~~~---~--~~
You received this message
hi all,
i've been playing with ImageField and FileField recently and so
far they work like a charm.
some questions remain, though:
* does django properly sanitize the filename or rather, use
safe temp files? i wonder what would happen if i tried to
upload a file called "../../traverse.txt"
On 10/16/07, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> you can use the extra() method of QuerySet:
>
> Example: Entry.objects.extra(where=['id IN (3, 4, 5, 20)'])
>
How is this different from __in, and where did that list of numbers
come from? :)
--~--~-~--~~---
On Oct 15, 3:11 pm, onno <[EMAIL PROTECTED]> wrote:
> Arn't stings slower against integers?
A datatype of varchar versus integer isn't what's going to slow you
down. If you don't have an index on a column and you use that column
in your predicate (i.e., where clause) you will end up doing a full
Hi,
you can use the extra() method of QuerySet:
Example: Entry.objects.extra(where=['id IN (3, 4, 5, 20)'])
http://www.djangoproject.com/documentation/db-api/#extra-select-none-where-none-params-none-tables-none
Am Dienstag, 16. Oktober 2007 14:29 schrieb Rufman:
> in SQL terms this is what i
This is great.. Did not know that my first post will lead into a flame
war ;)
BTW, thanks everyone for clarifying this. I hope that by the time I
need to move to Oracle, we will have a release with stable build of
Oracle.
Thanks everyone once again.
On Oct 16, 4:42 am, "Jeremy Dunck" <[EMAIL PR
On 10/16/07, Rufman <[EMAIL PROTECTED]> wrote:
>
> in SQL terms this is what i want to do:
> SELECT *
> FROM `build`
> WHERE `iKeyBuildNr`
> IN (
>
>SELECT `iFKeyBuildNr`
>FROM `package`
>WHERE `strPackageName`
> IN ("denon_AVR4306")
>)
>
> How can i do th
On 10/16/07, David Larlet <[EMAIL PROTECTED]> wrote:
> * Review some parts of the code, for example use queryset.count()
> instead of len(queryset), or change this part:
FWIW, doing qs.count() creates a new queryset, then executes it.
Doing len(queryset), then queryset[0], the second access of qu
in SQL terms this is what i want to do:
SELECT *
FROM `build`
WHERE `iKeyBuildNr`
IN (
SELECT `iFKeyBuildNr`
FROM `package`
WHERE `strPackageName`
IN ("denon_AVR4306")
)
How can i do this with the django db api? I tried it with __in, but it
doesn't seem to t
:
in SQL terms this is what i want to do:
SELECT *
FROM `build`
WHERE `iKeyBuildNr`
IN (
SELECT `iFKeyBuildNr`
FROM `package`
WHERE `strPackageName`
IN ("denon_AVR4306")
)
How can i do this with the Django db API? I tried it with __in, but it
doen't seem to take Qu
in SQL terms this is what i want to do:
SELECT *
FROM `build`
WHERE `iKeyBuildNr`
> IN (
>
> SELECT `iFKeyBuildNr`
> FROM `package`
> WHERE `strPackageName`
> IN (
> & quot;
>
> denon_AVR4306 & quot;
>
> )
> )
--~--~-~--~~~---~--~~
You received this message becaus
in SQL terms this is what i want to do:
SELECT *
FROM `build`
WHERE `iKeyBuildNr`
IN (
SELECT `iFKeyBuildNr`
FROM `package`
WHERE `strPackageName`
IN (
& quot;
denon_AVR4306 & quot;
)
)
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Could you give a link to that patch?
Thanks
On 10/11/07, Marty Alchin <[EMAIL PROTECTED]> wrote:
>
>
> As Malcolm mentioned, I put a lot of time into a patch to solve a
> great many problems with FileField, even more than the ones you
> mentioned. It's not in trunk yet, and I don't know when it w
new_data = request.POST.copy()
new_data.update(request.FILES)
form = ThingForm(new_data)
if form.is_valid():
clean_data = form.clean_data
t = Image
t.name = clean_data['name']
if clean_data['photo']:
photo =
Am Montag, 15. Oktober 2007 22:11 schrieb onno:
> Arn't stings slower against integers?
Optimize later. You never know the bottleneck in advance.
Thomas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
Am Dienstag, 16. Oktober 2007 12:35 schrieb Divan Roulant:
> Hello,
>
> I loose request data when I call a view with reverse from a previous
> view. Here is what I do:
>... return HttpResponseRedirect(reverse('my_second_view,
> args=(request,)))
> Is request data supposed to follow or is it no
You can set up your regular expression like so:
import re
number_re = re.compile(r'\d+')
And then when you want to pull numbers out of the string, you can use this line:
number_list = number_re.findall(input_string)
That will give you a list of all the numbers in the string, or an
empty list
Hello,
I loose request data when I call a view with reverse from a previous
view. Here is what I do:
def my_first_view(request):
# Processing here
return HttpResponseRedirect(reverse('my_second_view,
args=(request,)))
def my_second_view(request):
# I would like to processing request
Is it possible to show in admin panel only the objects created by the
current user?
--
Alessandro Ronchi
Skype: aronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Source
--~--~-~--~~~---~--~~
Yo
On 10/16/07, Przemek Gawronski <[EMAIL PROTECTED]> wrote:
>
> Hi, is there a password confirmation widget around, to automatically
> check and validate (with error messages) if it's the same or not with a
> password previously entered (in a different CharField)?
>
> If not, any guide lines on impl
2007/10/15, Joseph Heck <[EMAIL PROTECTED]>:
>
> Hi David,
>
> If you'd be willing to indulge me, why doesn't DQS doesn't fit your
> requirements? I'd love to have some explicit feedback on where it
> could be improved to match your needs. And yes, I know there's a LOT
> of places where it could b
On 10/16/07, Pythoni <[EMAIL PROTECTED]> wrote:
> Thanks a lot for help.It works well for , e.g. John Smith
> but what if a user inserts John.Smith ( period instead of space)?
> I tried to add a period
This is the point where you really want to pause and read Python's
regular-expression docume
Since I haven't much experience with regex, I also can't give you the
solution right away. Perhaps you have to try a bit:
http://docs.python.org/lib/re-syntax.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
On Oct 16, 8:13 am, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
> On 10/16/07, Pythoni <[EMAIL PROTECTED]> wrote:
> ...
>
> > so I have in urls.py
> > (r'^Myscript/(?P\w+)/','miproject.apps.mi.views.mi.Myscript'),
>
> > it works only ifNameis one word, e.g. John.
>
> You'll see documentati
63 matches
Mail list logo