Re: How to save a model...

2009-07-30 Thread zayatzz
I did some thinking over night, but still cant figure this one out on my own :) If i want to save foreign key like this, then what should i send to another model, if another object will not work? Alan. --~--~-~--~~~---~--~~ You received this message because you

Re: quick question: how to have *.domainname.com url in django

2009-07-30 Thread weiwei
thanks, i was thinking to have each user have a url as http://username.domain.com/ like http://hiphopo.posterous.com/ On Jul 30, 10:20 pm, Graham Dumpleton wrote: > On Jul 31, 3:09 pm, weiwei wrote: > > > Hello all, > > > I know

Re: quick question: how to have *.domainname.com url in django

2009-07-30 Thread Graham Dumpleton
On Jul 31, 3:09 pm, weiwei wrote: > Hello all, > > I know there are lots of example for how to sethttp://domainname.com/* > url. But how to have http://*.domainname.com   url in django? Really depends on what you are trying to achieve and how you are hosting

quick question: how to have *.domainname.com url in django

2009-07-30 Thread weiwei
Hello all, I know there are lots of example for how to set http://domainname.com/* url. But how to have http://*.domainname.com url in django? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: "join" query in Django?

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 21:23 -0700, Asinox wrote: > Hi, guys, how or where is the "join" query in Django? > > i think that Django dont have "join"..but how ill make join? SQL-level joins happen automatically when required. You specify your queryset in terms of filter() and exclude() calls and

"join" query in Django?

2009-07-30 Thread Asinox
Hi, guys, how or where is the "join" query in Django? i think that Django dont have "join"..but how ill make join? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Template links when Django not domain root

2009-07-30 Thread Graham Dumpleton
If you are using mod_wsgi then you definitely do not need FORCE_SCRIPT_NAME as mod_wsgi does the correct think in respect of setting up SCRIPT_NAME/PATH_INFO. The only time it might not be right with mod_wsgi is if you used WSGIScriptAliasMatch to map the application and you didn't set up the

Re: Weird character shifting in mod_python

2009-07-30 Thread Graham Dumpleton
On Jul 31, 9:27 am, Andrew wrote: > We get these incredibly bizarre errors every once and a while where a > single character of python gets transformed. The code itself isn't > changing, and the area where it pops up changes each time. Any ideas? > > MOD_PYTHON ERROR > >

Re: Template links when Django not domain root

2009-07-30 Thread Streamweaver
I'm not actually using {% url %} at this time. I am setup for mod_wsgi and don't know how to go about configuring links in the templates when the sites root is on a subdirectory. There isn't much in the way of examples on FORCE_SCRIPT_NAME I can find and I'm not really an apache admin so I'm a

Re: Removing objects with many-to-many relationship

