On 08-Dec-06, at 6:43 AM, coulix wrote:
> If create tables without django model classes i guess i wont be
> able to
> use ORM on it right ?
create the tables with django model classes - only populating the
tables will be done directly and not through django
--
regards
kg
Hello guys, i got an intern ship job in a trading company for summer.
They have several servers, and plenty of logs with transactions id and
states.
My job is to parse all these stuffs get the timings of the states and
build an interface to search look at specific transaction.
The log are huge
On 12/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Well it's none of that. The template process time is literally
> 150-500ms using the profiling stuff...
me myself, I'd split that huge template into a hierarchy, and profile
each chunk separately. That might give you a better clue as
>
> Is it possible to process HTTP PUT and DELETE requests with Django? If
> so, how would I access the data uploaded in an HTTP PUT?
>
> (I would like to build a RESTful interface to some Django models. I
> guess I can use POST to upload if I have to, but would like to try
> using PUT if
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote:
Ok... First off - Russell wakes up and realizes the mistake he made.
Note to self - don't answer email with an unhappy 7 month old in your
lap. :-)
I'm not sure which dark corner of my brain 'c.response' came from, but
it was a bad suggestion - that
Whoops!!!
I figured out what I was doing wrong.
In settings.py, I had
TIME_ZONE = 'America/New York'
Notice the space (which should be an underscore) in the middle of New
York. Terribly confused, my system just decided to leave me in UTC for
my own good. Pretty darned confusing, let me tell
On 12/8/06, Rory Campbell-Lange <[EMAIL PROTECTED]> wrote:
>
> I'm not sure how to do a join against a related record:
What you are looking for is:
g = SiteEnergy.objects.filter(siteyear=9, typer__isoffsite=False)
To explain why, lets look at your errors:
>
Noob question: I've just started getting into django, and wanted to get
opinions on auto generating url patterns from a db. Is that bad
practice, will it slow down the site?
I'm thinking of doing this for a few reasons:
1) The client is very particular about the path. So I want to use one
app
My slightly graceless method is to override .save and .delete:
http://groups.google.com/group/django-developers/browse_frm/thread/2caa976249783fae/#
Then whatever model you define, it can only ever have one row (well, it
will have zero rows before you put anything it).
Barry
On Thu, 2006-12-07 at 16:06 -0600, Jacob Kaplan-Moss wrote:
> On 12/7/06 3:41 PM, Todd O'Bryan wrote:
> > OK. I've read the Python docs on tzinfo objects and I think I could make
> > a tzinfo object, but it seems like there should be a way to get one out
> > of the Django innards.
> >
> > I
true, worst idea becouse i need sometimes only quick view what's going
on.
If i need real thumbnail, i can do something like this:
def picture(self):
if no file called self.filename_admin_thumb:
create_the_thumb()
return ''
I can't figure out how to make a validation summary on a form. I have
examined the code in forms\__init__.py, and it reveals nothing about
where the complete list of field/error pairs are stored. I would like
to do a for loop on that dictionary and output a validation summary,
then mark
I'm thinking he said it was the worst idea because it just uses the img
tag width and height to shrink the image - but the admin view would
still have to load the images at actual size.
For actual thumbnails, where the image that is loaded is actually
smaller here are some ideas:
OK. I've read the Python docs on tzinfo objects and I think I could make
a tzinfo object, but it seems like there should be a way to get one out
of the Django innards.
I assume one can use the django.utils.tzinfo.LocalTimezone class to
create a tzinfo object, but what the heck do you pass to the
Solved!
Of course It was my code that was causing it!
Python, apache, django (old or new version) mod_python, fastcgi are
all innocent.
What was it?
RESPONSE_OBJECT = None
def my_view(request):
...blah..
global REPOSNE_OBJECT
if not RESPONSE_OBJECT:
RESPONSE_OBJECT = HttpResponse()
On 12/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Good luck, here's one page's set:
IIRC, you're doing -lots- of hits on these pages. Assuming you're
already caching results where you can (in memcache or http
downstream), you probably need to look at caching loaded templates.
I'm
I've been playing with the sitemap stuff and am finding it to be quite
slick. I do, however, have some questions about some unusual cases.
1)It works beautifully for listing all the detail pages that make up a
list view, but what about the page that takes the list view? In my
case, For example,
Thanks Istvan,
You guessed right I am on windows.
I changed the script, ran it, installed django and navigated to the
built in admin site where I was greeted by the nice clean looking admin
interface that I am used to seeing.
--~--~-~--~~~---~--~~
You received
Paul Childs wrote:
> I'm pretty sure that the download script that I found here...
> http://code.djangoproject.com/ticket/1327
> must not be doing the job properly.
if you are using windows you'll need to change line 41 to:
fp = open(basedir + link, 'wb+')
i.
I'm pretty sure that the download script that I found here...
http://code.djangoproject.com/ticket/1327
must not be doing the job properly.
I took the media from the admin in the 0.95 release and replaced the
dev version's media and that fixed a good chunk of it.
I'll have to do a SVN
Adrian Holovaty wrote:
> I have never seen anything like that. I suspect the images are
> corrupted somehow, and I have no idea how that might have happened.
One common cause is opening files in text mode under windows. The flags
need to be 'wb' not just 'w'
i.
On 12/7/06, Paul Childs <[EMAIL PROTECTED]> wrote:
> Well, I tried again and installed everything from scratch - new
> project, app, database. I went through the first two sections of the
> tutorial and I still got the same problem. I have posted this image of
> the problem which shows how the
On 12/7/06, Paul Childs <[EMAIL PROTECTED]> wrote:
> I think this is a serious problem, should this be posted on the
> developer group or a ticket raised?
The images and CSS in the admin haven't changed, so I'm wondering if
this is an issue with your browser or with a corrupt download maybe...
Well, I tried again and installed everything from scratch - new
project, app, database. I went through the first two sections of the
tutorial and I still got the same problem. I have posted this image of
the problem which shows how the admin looks through Firefox...
Hey Anton,
Another option is to write a wrapper view that makes use of the generic
views but adds more to it. James Bennett over at B-List wrote a very
useful article on this:
http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-generic-views
Why is that the worst idea?
--~--~-~--~~~---~--~~
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
On Dec 7, 2006, at 8:15 AM, [EMAIL PROTECTED] wrote:
>
> Right off the top, I'd suggest alot of your slowdown is in the number
> of http requests. It appears you're making quite a few javascript and
> css calls. I'd see if i could pare that back.
>
>
> Also, temporarily remove your google
On 12/7/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 12/7/06, Anton Daneika <[EMAIL PROTECTED]> wrote:
> > I want a page which displays both the details of an object and the list of
> > the objects. Is there a known way to combine generic views to produce such a
> > thing? The problem is
On 07/12/06, Rory Campbell-Lange ([EMAIL PROTECTED]) wrote:
> I'm not sure how to do a join against a related record:
>
> g=SiteEnergy.objects.filter(siteyear=9, energy__isofsite=False)
> raise TypeError, "Cannot resolve keyword '%s' into field" % name
> TypeError: Cannot resolve keyword
I'm not sure how to do a join against a related record:
g=SiteEnergy.objects.filter(siteyear=9, energy__isofsite=False)
raise TypeError, "Cannot resolve keyword '%s' into field" % name
TypeError: Cannot resolve keyword 'energy' into field
g=SiteEnergy.objects.filter(siteyear=9,
MerMer wrote:
> You can add "editable=False" to you database model. This prevents it
> from showing up in Admin, though of course it can still be edited
> directly in the DB.
This stops it being set in the admin when creating a new object, which
isn't what I want.
I think I'll have to hack
Well it's none of that. The template process time is literally
150-500ms using the profiling stuff...
On Dec 7, 5:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Right off the top, I'd suggest alot of your slowdown is in the number
> of http requests. It appears you're making quite a few
Right off the top, I'd suggest alot of your slowdown is in the number
of http requests. It appears you're making quite a few javascript and
css calls. I'd see if i could pare that back.
Also, temporarily remove your google analytics code... I've seen that
cause a major hang on some sites.
On 12/7/06, cmars232 <[EMAIL PROTECTED]> wrote:
> Is it possible to process HTTP PUT and DELETE requests with Django? If
> so, how would I access the data uploaded in an HTTP PUT?
Try accessing request.raw_post_data, perhaps?
I got it!
I had a mismatch between content_types and permissions. Not sure how it
happened, but it's fixed!
Thanks to everyone, espeically Adrian, for your help. I feel like I can
actually use the admin again!
--~--~-~--~~~---~--~~
You received this message
On 12/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> ContentType matching query does not exist.
> [...]
> I'm not exactly sure what it means, but it's DEFINITELY more helpful.
> Perhaps I should look at my content-type table?
Run this code:
"""
from django.contrib.contenttypes.management
Is it possible to process HTTP PUT and DELETE requests with Django? If
so, how would I access the data uploaded in an HTTP PUT?
(I would like to build a RESTful interface to some Django models. I
guess I can use POST to upload if I have to, but would like to try
using PUT if possible.)
Still no go... what the hell is it looking for?
--~--~-~--~~~---~--~~
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
Good luck, here's one page's set:
### bone.html ###
{% load profiling %}
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;>
http://www.w3.org/1999/xhtml; lang="{{ LANGUAGE_USED }}"
xml:lang="{{ LANGUAGE_USED }}">
http://www.curse-gaming.com; />
On 12/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Any Tips?
>
> Our templates are running from 150ms-500ms process times, something we
> really need to cut down. As far as I can tell it's not doing any
> queries in them.
If you copy-and-paste us your templates, we may be able to give
Any Tips?
Our templates are running from 150ms-500ms process times, something we
really need to cut down. As far as I can tell it's not doing any
queries in them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On 12/7/06, Anton Daneika <[EMAIL PROTECTED]> wrote:
> I want a page which displays both the details of an object and the list of
> the objects. Is there a known way to combine generic views to produce such a
> thing? The problem is that all generic views return HttpResponse which I
> don't need
How can I get the current time in a way that respects the time zone I've
set in Django settings?
Or, alternatively, how do I convert a string like 'America/New York'
into a timezone object?
Thanks,
Todd
--~--~-~--~~~---~--~~
You received this message because
Greetings, django users.
I want a page which displays both the details of an object and the list of
the objects. Is there a known way to combine generic views to produce such a
thing? The problem is that all generic views return HttpResponse which I
don't need in that case -- just the processing.
Ah ha!
DoesNotExist at /admin/auth/user/1/
ContentType matching query does not exist.
Request Method: GET
Request URL:http://gretschpages.com/admin/auth/user/1/
Exception Type: DoesNotExist
Exception Value:ContentType matching query does not exist.
Exception Location:
The firewall has the SVN port closed off so when I noticed this ticket
http://code.djangoproject.com/ticket/1327
I was encouraged to go and get a development version of Django. I
scooped the script and ran it and lo and behold I had Revision 4179 of
the 96-pre version of Django! I uninstalled my
Hello Thejaswi,
On Thu, Dec 07, 2006 at 09:59:28AM -, theju wrote:
> whenever i use the following command (in a python shell)
> I get the following error.
> EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is
> undefined.
Set it in your shell before starting python. I do the
On 12/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Also, I commented out all apps in settings.py except the "default"
> django ones, and it still happened.
>
> Anyone got any more ideas? I kind of need user admin!
Hey Tim,
"svn update" your code, assuming you're using the Django
Hi,
I use Django 0.95 with python 2.4.4 on Fedora Core 6.
I want to use the object_list generic view from
django.views.generic.list_detail.object_list, but whenever i use the
following command (in a python shell)
>>> from django.views.generic import list_detail
I get the following error.
///
Hello,
I am currently working on a Django app and am quite pleased with the
framework overall.
The problem I am currently having is that the default Django admin
widget for a ManyToMany relationship is a multiple select box. This is
causing a big problem for me since I have thousands of
On 12/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hrm if that's the case, I msut have slipped up in the code somewhere.
> Thanks :)
>
> I'll go see if i am inserting into sessions for some reason if they're
> anonymous.
To aid in things like this, I used a modded version of sessions
For a model I have defined two table fields.
To fill those fields in admin I want to provide an extra dropdown
field.
Is it possible to add an extra field to the model without creating a
corresponding database field?
The use:
field1 = content_type_id
field2 = content_item_id
Extra dropdown
Russ,
I think I had failed to import everything. I have now used "from
django import * with partial success. Then I tried.
>>c=Client()
>>d=c.get('/promotions/')
>>d.content
This worked and returned me a large page of in my shell view.
However,
>>d.context
>>d.template
returns nothing.
class GradeMembers(models.Model):
grade = models.ForeignKey(Grade, edit_inline=models.TABULAR)
user = models.ForeignKey(User, raw_id_admin=True, core=True)
grade_group = models.ManyToManyField(GradeGroup)
this doesn´t work:
grademembers =
Thanks for the input guys. I'm kind of approaching this from a client
perspective, so was fishing around for the simplest use case from an
inexperienced admin user's point of view.
The suggestions of using a Page and "chunk" schema makes perfect
sense, and a quick Google threw up a good
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote:
>
> Russ,
>
> Many thanks for the response. However, c.response isn't working for
> me. I'm getting "No attribute found". Running dir(c) does not show up
> this method.
That's wierd. I can't think of any obvious reason that that would happen.
Ok -
On 12/7/06, MerMer <[EMAIL PROTECTED]> wrote:
> Many thanks for the response. However, c.response isn't working for
> me. I'm getting "No attribute found". Running dir(c) does not show up
> this method.
Random, possibly silly question: do you have CommonMiddleware enabled
with APPEND_SLASH =
Yes, me too
It failed twice since Monday morning.
)c:
But 'happily', it is not a mission critical site, so I can afford to
have some downtime from time to time.
Which you luck.
Phil.
On Dec 6, 11:43 pm, "coulix" <[EMAIL PROTECTED]> wrote:
> I did the rename trick, still screw today.
> I will
Russ,
Many thanks for the response. However, c.response isn't working for
me. I'm getting "No attribute found". Running dir(c) does not show up
this method.
MerMer
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Me too. I am looking at putting up a dedicated web server.
Its going to cost me between 1200 to 1600 USD a year compared to $99 I paid
Dreamhost.
But I think it will be worth it.
Ramdas
On 12/7/06, coulix <[EMAIL PROTECTED]> wrote:
>
>
> I did the rename trick, still screw today.
> I will
60 matches
Mail list logo