Auto fill the form field???

2008-04-23 Thread laspal
Hi, I have a form with the following field. 1)Title 2)Descriptions 3) No of person 3) Drop down box containing the previous filled form title.. Now my question is how to auto fill the form field when a user choose any title from the drop down box. I am doing that so that user can choose any

Re: Auto fill the form field???

2008-04-23 Thread Kenneth Gonsalves
On 23-Apr-08, at 1:12 PM, laspal wrote: > So my question is does django gives any tool for this or do I have to > write java script for it..??? you will have to write javascript for it -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~-~--~~---

filtering in ModelChoices not working

2008-04-23 Thread Kenneth Gonsalves
hi, this is my code snippet: class Ingredientrecform(forms.ModelForm): """ Form to add Ingredients. """ def __init__(self,pageid, *args, **kwargs): super(Ingredientrecform, self).__init__(*args, **kwargs) self.pageid = pageid ingredient

Largest django sites?

2008-04-23 Thread bcurtu
May you enumerate the largest django sites (apart from WSJ)? Do you know traffic stats of these sites? I'm building a big site, with potentially lots of traffic and I'm a bit afraid what I can expect... Thanks --~--~-~--~~~---~--~~ You received this message because

Avoiding the ThreadLocals hack - anything new in NewForms-Admin?

2008-04-23 Thread AndyB
I was reading this page http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser and was wondering how the advice on avoiding the hack applied to my own use case. I am using the ThreadLocals hack to get the current user in a model when overriding the save() method. Therefore I can't pass i

Re: Largest django sites?

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 02:13 -0700, bcurtu wrote: > May you enumerate the largest django sites (apart from WSJ)? Do you > know traffic stats of these sites? I'm building a big site, with > potentially lots of traffic and I'm a bit afraid what I can expect... There are at least two problems with y

Re: Largest django sites?

2008-04-23 Thread bcurtu
Malcom, you're right in many points... I'm trying to identify the possible bottle-necks of the system, and hopefully, if we follow the "share nothing" architecture and the best practices I won't have many problems. The site is not that complex, the only point of danger could be a recommendation en

Re: Largest django sites?

2008-04-23 Thread Guillaume Lederrey
2008/4/23 bcurtu <[EMAIL PROTECTED]>: > But, turning back to my question... Can you tell these sites with > thousands or hundreds of thousands hits per minute? Ok, let's leave > apart their stats... Any big name on the internet? slashdot? twitter > is RoR... Pownce (http://pownce.com/) is bui

Re: Largest django sites?

2008-04-23 Thread Kenneth Gonsalves
On 23-Apr-08, at 3:34 PM, bcurtu wrote: > But, turning back to my question... Can you tell these sites with > thousands or hundreds of thousands hits per minute? Ok, let's leave > apart their stats... Any big name on the internet? slashdot? twitter > is RoR... you could take a look at the djang

Re: Categorize and List if Item Exists