2009-07-30 Thread Brian May
On Thu, Jul 30, 2009 at 04:47:05AM -0700, rudy wrote: > class ContentTopic(models.Model): > name = models.CharField() > code = models.CharField() > > class ContentItem(models.Model): > topic = models.ManyToManyField(ContentTopic, db_index=True, > blank=True,

Re: Template links when Django not domain root

2009-07-30 Thread Graham Dumpleton
Using FORCE_SCRIPT_NAME is only appropriate for certain WSGI hosting mechanisms. Using it may simply hide the fact that the OPs application code is wrong to begin with. OP should indicate how they are hosting their application for real site. Ie., mod_python, mod_wsgi, fastcgi or other. Graham

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Prabhu, Let's establish the reason the 404.html doesn't show on a supposed 404 error; that is because every single request on the output you posted a little while ago from the server is responded with a 500 error. Something is fouled up with the

Re: Is it possible to combine these two queries?

2009-07-30 Thread Tim Chase
> al_1 = Alert.objects.filter(creation_date__regex=today).values > ('dimension1').annotate(Sum('metric1')).order_by('dimension1') > > and > > al_2 = Alert.objects.filter(creation_date__regex=yesterday).values > ('dimension1').annotate(Sum('metric1')).order_by('dimension1') > > They are almost

Re: Simple query on a ManyToMany field?

2009-07-30 Thread Adam Olsen
On Thu, Jul 30, 2009 at 6:21 PM, Malcolm Tredinnick wrote: > I've written a couple of solutions for this over the years. Here's a > summary of some of them: > > http://www.pointy-stick.com/blog/2009/03/10/using-djangos-aggregation-features/ > That did it, thanks! --

Re: Custom Manage.py Commands

2009-07-30 Thread mviamari
On Jul 30, 5:24 pm, Malcolm Tredinnick wrote: > On Thu, 2009-07-30 at 17:18 -0700, mviamari wrote: > > I'm trying to create a custom manage.py command for my project.  The > > example in the documentation only shows how to do this for custom > > commands inside of an

Re: Custom Manage.py Commands

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 17:18 -0700, mviamari wrote: > I'm trying to create a custom manage.py command for my project. The > example in the documentation only shows how to do this for custom > commands inside of an app. Is it possible to do the same at the > project level? The concept doesn't

Re: Simple query on a ManyToMany field?

2009-07-30 Thread Malcolm Tredinnick
On Thu, 2009-07-30 at 18:14 -0600, Adam Olsen wrote: > Suppose I have the following models: > > class Tag(models.Model): > card = models.ForeignKey('Card') > name = models.CharField(max_length=10) > > class Card(models.Model): > # whatever > > Say I have a list, like the following:

Custom Manage.py Commands

2009-07-30 Thread mviamari
I'm trying to create a custom manage.py command for my project. The example in the documentation only shows how to do this for custom commands inside of an app. Is it possible to do the same at the project level? I'm currently specifying a Command class in a module file within a

Simple query on a ManyToMany field?

2009-07-30 Thread Adam Olsen
Suppose I have the following models: class Tag(models.Model): card = models.ForeignKey('Card') name = models.CharField(max_length=10) class Card(models.Model): # whatever Say I have a list, like the following: words = ['christmas', 'mother'] This list can be of variable length.

Re: clean_() doesn't handle images?

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 4:02 PM, Martje wrote: > > Hey, > > I've got the following code in my models.py: > > from django import forms > class Foto(models.Model): >omschrijving = models.CharField(max_length=100) >afbeelding =

Re: custom admin actions

2009-07-30 Thread Vasil Vangelovski
You can get the model class for the modeladmin, it's the model property. So modeladmin.model will give you the model class. You can just do a check of equality modeladmin.model == OurModel. On Thu, Jul 30, 2009 at 1:22 PM, selcukcihan wrote: > > Hi, i have django 1.1 > > I

Re: Oracle 11g + mod_wsgi + Apache + Django on Windows 2003 does not work

2009-07-30 Thread tcpipmen
thanks for your reply. i removed oracle 11g and installed 10g express. uninstalled python 2.6 and everything related. and now it is working. so i'm not sure it has to do with 11g??? i just need to test with 11g again in current setup. regards, On Jul 30, 5:23 pm, Xiong Chiamiov

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread prabhu S
Hi Luke, Thanks for your email. The particular source is already fine with no /. I also tried adding slash assuming you swapped the particular line in your email. Can you give another shot and let me know if you can spot something? Regards, Prabhu On Jul 30, 6:46 pm, Luke Seelenbinder

Create a web application

2009-07-30 Thread susanne
Hello Mr.pallavi, Mr.George and other members, I have similar application like palavi. I followed this hints but not success. Please let me know how did you proceed. my python application has functions to perform different calculations. 1) The program reads input file called IN.txt. the IN.txt

ANN: django-forms-builder

2009-07-30 Thread opensou...@citrus.com.au
Hello django-users, My company has allowed me to open source a small django application I've built that I've named django-forms-builder. What it does is allow admin users to create their own front-end website forms for capturing data. I've chosen google code to host the project and welcome any

Weird character shifting in mod_python

2009-07-30 Thread Andrew
We get these incredibly bizarre errors every once and a while where a single character of python gets transformed. The code itself isn't changing, and the area where it pops up changes each time. Any ideas? MOD_PYTHON ERROR ProcessId: 28165 Interpreter:'' ServerName: '*'

multiple admin forms for one model

2009-07-30 Thread sico
Is it possible to have more than one admin interface for a form in the same AdminSite ? I'd like to have an admin form for just editing the model, and another one for editing the model and some sub-records. Is this possible within the same AdminSite ?? You're not allowed to do more than one:

Re:

2009-07-30 Thread Vasil Vangelovski
Hi I've hacked up something quick which will work in most simple cases, but I don't suggest you use the same code as it is. It's just to show you an example of how this can be done. This is the html markup: http://dpaste.com/hold/73500/ And this is the js with jquery:

user in template tag without passing it

2009-07-30 Thread Jake
Hey all, I have a custom template tag like this currently {% extras user.is_authenticated %} basically it returns the results of a different template based on whether the arg is true (user.is_authenticated) I want to make it simpler, just {% extras %} and have the code inside be able to access

Re: view/form with fields from multiple models

2009-07-30 Thread sico
Hey, I've been a little distracted but I'm back on to this now... Thanks for the information, I'm going to try it out now (assuming no more interruptions!) and I'll get back to you on how I get on... On Jul 24, 8:55 pm, Matthias Kestenholz wrote: > On Fri,

overriding clean method on ModelForm class

2009-07-30 Thread sico
Hey, I had a problem recently that caused me some confusion! I have a model that has a OneToOne field as the primary key. When adding a new record in the admin form and entering a key that already existed, I wasn't getting the expected "record already exists" error, instead it was just

Is it possible to combine these two queries?

2009-07-30 Thread David
Hi, I have two queries as follows. al_1 = Alert.objects.filter(creation_date__regex=today).values ('dimension1').annotate(Sum('metric1')).order_by('dimension1') and al_2 = Alert.objects.filter(creation_date__regex=yesterday).values

clean_() doesn't handle images?

2009-07-30 Thread Martje
Hey, I've got the following code in my models.py: from django import forms class Foto(models.Model): omschrijving = models.CharField(max_length=100) afbeelding = models.ImageField(upload_to='media/afbeeldingen/ header/fotos') def clean_afbeelding(self): raise

Re: how save data into more than one table?

2009-07-30 Thread derek
How about posting the code here for a review? On Jul 30, 5:21 pm, Asinox wrote: > Thanks, i did it, i dont know if in the best way but im saving data in > two tables :) thanks :) --~--~-~--~~~---~--~~ You received this message because you are

Re: about a web site

2009-07-30 Thread Lic . José M . Rodriguez Bacallao
second one, any advice? On 7/17/09, Diego Eduardo Ahumada - SICO S.I. S.A. wrote: > > 2009/7/17 Michael : >> On Fri, Jul 17, 2009 at 1:30 PM, Lic. José M. Rodriguez Bacallao >> wrote: >>> >>> anyone? >>> >>> >>> On 7/17/09, Lic. José

Re: MEDIA_URL MEDIA_ROOT

2009-07-30 Thread cootetom
If you are using the django development server whilst developing then you can use django.views.static.serve to download static or media files. You should not use this method in production however as it is not considered stable. Just place this in your url.py file: from settings import DEBUG,

Re: Oracle 11g + mod_wsgi + Apache + Django on Windows 2003 does not work

2009-07-30 Thread Xiong Chiamiov
On Jul 29, 11:57 am, tcpipmen wrote: > Hi All, I have no problem running Oracle 11g with django on build-in > development server and everything is fine.  But When I setup with > mod_wsgi with Apache I'm getting messages like below [snip] > The specified module could not be

Re: MEDIA_URL MEDIA_ROOT

2009-07-30 Thread Xiong Chiamiov
On Jul 30, 3:38 am, Salvatore Leone wrote: > I can't download the files, probably I don't understand the MEDIA_URL > parameter. Here it is: > MEDIA_URL = 'http://localhost:8000/wiz/uploads/' > > but trying to access the files returns me a 404 error. You shouldn't

Re:

2009-07-30 Thread Margie
Are you referring to $.data()? I think that's a great solution. I could attach my data to the tag that the autocomplete is associated with, and then in my jquery function that finds all of those tags and then calls the autocomplete plugin on them, just pull off the stored initialization data

Re: Subclassing CharField

2009-07-30 Thread Xiong Chiamiov
On Jul 30, 7:27 am, Michael Anckaert wrote: > Hello everyone, > > I subclassed the CharField but have run into this problem: How did you subclass CharField? It's difficult to say what the problem is without seeing what you've done.

Re:

2009-07-30 Thread Margie
Ah - ok, I finally see what you are saying. Sorry, I somehow began thinking there was some additional "GET" happening that I just really didn't understand. I didn't understand that "src" was referring to the "src" in the tag. My world had become very confused. Ok, the world is back to one

Re: Missing Roles (group of groups)

2009-07-30 Thread Torsten Bronger
Hallöchen! Thomas Guettler writes: > [...] > > Are there any other django coders who miss this? Yes. Although groups are not too simple for my purposes, roles would make it trivial. Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID:

Re: how encrypt datetime.now with python?