2008-04-23 Thread andy baxter
andy baxter wrote: > you want a tag that would let you write an include file like: > > {% for category in categorybranch %} > sorry that should be {% for category in categorybranch.sub_cats %} > (print category name here) > {% include "self.html" with categorybranch=category %} > {% for product

FTP upload of files threw django

2008-04-23 Thread [EMAIL PROTECTED]
Hello All, I've been working on a quality control portal that uses some features of django. The application is now completely running but the upload of large data files is quit slow. I've been looking around how to speed things up and the only thing i saw was using ftp upload instead of the http

Re: Quick question about qs-rf and queries using distinct and order_by on foreign key fields

2008-04-23 Thread Matt Hoskins
> There's nothing in the queryset-refactor branch that's really "work in > progress" any longer (at least not committed to the tree). So please > open a ticket with a short example so that this doesn't get forgotten. Thanks Malcolm - I've opened a ticket for it now (number #7070). Regards, Matt

Q query question

2008-04-23 Thread bobhaugen
I'm trying to retrieve all Inventory Items whose onhand quantity is greater than zero, OR (whose date is within a specified range AND whose received quantity is zero). InventoryItems have three relevant fields for this query: onhand, inventory_date, and received. I currently have only 2 inventor

Re: No module named views, Django tutorial

2008-04-23 Thread the devel
> I had my project in an apache directory so maybe it has something to > do with permissions. Quoted from the Django Tutorial: If your background is in PHP, you’re probably used to putting code under the Web server’s document root (in a place such as /var/www). With Django, you don’t do that. It

Re: Largest django sites?

2008-04-23 Thread Daniel Hepper
You can also have a look at www.djangosites.org , it lists some sites running django. Revver (www.revver.com), a video-sharing site is one of them. On Wed, Apr 23, 2008 at 12:23 PM, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 23-Apr-08, at 3:34 PM, bcurtu wrote: > > > But, turning back

Re: Largest django sites?

2008-04-23 Thread Chris Hartjes
On Wed, Apr 23, 2008 at 6:04 AM, bcurtu <[EMAIL PROTECTED]> wrote: > > > But, turning back to my question... Can you tell these sites with > thousands or hundreds of thousands hits per minute? Ok, let's leave > apart their stats... Any big name on the internet? slashdot? twitter > is RoR... > I t

Re: Q query question

2008-04-23 Thread bobhaugen
Replying to myself with more clues: I see the problem: For this filter statement: items = InventoryItem.objects.filter( Q(inventory_date__range=(weekstart, thisdate), received__exact=0) | Q(onhand__gt=0)) ,,, the SQL generated looks like this: SELECT "orders_inventoryitem"."id","o

Running Tests: Stop at first error

2008-04-23 Thread Thomas Guettler
Hi, if one unittest fails at the database level, often all following tests fail with this error: execute SQL failed: current transaction is aborted, commands ignored until end of transaction block Is there a way to stop after the first failing test? Thomas -- Thomas Guettler, http://www

Re: Largest django sites?

2008-04-23 Thread Michael
I think the key here is the fact that Django is very scalable. When something starts going wrong with your system, Django has the tools available to figure out where the bottle necks are and it is quite simple. In the past I have hit bottlenecks with mod_python. That was easy to fix by switching to

Re: Language code as part of URL

2008-04-23 Thread akaihola
Andrew, Thanks for your thoughts! > If the content is ultimately the same and you're simply offering > translations you don't want to put the language code before the > resource in the URL. Ie you don't want /fi/second/example/ because the > hierarchy implies that for a different country it's ac

Show diff between fresh and running database schema

2008-04-23 Thread Thomas Guettler
Hi, has some one a script to show the difference between the running database and one which get created by syncdb? Up to now, I used the output of sqlall before and after a model change. But it would be better to do the diff of the running database. Up to now I do it like this: pg_dump -s data

can't save m2m fields using MyModel.objects.create(**kwargs) ?

2008-04-23 Thread sector119
Hi All Can I save m2m fields using MyModel.objects.create(**kwargs) ? If kwargs contains 'm2m_field': [Ob1, Obj2, Obj3]. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Language code as part of URL

2008-04-23 Thread akaihola
Panos, Thanks for the links. I checked the conversation and the blog post, by they address issues I've already solved. What I'm really struggling with is the reverse() problem and how to cleanly move the language activation logic from middleware (Django's default mechanism) to the URL resolver.

Re: Q query question

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 06:03 -0700, bobhaugen wrote: > Replying to myself with more clues: > > I see the problem: > > For this filter statement: > items = InventoryItem.objects.filter( > Q(inventory_date__range=(weekstart, thisdate), received__exact=0) > | > Q(onhand__gt=0)) > > ,

Re: Running Tests: Stop at first error

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 15:06 +0200, Thomas Guettler wrote: > Hi, > > if one unittest fails at the database level, often all following tests > fail with this error: >execute SQL failed: current transaction is aborted, commands ignored > until end of transaction block It's something that wou

Best practices for sending bulk (+4000) mail in Django / Python

2008-04-23 Thread gorans
Hi, I've been sending out email to a list of around 8000 people on a monthly basis using django and was wondering whether there is a way to optimise the process. Currently, I open a mail connection [ mail_connection = SMTPConnection(fail_silently=True) ] and then loop through each message callin

Re: Show diff between fresh and running database schema

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 15:37 +0200, Thomas Guettler wrote: > Hi, > > has some one a script to show the difference between the > running database and one which get created by syncdb? > > Up to now, I used the output of sqlall before and after > a model change. But it would be better to do the > d

Re: How to use ImageField to save images to dynamic path

2008-04-23 Thread PENPEN
I'm not clear how it could be. Could you please explain it in detail? Many thanks! /BRs On Apr 23, 1:34 pm, "Eric Liu" <[EMAIL PROTECTED]> wrote: > Why don't you set 'images/' as a variant.then you can change it dynamically > > 2008/4/23, Rishabh Manocha <[EMAIL PROTECTED]>: > > > > > Yea, I don

Re: can't save m2m fields using MyModel.objects.create(**kwargs) ?

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 06:51 -0700, sector119 wrote: > Hi All > > Can I save m2m fields using MyModel.objects.create(**kwargs) ? If > kwargs contains 'm2m_field': [Ob1, Obj2, Obj3]. No. You need to save an object before it can be used in a many-to-many relation and create() is just a synonym for

Re: Best practices for sending bulk (+4000) mail in Django / Python

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 07:03 -0700, gorans wrote: > Hi, > > I've been sending out email to a list of around 8000 people on a > monthly basis using django and was wondering whether there is a way to > optimise the process. > > Currently, I open a mail connection [ mail_connection = > SMTPConnecti

Re: Auto fill the form field???

2008-04-23 Thread oliver
This will get you started. The JS and the views needed are pretty easy. http://www.willarson.com/blog/?p=37 On Apr 23, 8:42 am, laspal <[EMAIL PROTECTED]> wrote: > Hi, > I have a form with the following field. > > 1)Title > 2)Descriptions > 3) No of person > 3) Drop down box containing the prev

mod_python or fcgi

2008-04-23 Thread Rufman
Hey I was wondering: Is Django faster and stabler using mod_python or fcgi? I read that mod_python can be a memory hog...what are the concrete advantages of using fcgi or mod_python for that matter? any ideas/tips, thanks Stephane --~--~-~--~~~---~--~~ You recei

Re: Calling self.related_object.save() from self.save() ???

2008-04-23 Thread Don Spaulding
On Apr 22, 11:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-04-22 at 13:47 -0700, Don Spaulding wrote: > > [...] > > > I try to do something like this: > > > order = Order() > > order.save() > > order.items.create(price=Decimal("5.00")) > > order.total         #gives me 0 >

Re: Show diff between fresh and running database schema

2008-04-23 Thread Thomas Guettler
Malcolm Tredinnick schrieb: > On Wed, 2008-04-23 at 15:37 +0200, Thomas Guettler wrote: > >> Hi, >> >> has some one a script to show the difference between the >> running database and one which get created by syncdb? >> >> >> > This sounds like it would be really difficult (complex) to mak

Re: Q query question

2008-04-23 Thread bobhaugen
On Apr 23, 9:00 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Complex Q-object combinations on trunk do have a few problems (bugs). It > turns out to be quite hard to get all the combinations working > correctly. This is one of the areas that development of the > queryset-refactor branch has

Re: GeoDjango: distance between PointFields problem

2008-04-23 Thread Justin Bronn
> > (1) What geographic fields are in your model, what type are they > > (e.g., PointField, etc.), and their SRID. > > A plain PointField, e.g.: ``location = PointField()``. I > believeGeoDjangodefaults to WGS84 for the SRID. > > > (2) The geometry type of the parameter you're passing to `distan

Re: Announcing the Django Dash!

2008-04-23 Thread Eric
I see that you can have a team of two, does that include a designer? On Apr 14, 2:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Jonathan, > > I consider those to be utility libraries (unlikely to comprise your > entire app) and should be fine for use.  You may want to document what > ve

Re: Announcing the Django Dash!

2008-04-23 Thread Justin Lilly
Yes. That's including a designer. I base this on his mention of the team sketching out the site design. -justin On Wed, Apr 23, 2008 at 11:25 AM, Eric <[EMAIL PROTECTED]> wrote: > > I see that you can have a team of two, does that include a designer? > > On Apr 14, 2:31 pm, "[EMAIL PROTECTED]" <

Re: Best practices for sending bulk (+4000) mail in Django / Python

2008-04-23 Thread Doug B
I haven't send near 8000 messages yet, but what I did was a combination of what Malcom suggested. I setup a model to queue the messages (pickled email.MIMEMultipart) with a priority, and a cron that runs occasionally to dump N messages per mx domain over time so the mailing trickles out. to the l

Re: Best practices for sending bulk (+4000) mail in Django / Python

2008-04-23 Thread James Tauber
On Thu, 24 Apr 2008 00:11:02 +1000, "Malcolm Tredinnick" <[EMAIL PROTECTED]> said: > Another possibility is to use some sort of queueing system or service so > that the emails are inserted into the queue and then sent over an > extended period of time. django-mailer is intended to be used for ex

Search with Stemming, Accents and Entities

2008-04-23 Thread Rodrigo Culagovski
I am implementing an academic publications database, and am looking for a search solution. I need at the very least Stemming and Accented Characters support (i.e.: searching for "alvarez" returns "álvarez" and v.v.). Some of the fields have a tinymce editor, so the data is stored with html entitie

FilePathField and get_FIELD_url

2008-04-23 Thread skam
It seems that get_FIELD_url accessor method is not available while using FilePathField into my models. Is there any reason why it hasn't been implemented? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: FilePathField and get_FIELD_url

2008-04-23 Thread [EMAIL PROTECTED]
FilePathField can refer to any location on your system, there is no reason to believe it is below the MEDIA_ROOT. On Apr 23, 11:14 am, skam <[EMAIL PROTECTED]> wrote: > It seems that get_FIELD_url accessor method is not available while > using FilePathField into my models. > Is there any reason w

Re: FilePathField and get_FIELD_url

2008-04-23 Thread skam
Okay, that's a valid reason, but I really want these files to be into MEDIA_ROOT and get file's absolute url using a get_FIELD_url method. Is subclassing the field and implementing contribute_to_class method a good idea? On 23 Apr, 18:47, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > FilePathF

Re: FilePathField and get_FIELD_url

2008-04-23 Thread [EMAIL PROTECTED]
You could either do that, or just add a method to your model, both would employ the same logic, it's just a question of reusable vs. time to implement. On Apr 23, 12:17 pm, skam <[EMAIL PROTECTED]> wrote: > Okay, that's a valid reason, but I really want these files to be into > MEDIA_ROOT and get

django searching/checking for user

2008-04-23 Thread Aljosa Mohorovic
i was wondering if there is django related solution for searching/ checking if user (django.contrib.auth + profile) exists or to retrieve similar results? so if i have: search_for = request.POST['search_for'] do i split search_for and basically do sql LIKE search through table fields or is there

Re: FTP upload of files threw django

2008-04-23 Thread Jeff Anderson
[EMAIL PROTECTED] wrote: Hello All, I've been working on a quality control portal that uses some features of django. The application is now completely running but the upload of large data files is quit slow. I've been looking around how to speed things up and the only thing i saw was using ftp u

Re: FilePathField and get_FIELD_url

2008-04-23 Thread Michael
Add this to your model: def get_FILE_url(self): import os from django.conf import settings return '/' + str(self.FILE).split(settings.MEDIA_ROOT)[-1] tadah you have your method without rewriting django fields On Wed, Apr 23, 2008 at 1:22 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]>

Re: FilePathField and get_FIELD_url

2008-04-23 Thread Michael
And you don't even need to import os there (oops) On Wed, Apr 23, 2008 at 1:53 PM, Michael <[EMAIL PROTECTED]> wrote: > Add this to your model: > > def get_FILE_url(self): > import os > from django.conf import settings > return '/' + str(self.FILE).split(settings.MEDIA_ROOT)[-1] >

Re: FilePathField and get_FIELD_url

2008-04-23 Thread skam
Nice one! That's better than implementing a new field because I am using FilePathField in one model only --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: django searching/checking for user

2008-04-23 Thread Michael
If you have auth and sessions working right in Django you can access a logged in user from the request (request.user) and user in auth if you have AUTH_PROFILE_MODULE [1] in your settings you can get the profile from the user with the function get_profile() [1] http://www.djangoproject.com/documen

Reusing a child block in an inherited template

2008-04-23 Thread Filipe Correia
Hi, I'm wondering if the following is possible with django templates. I would like to override a given parent block, while maintaining the contents of it's child block: base.html: {% block firstblock %} Bla bla bla {% block secondblock %} ble ble ble {% endblock %} {% endblock %} in

Relating two objects in a model with eachother

2008-04-23 Thread kalve
Hi, I have got a Person model, and I need create a spouse field. When editing Jane, I need to be able to John as her spouse. Jane cannot have more than one spouse, and only one person can have Jane as spouse. The relation needs to be symmetrical. I have tried both ManyToOne and ForeignKey, but

Re: python-ldap: searching without specifying an OU?

2008-04-23 Thread hotani
This fixed it! http://peeved.org/blog/2007/11/20/ By adding this line after 'import ldap', I was able to search from the root level without specifying an OU: ldap.set_option(ldap.OPT_REFERRALS, 0) --~--~-~--~~~---~--~~ You received this message because you are subs

At what point does a model get its own app? Wigging as I try to adjust to the Django way.

2008-04-23 Thread Jay
I'm working on a project which for the purposes of this conversation we could say is about authors writing and sharing books. My tendency is to want to make an app called "people" and an app called "books," as these are two different models in my mind. A person has certain attributes which would

Re: MultiValueField Question

2008-04-23 Thread James Snyder
As above, I have this working now. Any suggestions on wrapping individual items in items from a multivaluefield in tds? Thanks. -jsnyder --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: At what point does a model get its own app? Wigging as I try to adjust to the Django way.

2008-04-23 Thread Erik Vorhes
There's nothing wrong with parceling out models across different apps. And unless you're planning on distributing each app separately, don't worry about cross-app dependencies. In this case, I'd encourage you to--since you'll probably want to do more than just book-related stuff with your people.

UnicodeDecodeError when rendering template

2008-04-23 Thread Boris Ozegovic
I am getting UnicodeDecodeError, 'ascii' codec can't decode byte 0xc4. I using utf-8 in forms.py, and also, my template is saved as UTF-8. And it doesn't work. Any ideas? This is part of my forms.py -- # -*- coding: utf-8 -*- CHOICES1 = ( ('child', 'Dječja'),

Re: UnicodeDecodeError when rendering template

2008-04-23 Thread [EMAIL PROTECTED]
Are you using .96 or SVN? On Apr 23, 3:56 pm, "Boris Ozegovic" <[EMAIL PROTECTED]> wrote: > I am getting UnicodeDecodeError, 'ascii' codec can't decode byte 0xc4. >  I using utf-8 in forms.py, and also, my template is saved as UTF-8. > And it doesn't work.   Any ideas? > > This is part of my form

Re: UnicodeDecodeError when rendering template

2008-04-23 Thread Boris Ozegovic
On 4/23/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Are you using .96 or SVN? 0.96 --~--~-~--~~~---~--~~ 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@go

Re: UnicodeDecodeError when rendering template

2008-04-23 Thread [EMAIL PROTECTED]
.96 is not unicode enabled, if you need to handle unicode strings you will need to use SVN. On Apr 23, 4:23 pm, "Boris Ozegovic" <[EMAIL PROTECTED]> wrote: > On 4/23/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > >  Are you using .96 or SVN? > > 0.96 --~--~-~--~~

Re: django searching/checking for user

2008-04-23 Thread Aljosa Mohorovic
On Apr 23, 8:32 pm, Michael <[EMAIL PROTECTED]> wrote: > If you have auth and sessions working right in Django you can access a > logged in user from the request (request.user) and user in auth if you have > AUTH_PROFILE_MODULE [1] in your settings you can get the profile from the thanks for info

Re: Q query question

2008-04-23 Thread bobhaugen
> I'm experimenting (so far without success) with a bunch of ways to try > to turn a chain into a queryset. If anybody has any tips, I will be > grateful. Ok, got it, I think - using the idiom from this snippet: http://www.djangosnippets.org/snippets/26/ (My problem was using the chain to popul

Re: Avoiding the ThreadLocals hack - anything new in NewForms-Admin?

2008-04-23 Thread SmileyChris
How about this: Set your model's user field so editable=False Sub-class ModelAdmin Override its `save_add` method, setting form.data['user'] = request.user then calling the super method --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Announcing the Django Dash!

2008-04-23 Thread Jorge Vargas
I'm a bit concern about that. my main development team is composed of 3 people one back one designer and one that takes care the the first two not killing each other. looking at the ratings it seems that if we take one of our 3 people out then we'll lose many points. and chance to get 3? maybe by

'dict' object has no attribute 'autoescape'

2008-04-23 Thread falcon
Hi, A year or two ago I created a small web application in django. I've now brought it out of retirement and am trying to get it up and running with the latest svn trunk code. I realize there have been many changes to django in the mean time, however, the error I am getting just doesn't make sen

Re: Calling self.related_object.save() from self.save() ???

2008-04-23 Thread Jorge Vargas
On Wed, Apr 23, 2008 at 11:09 AM, Don Spaulding <[EMAIL PROTECTED]> wrote: > > > > On Apr 22, 11:24 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > On Tue, 2008-04-22 at 13:47 -0700, Don Spaulding wrote: > > > > [...] > > > > > I try to do something like this: > > > > > order = O

Re: 'dict' object has no attribute 'autoescape'

2008-04-23 Thread James Bennett
On Wed, Apr 23, 2008 at 6:59 PM, falcon <[EMAIL PROTECTED]> wrote: > 94. if (context.autoescape and not isinstance(output, > SafeData)) or isinstance(output, EscapeData): Right there's your problem. you've ended up passing a plain dictionary someplace where Django was expecting you to

Re: mod_python or fcgi

2008-04-23 Thread Graham Dumpleton
On Apr 24, 12:57 am, Rufman <[EMAIL PROTECTED]> wrote: > Hey > > I was wondering: Is Django faster and stabler using mod_python or > fcgi? > > I read that mod_python can be a memory hog...what are the concrete > advantages of using fcgi or mod_python for that matter? That mod_python can be a memo

Re: At what point does a model get its own app? Wigging as I try to adjust to the Django way.

2008-04-23 Thread Jay
I was thinking along the same lines-- it's more of a single, big app than a bunch of portables. And I was worried about models.py becoming too unwieldy. Thanks a lot! On Apr 23, 4:38 pm, "Erik Vorhes" <[EMAIL PROTECTED]> wrote: > There's nothing wrong with parceling out models across different

Re: At what point does a model get its own app? Wigging as I try to adjust to the Django way.

2008-04-23 Thread Michael Elsdörfer
On Apr 23, 10:29 pm, Jay <[EMAIL PROTECTED]> wrote: > In the django docs I see that you can easily make a foreign key by > referencing the model: > > manufacturer = models.ForeignKey('production.Manufacturer') > > ...but it feels like maybe stepping outside the "django way." You can also just i

Re: Announcing the Django Dash!

2008-04-23 Thread Eric
Apparently the design can be done before the dash: This is pretty straightforward. Your team’s hands stay off the keyboard until the Dash officially begins. You’re allowed paper mockups and design but no code. Now, wether that design can be done be someone that's not part of the core team, I don

Re: django searching/checking for user

2008-04-23 Thread Michael
Gotcha, sorry about that, didn't quite get what was being asked. You can do a full text search in your database or implement some external software for search. Also if you have a field that you want items to be alike for you can always bounce off the database for items like that. I have implemente

Re: I'm not getting URL's. Help!

2008-04-23 Thread jeffself
Awesome. Thanks for clearing that up for me. On Apr 22, 4:12 pm, Michael <[EMAIL PROTECTED]> wrote: > Thanks. It was something in your models. > > Django can't just magically figure out what url you want besed on the same > function. Look at the way that you return the get_absolute_url: > > def

trying to edit the geodjango wiki page

2008-04-23 Thread Tyler Erickson
What do I need to do to edit the following page? http://code.djangoproject.com/wiki/GeoDjango It lets me enter edit mode and preview the changes, but when I try to submit the change I get: "500 Internal Server Error (Submission rejected as potential spam)" --~--~-~--~~~---

Django and CSS

2008-04-23 Thread Rodney Topor
Is there something strange about using CSS with Django? When I make my templates refer to external CSS files, the appearance of the template changes, but not the way the CSS file says it should? Is there something special I need to know about this? --~--~-~--~~~---~--

Re: trying to edit the geodjango wiki page

2008-04-23 Thread Darryl Ross
I believe you need to go to the 'settings' page and enter a name and email address first. Cheers -D Tyler Erickson wrote: What do I need to do to edit the following page? http://code.djangoproject.com/wiki/GeoDjango It lets me enter edit mode and preview the changes, but when I try to submit

Re: Django and CSS

2008-04-23 Thread Darryl Ross
Rodney Topor wrote: Is there something strange about using CSS with Django? When I make my templates refer to external CSS files, the appearance of the template changes, but not the way the CSS file says it should? Is there something special I need to know about this? Nothing that I am aware

Re: filtering in ModelChoices not working

2008-04-23 Thread Kenneth Gonsalves
replying to myself On 23-Apr-08, at 2:28 PM, Kenneth Gonsalves wrote: > class Ingredientrecform(forms.ModelForm): > """ > Form to add Ingredients. > """ > def __init__(self,pageid, *args, **kwargs): > super(Ingredientrecform, self).__init__(*args, **kwargs) >

Re: Show diff between fresh and running database schema

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 17:18 +0200, Thomas Guettler wrote: > Malcolm Tredinnick schrieb: > > On Wed, 2008-04-23 at 15:37 +0200, Thomas Guettler wrote: > > > >> Hi, > >> > >> has some one a script to show the difference between the > >> running database and one which get created by syncdb? > >>

Re: Relating two objects in a model with eachother

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 11:49 -0700, kalve wrote: > Hi, > > I have got a Person model, and I need create a spouse field. > > When editing Jane, I need to be able to John as her spouse. Jane > cannot have more than one spouse, and only one person can have Jane as > spouse. The relation needs to be

two column unique index?

2008-04-23 Thread Tim Saylor
I have two columns in my database that must be, as a pair, unique throughout all the rows. Googling tells me I want a two column unique index. From the docs it looks like unique_together is what I want, but that looks like it makes the two columns unique from each other within the row. Is there

Adding an extra INNER JOIN

2008-04-23 Thread jonknee
I have four models that I want to combine into one report. The manual SQL is pretty easy, three INNER JOINS. I just can't figure out how to get the ORM to do it. I'm using the auth app with a custom profile model and that seems to be the issue, since the User model doesn't have a foreignkey to the

Re: two column unique index?

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 22:19 -0700, Tim Saylor wrote: > I have two columns in my database that must be, as a pair, unique > throughout all the rows. Googling tells me I want a two column unique > index. From the docs it looks like unique_together is what I want, > but that looks like it makes th

Re: Adding an extra INNER JOIN

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 22:30 -0700, jonknee wrote: > I have four models that I want to combine into one report. The manual > SQL is pretty easy, three INNER JOINS. I just can't figure out how to > get the ORM to do it. I'm using the auth app with a custom profile > model and that seems to be the i

Re: Displaying attribute from foreign key in admin

2008-04-23 Thread jonknee
> I also get an error when I try 'parent.name'. Try just 'parent'. It will display whatever is coming out of your model by default (in the __str__() or __unicode__() method). That will probably do it for you, but you can access the other information if you write a method for it: class Child(mode

exclude with ForeignKey

2008-04-23 Thread Kevin L
Hello Django users, I'm having trouble with an exclude statement and was hoping some kind soul could help me out. My models are simple, it's basically just two models with a ForeignKey relationship. class Parent(models.Model): pass class Child(models.Model): name = models.CharField(maxlength=

Re: exclude with ForeignKey

2008-04-23 Thread [EMAIL PROTECTED]
If you are getting the correct resultset, just with parents multiple times, add .distinct() to your queryset. On Apr 24, 1:17 am, Kevin L <[EMAIL PROTECTED]> wrote: > Hello Django users, I'm having trouble with an exclude statement and > was hoping some kind soul could help me out. My models are

Re: exclude with ForeignKey

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 23:17 -0700, Kevin L wrote: [...] > I want to get every parent who does not have a child named "Bob". I > initially thought this would just be one exclude statement - > > Parent.objects.exclude(child__name="Bob")[:100] > > However, this gives me a list that includes many p

Re: exclude with ForeignKey

2008-04-23 Thread Malcolm Tredinnick
On Wed, 2008-04-23 at 23:23 -0700, [EMAIL PROTECTED] wrote: > If you are getting the correct resultset, just with parents multiple > times, add .distinct() to your queryset. It sounded more like the case of a parent having children called Anna and Bob. The parent was still being selected, since

Re: FTP upload of files threw django

2008-04-23 Thread Steven Armstrong
[EMAIL PROTECTED] wrote on 04/23/08 13:40: > Hello All, > > I've been working on a quality control portal that uses some features > of django. The application is now completely running but the upload of > large data files is quit slow. I've been looking around how to speed > things up and the onl

Re: exclude with ForeignKey

2008-04-23 Thread Kenneth Gonsalves
On 24-Apr-08, at 11:47 AM, Kevin L wrote: > Hello Django users, I'm having trouble with an exclude statement and > was hoping some kind soul could help me out. My models are simple, > it's basically just two models with a ForeignKey relationship. > > class Parent(models.Model): > pass > class

land for sale

2008-04-23 Thread yanakiev
Hello! I indicate of your attention a building site in Pazardjik town Bulgaria with solicitation to admit it in your offers for sale. The building site is with area 12. 681 dka, is located at the entrance to Pazardjik in bild frontiers in the city and there is a face-106 reciprocal ohms. On"Dimc