2009-07-30 Thread Asinox
Thanks a lot guys :) --~--~-~--~~~---~--~~ 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

Re: how encrypt datetime.now with python?

2009-07-30 Thread Adam Peacock
That will work, as long as the parent doesn't need to go back into a native object easily - if s/he needs to easily get back into a datetime object, use pickle: import pickle import base64 toEncode = pickle.dumps(datetime.now()) encoded = base64.encodestring(toEncode) decoded =

Re: how encrypt datetime.now with python?

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 convert it to a string: str(datetime.now()) Luke luke.seelenbin...@gmail.com "I [may] disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire Asinox wrote: > hi guys, i want to encrypt the "datetime.now()" ,

how encrypt datetime.now with python?

2009-07-30 Thread Asinox
hi guys, i want to encrypt the "datetime.now()" , im try with base64 but base64 need string... how ill encrypt ? Thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Template links when Django not domain root

2009-07-30 Thread Alex Koshelev
If you are using `{% url %}` template tag or `reverse` function you can set FORCE_SCRIPT_NAME [1] settings variable specified for your deployment project root. Or working with right web-server in front of django project force it to tell proper SCRIPT_NAME himself. [1]:

model inheritance problem

2009-07-30 Thread Unnamed_Hero
Here is my problem. I have a database already filled with some sort of data. I have several tables with "some code" - "value" (without any primary keys at all, but codes are unique). Also there is a table (called c12b) with a "some thing" "note_1", "note_2" "code_1" "code_2", where code_1, code_2

How to save a model...

2009-07-30 Thread zayatzz
... Hello! I have a model (profile) which's only required field is its foreignkey - django.contrib.auth.User. Following the example of forementioned model and its manager i created manager for the profile: class ProfileManager(models.Manager): def create_profile(self, username):

Re:

2009-07-30 Thread Daniel Roseman
On Jul 30, 7:41 pm, Margie wrote: > Hi Vasil, > > Could you clarify how I access the variable from the javascript?  For > example, using my DateWidget as an example, say in my wdigets.py I > have this (note I've added ?myVar='xyz' in second line: > > class

Template links when Django not domain root

2009-07-30 Thread Streamweaver
I have a django project that has worked just fine in development but I'm trying to move it to a demo site and the application is not on a root domain or sub-domain. Instead the site root URL is suppose to be something like https://site.domain.com/appname/ This is causing all my template links

Re:

2009-07-30 Thread Jim Garrison
> But what do you do for a widget where the jquery function being called > requires an argument.  For example, I have an autocomplete widget that > takes as a "prePopulate" argument that contains the value it should > initialized with. Have you considered using the jquery metadata plugin? It

Re: Comment Detail URI

2009-07-30 Thread grElement
> I've read through the two posts above several times now and I'm still > not at all clear what you're asking for. What do you mean by 'queryset > for a particular comment'? A comment isn't associated with a queryset, > it's associated with a particular instance. You're right worded badly and

Re:

2009-07-30 Thread Margie
Hi Vasil, Could you clarify how I access the variable from the javascript? For example, using my DateWidget as an example, say in my wdigets.py I have this (note I've added ?myVar='xyz' in second line: class DateWidget(widgets.DateInput): class Media: js =

Re: introspecting templates

2009-07-30 Thread Daniel Roseman
On Jul 30, 2:25 pm, perrin wrote: > Hi, > > I'd like to determine what data a template uses, in order to optimize > my database access for some large queries.  The idea is to fetch as > much as possible in a single query up front.  Is there any API for > looking at the tags

Re: NASA is using Django for their NEBULA project

2009-07-30 Thread Juan Hernandez
a headhunter is flying around!! BTW teksystems hates me :) On Thu, Jul 30, 2009 at 12:24 PM, mhanb...@teksystems.com < mhanb...@teksystems.com> wrote: > > Hello Django devs! > > I'm supporting NASA on their NEBULA project and they're looking for > Python / Django experts to join their team here

Re: Help with Test Client, Templates and Context

2009-07-30 Thread mviamari
On Jul 30, 12:40 am, Karen Tracey wrote: > On Thu, Jul 30, 2009 at 12:06 AM, mviamari wrote: > > > I'm trying to use the test client to verify my views, but when I check > > the templates and contexts I get 'None' returned instead of the > > context dict

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I think I located your problem. In file invoicy / guidy / urls.py You should change the first url pattern to read: url(r'^/$', 'guidy_default', name='guidy-default'), instead of: url(r'^$', 'guidy_default', name='guidy-default'), That should

Re: Comment Detail URI

2009-07-30 Thread Daniel Roseman
On Jul 30, 4:29 pm, grElement wrote: > I guess what I'm really looking for is someone who has an example of a > reverse() lookup for generic relationships like the ones created in > the django comments, just to be clear. > > Maybe this is just one of those instances where I

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread prabhu S
Hi Karen, Thanks for replying. I have put my 404.html in the same place as that of 500.html. To make sure, I even copy pasted 500.html and changed the error message text alone. Here is an output from the django development server, when I tried to access "sdfsa" (Invalid url) [30/Jul/2009

Re: ANN: Django 1.1 released!

2009-07-30 Thread Mat Clayton
huge congrats, everyone! Been running on trunk for a while now, loving it! On Wed, Jul 29, 2009 at 6:16 PM, matt barto wrote: > > Congrats! Can't wait to try it out. Thanks for all the hard work. > > On Jul 28, 11:23 pm, James Bennett wrote: > >

Re: Application Template on top of Django

2009-07-30 Thread Alex Gaynor
On Thu, Jul 30, 2009 at 11:52 AM, n179911 wrote: > > Hi, > > I am new to Django.  Can you please tell me if there is sample > application template  which builds on top of Django? Like of like > 'AppFuse' http://appfuse.org/ in Java World. > > What I mean is, for common webapp,

NASA is using Django for their NEBULA project

2009-07-30 Thread mhanb...@teksystems.com
Hello Django devs! I'm supporting NASA on their NEBULA project and they're looking for Python / Django experts to join their team here in Mountain View, CA. If you're interested, let me know and we can talk more on how they're using Django in their environment! Thanks, Mehdi

Application Template on top of Django

2009-07-30 Thread n179911
Hi, I am new to Django. Can you please tell me if there is sample application template which builds on top of Django? Like of like 'AppFuse' http://appfuse.org/ in Java World. What I mean is, for common webapp, I need to have * user registration * password recovery * user log in/log out *

Save FormWizard Data to MySQL

2009-07-30 Thread 10000angrycats
Bit of a basic one this: FormWizard generates a list object which doesn't have a save(). What's the simplest code to insert in the sample doc example (http://docs.djangoproject.com/en/1.0/ref/contrib/ formtools/form-wizard/) to save to a mysql database? The relevant spot: from django.http

Re: Comment Detail URI

2009-07-30 Thread grElement
I guess what I'm really looking for is someone who has an example of a reverse() lookup for generic relationships like the ones created in the django comments, just to be clear. Maybe this is just one of those instances where I need to write the query in SQL? Since I'm a django noob, I wanted to

Re: how save data into more than one table?

2009-07-30 Thread Asinox
Thanks, i did it, i dont know if in the best way but im saving data in two tables :) thanks :) On Jul 30, 12:47 am, Asinox wrote: > Thanks a lot Mike, very nice help, you example helpe me with another > thing :) good!!! > > now, when i said "key" (sorry!!) i want to say

django.views.generic.list_detail.object_list and coltrane url reverse lookups

2009-07-30 Thread andreas schmid
hi to all, im going through the practical django projects and i arrived at the part where im setting up generic views for the object listing of the categories. my problem now is that i have the navigation in the base.html which creates (or should) the url with Categories my

Re: Long Poll in Django

2009-07-30 Thread Vasil Vangelovski
I've used orbited with success for this purpose: http://www.orbited.org/ But getting started integrating it with your django project is not very straightforward. On Thu, Jul 30, 2009 at 11:52 AM, aleph wrote: > > Hi! > > Is it possible to use Django with longpoll technique?

Re: Missing Roles (group of groups)

2009-07-30 Thread Adam Stein
I could certainly use it if available. On Thu, 2009-07-30 at 16:05 +0200, Thomas Guettler wrote: > Hi, > > The models from django.contrib.auth look like unix /etc/passwd and /etc/groups > files. > > But roles are more flexible: A role contains roles. A user is a role. > > Are there any other

Subclassing CharField

2009-07-30 Thread Michael Anckaert
Hello everyone, I subclassed the CharField but have run into this problem: In the form HTML output, the label is ok (it used the verbose_name of the model field as expected), but the form validation error message uses 'None' as the field name/label. Appearantly it doesn't know the fields verbose

Re: howto get value of model instance in form.py

2009-07-30 Thread Shuge Lee
# in models.py class Seed(models.Model): name = models.CharField(max_length=128) UPLOAD_ROOT = 'uploads' files = models.FileField(upload_to=UPLOAD_ROOT, blank=True, null=True) source = models.CharField(max_length=256, blank=True, null=True) def __unicode__(self):

howto get value of model instance in form.py

2009-07-30 Thread Shuge Lee
http://dpaste.com/73301/ --~--~-~--~~~---~--~~ 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

Missing Roles (group of groups)

2009-07-30 Thread Thomas Guettler
Hi, The models from django.contrib.auth look like unix /etc/passwd and /etc/groups files. But roles are more flexible: A role contains roles. A user is a role. Are there any other django coders who miss this? I know that this can be implemented with only a few lines. But a reusable solution

Re: problem: TemplateDoesNotExist at /admin/ (linux)

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 9:59 AM, monkut wrote: > > Hmmm... I'm having the same error. > I just installed 1.1 with python 2.6.2, on Windows vista. > > I set up a new project using django-admin.py and a new app to throw > together a new project. > All in all that took

Re: problem: TemplateDoesNotExist at /admin/ (linux)

2009-07-30 Thread monkut
Hmmm... I'm having the same error. I just installed 1.1 with python 2.6.2, on Windows vista. I set up a new project using django-admin.py and a new app to throw together a new project. All in all that took under an hour from download. Now, I've spent just about an hour looking around to find out

Re: captcha

2009-07-30 Thread gabon
this recent tutorial helped me: http://www.marcofucci.com/tumblelog/26/jul/2009/integrating-recaptcha-with-django/ chr On Jul 30, 1:30 pm, gabon wrote: > It seems I've problem installing the recaptcha client library. > > After the setup I still get "no module named

introspecting templates

2009-07-30 Thread perrin
Hi, I'd like to determine what data a template uses, in order to optimize my database access for some large queries. The idea is to fetch as much as possible in a single query up front. Is there any API for looking at the tags used in a template? If not, I was thinking of passing in a custom

Re: How can I reload attributes from the database

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 9:10 AM, Fleg wrote: > > Nobody knows ? > Simply re-get the instance from the DB? Karen > > On Jul 29, 6:12 pm, Fleg wrote: > > Hi, > > I have a model mapping tables in a database with several foreign keys. > >

Re: Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread Karen Tracey
On Thu, Jul 30, 2009 at 8:40 AM, prabhu S wrote: > > Hi All, > > I am not noticing a weird issue in django 1.1. When DEBUG is true in > settings and if I try a non-existent url, django shows me a friendly > 404 page. Now I create 404.html and 500.html and place this in >

Re: How can I reload attributes from the database

2009-07-30 Thread Fleg
Nobody knows ? On Jul 29, 6:12 pm, Fleg wrote: > Hi, > I have a model mapping tables in a database with several foreign keys. > > class Scheduler(models.Model): >         id_schedule = models.AutoField(primary_key=True) >         id_parent = models.ForeignKey >

Re: templatetag issue

2009-07-30 Thread chefsmart
I had something like INSTALLED_APPS = ( 'my_django_app',) in my settings.py. I changed it to INSTALLED_APPS = ( 'my_django_project.my_django_app',) and it set things right. On Jul 30, 1:11 pm, Daymien wrote: > Jippii, > I got the solution :-) > > I don't no why

Re: captcha

2009-07-30 Thread gabon
It seems I've problem installing the recaptcha client library. After the setup I still get "no module named captcha" after the import. Funny enough after the installation it didn't create the captcha folder in the python site-packages folder :S Cheers, chr On Jul 29, 7:45 pm, "Gabriel ."

Custom captcha

2009-07-30 Thread gabon
I'm evaluating the, probably crazy, idea to build a custom captcha, to have it more related to the website. I created a subclass of forms.CharField where on creation I choose the random content and show, for testing purposes, a related label. The problem I'm having is that when the request is

Re: Long Poll in Django

2009-07-30 Thread prabhu S
long poll, push ajax, comet wow too many names for this!!! It will be interesting to study http://code.google.com/p/pygowave-server/ and find out how they implement this. Regards, Prabhu On Jul 30, 10:52 am, aleph wrote: > Hi! > > Is it possible to use Django with longpoll

Django 1.1 returns 500 instead of 404 in non-debug mode

2009-07-30 Thread prabhu S
Hi All, I am not noticing a weird issue in django 1.1. When DEBUG is true in settings and if I try a non-existent url, django shows me a friendly 404 page. Now I create 404.html and 500.html and place this in templates directory. Then If I turn off debug and try a non-existent url, I expect to

Re: dictionaries in template

2009-07-30 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You are overwriting the 'answer' key every time. So there is only one key called 'answer'. Try editing it so you make the 'answer' key a list of the 'attach_list's, that is one possible solution. Or possibly do you mean to use if loops in the

Re: Handle event on a django event Calendar

2009-07-30 Thread kimo
Thank you. I will have a look. On Jul 30, 2:14 pm, Steve Schwarz wrote: > On Thu, Jul 30, 2009 at 6:41 AM, kimo wrote: > > > Hi, > > > Is there a way to have a django Clandar Event, i have a Event model, > > and i want to display the event

Re: Handle event on a django event Calendar

2009-07-30 Thread Steve Schwarz
On Thu, Jul 30, 2009 at 6:41 AM, kimo wrote: > > Hi, > > Is there a way to have a django Clandar Event, i have a Event model, > and i want to display the event information on the calendar in order > to know if the organiser is free or busy on the date event. > > Many

Re: Removing objects with many-to-many relationship

2009-07-30 Thread Steve Schwarz
On Thu, Jul 30, 2009 at 6:47 AM, rudy wrote: > > Hello, everyone! > > I'd like to remove some object with many-to-many relationship from > Django admin interface. Standard removing also removes all related > objects and the list of removed objects displayed on confirmation

Handle event on a django event Calendar

2009-07-30 Thread kimo
Hi, Is there a way to have a django Clandar Event, i have a Event model, and i want to display the event information on the calendar in order to know if the organiser is free or busy on the date event. Many Thanks. I didn't find the Django Calendar. Where can i find some good example please ?

Django Forms with Foreign Key

2009-07-30 Thread kimo
Hi, I have 2 models in django, and im also using ModelForm, my question is the second model have a froreignkey of the 1, and i want to have one page when generating the form. It's possible, how to link the two forms in one page. Class Event(models.Model): id =

Removing objects with many-to-many relationship

2009-07-30 Thread rudy
Hello, everyone! I'd like to remove some object with many-to-many relationship from Django admin interface. Standard removing also removes all related objects and the list of removed objects displayed on confirmation page. But I don't need to remove related objects! Assume we have ContentTopic

custom admin actions

2009-07-30 Thread selcukcihan
Hi, i have django 1.1 I have a user profile model, call it OurUser. I have defined a custom action, "send mail". This action is available in OurUser and django auth's User models. It is handled via a global function with this signature def send_mail_to_users(modeladmin, request, queryset):

MEDIA_URL MEDIA_ROOT

2009-07-30 Thread Salvatore Leone
Hi again, I have configured MEDIA_ROOT = '/home/testpec/public_html/pecwizard/uploads/' and the file uploads works fine, so in the 'uploads' directory there are all my uploaded files. Two questions: 1. in models.py I have the following: class Attach(models.Model): attached_file =

Re: sqlite error: Encrypted or Not a Database

2009-07-30 Thread Art
Thanks, that was it. Art On Jul 29, 10:31 pm, Alex Gaynor wrote: > On Wed, Jul 29, 2009 at 9:06 PM, Art wrote: > > > I have created a Django usingsqliteas the database, and everything > > works fine. But when I try to open the database

[SOLVED]Re: dictionaries in template

2009-07-30 Thread Salvatore Leone
> {% for answer,value in answers_list.items %} > > it works, thanks! -Salvatore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Long Poll in Django

2009-07-30 Thread aleph
Hi! Is it possible to use Django with longpoll technique? What I mean is a client (probably Flex client) which sends a request to server and start recieving data 'forever' - until timeout or something. The django application on server has polling loop or some producer/ customer threads inside -

Re: How to send form via email

2009-07-30 Thread Eugene Mirotin
So put join's arguments in a list or tuple On Jul 29, 5:47 pm, el_k...@interia.pl wrote: > Thank you for your answer but there is error > "join() takes exactly one argument (3 given)" > > "Jeremy Boyd" pisze: > > > > > > > Kolo, > > > I'm not positive this is what you're

Re: Load order for fixtures

2009-07-30 Thread Aaron
For the archives, there's some actually useful information here: http://code.djangoproject.com/ticket/3615 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

  1   2   >