Re: Is it really this hard?

2007-05-16 Thread John M
web stuff that I don't want to write a site that is vulnerable. John On May 15, 7:31 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 5/16/07, anders conbere <[EMAIL PROTECTED]> wrote: > > > > > As far as I know the officially recommended way

Re: Is it really this hard?

2007-05-16 Thread John Matthew
ata['fk_id'] = fkobjid ? Thanks John On 5/16/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 5/16/07, John M <[EMAIL PROTECTED]> wrote: > > Thanks for info, but what happens when the form.save() is called, > > since the FK isn't part of the cl

Re: Is it really this hard?

2007-05-16 Thread John Matthew
WOW, I hadn't seen that first one, and the second one is the 'standard' for most newforms replies, great work! Thanks again Michael. John On 5/16/07, Michael Trier <[EMAIL PROTECTED]> wrote: > > > These two posts gave me everything I needed to tackle th

Re: Is it really this hard?

2007-05-16 Thread John M
I also have to add that this forum is the BEST! Responses are so quick and give the greatest info I've found so far. Thanks to everyone who's replied. John On May 16, 1:48 pm, "John Matthew" <[EMAIL PROTECTED]> wrote: > WOW, I hadn't seen that first one, a

Re: Is it really this hard?

2007-05-16 Thread John M
one for their help, and as soon as I get the final parent / child code completed, i'll be posting that too. Thanks again! John On May 15, 5:56 pm, John M <[EMAIL PROTECTED]> wrote: > I have checked the forum, and still can't believe I can't find a > solution to what

Re: Is it really this hard?

2007-05-16 Thread John Matthew
Wow, very cool, I didn't know that James! Again, thank you! I was trying obj.portfolio = portid and then obj.portfolio.id = portid < that was really bad according to django :-) J On 5/16/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 5/16/07, John M &l

Re: Can I prepopulate a SlugField with a ForeignKey?

2007-05-20 Thread John-Scott
urn '%s, %s' % (self.last_name, self.first_name) else: return self.last_name Sorry, I haven't yet used SlugField or the 'prepopulate_from' shortcut, so I don't have any advice on your troubles there. Good luck, John-Scott Atlakson On May 21, 12:0

Re: WANTED: Demonstration of good FK & M2M form creation

2007-05-21 Thread John M
So Malcolm, does that mean its in the devl version we could see? J On May 21, 5:56 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-05-20 at 11:19 -0700, David Priest wrote: > > I believe I have performed exhaustive research on the challenge of > > creating forms that incorporate

why a key error

2007-05-21 Thread John M
i am getting a key error with the following: sqlite3 class Holding(models.Model): portfolio = models.ForeignKey(Portfolio, editable=False) symbol = models.CharField(maxlength=10) reason = models.CharField(maxlength=200, blank=True, null=True) shares = models.Floa

Re: why a key error

2007-05-21 Thread John M
limit them. BTW, thanks for a quick response, I see a plethora of responses from you on almost every topic! J On May 21, 6:54 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Hi John, > > > > On Mon, 2007-05-21 at 18:41 -0700, John M wrote: > > i am getting a key

Re: WANTED: Demonstration of good FK & M2M form creation

2007-05-21 Thread John M
Next time I'll RTFT (read the fliping thread) correctly :-P Thanks Malcolm. J On May 21, 6:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-05-21 at 18:25 -0700, John M wrote: > > So Malcolm, does that mean its in the devl version we could see? > >

Re: why a key error

2007-05-21 Thread John M
e :- I'll download the latest newforms code and try again, thanks so much. John On May 21, 7:29 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-05-22 at 02:14 +, John M wrote: > > Malcolm, > > > Here is the traceback from line 41: > >

Re: why a key error

2007-05-21 Thread John M
BTW, That did it! I copied the code from the save_instance() update and fixed my problem. Thanks again. John On May 21, 7:29 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-05-22 at 02:14 +0000, John M wrote: > > Malcolm, > > > Here is the trace

queryset by custom field

2007-05-21 Thread John M
Is it possible to order a queryset by a custom field? I have several programmatic generated fields and need to sort the display by them, is this possible? Thanks John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Sitemaps and large sites

2007-05-22 Thread John DeRosa
t N objects of every class? If so, then how do the search engines find out about the infrequently updated objects? John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Sitemaps and large sites

2007-05-22 Thread John DeRosa
John DeRosa wrote: > I've implemented sitemaps for my site (www.trenchmice.com), and I've run > into a problem because of my site's size. [ snip ] Eh, I don't know why this became a reply to an existing thre

Sitemaps and large sites

2007-05-22 Thread John DeRosa
gines find out about the infrequently updated objects? John --~--~-~--~~~---~--~~ 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 unsu

Sorting on calculated fields

2007-05-24 Thread John M
If I have a model that returns calculated fields, how would I sort a query set on them? Assume the query sets are relatively small (< 100) for now. Is this possible? Thanks john --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: So how would YOU... (database question)

2007-05-24 Thread John M
Tim, Brilliant idea. I'm a car nut and what you've built would allow a Dyno to be plugged into his django app and record all the data for a particular car, and then just have a view that pulled out the max hp or torque. Very coolmultiple measurements associated with a given vehicle: > > class

Re: So how would YOU... (database question)

2007-05-25 Thread John M
ht do it for me. And definitely > opens up some intriguing possibilities. > > John, how do you think you'd hook a dyno up to the app... that could > be VERY useful, given this little app's future. > > On May 24, 7:32 pm, John M <[EMAIL PROTECTED]> wrote: > &g

Re: Sorting on calculated fields

2007-05-25 Thread John M
see how they work, thanks for everyone's response! John On May 24, 7:15 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > If I have a model that returns calculated fields, how would I sort a > > query set on them? > > > Assume the query sets are relatively small (<

Re: Very large scale sites in Django

2007-05-31 Thread John M
I would love to know your site. On May 31, 5:26 am, Daniel Ellison <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm about to start a Django project that will be replacing an existing > high-profile Drupal site. The existing site has extremely high traffic - > approximately 1,440,000 page views per ho

Get_FIELD_url issues

2007-05-31 Thread John Goodleaf
Awright. I just know I'm missing something stupid here. I have a model for file attachments that are uploaded. In one of my templates, I'd like to display a URL whence the attachment could be recalled. So I've put in {{ a.get_bugfile_url }} in the template, but the output HTML looks like Title.

ifequal function not working?

2007-09-13 Thread John M
I have a view / template where im passing in a queryset and a value of what the current selected record, and am tring to setup a option pulldown to show the selected record. My problem is that I can't get the passed in selected record to match the ID of the queryset. for example: {% ifequal sel

Re: ifequal function not working?

2007-09-13 Thread John M
the ID is the primary key ID generated by django on models. basically, it's not the syntax im having issue with, i think the selected_id is being passed / parsed as a string not an intenger like ID is. J On Sep 13, 12:45 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Hmm... What is `recordset`?

How do I : Multiple table update in one form

2007-09-18 Thread John M
Ok, So have have 3+ tables all linked by various FK's and need to update all of them on one form (or would like to). In Windows programming this is easy (sort of), hold everthing in temp variables and update the DB with those temp variables once the user hit's OK. Im still getting the hang of th

Re: django, flup, and googlebot

2007-09-20 Thread John Melesky
On Sep 20, 2007, at 10:50 AM, Darrin Thompson wrote: > I'm running lighttpd, flup, and django 0.96. I'm running similar, but django trunk. > So I tried to be the bot and looked at what it would have seen: > > $ curl -s -I http://.com/HTTP/1.1 200 OK > Vary: Cookie > Content-Type: text/html;

System optimizer

2007-09-21 Thread John Travolta
Optimize your operating system http://windowsxpsp2pro.blogspot.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscri

Windows XP tips and tricks

2007-09-21 Thread John Travolta
Learn how to repair, speed up and tweak your Windows XP http://windowsxpsp2pro.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goog

Windows Optimization Tips

2007-09-22 Thread John Travolta
http://windowsfreetips.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email

Tips for Windows

2007-09-24 Thread John Travolta
Tweak your Windows XP http://windowsfreetips.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from t

Re: Two newform best practice questions

2007-09-25 Thread John M
I use the form_for_instance(instance, form=) and this works great for me, however I found a bug (which is documented), that doesn't actually populate the data, so if you're not getting the POST data, and you just want to display the current instance, you'll need to do a theform = form(instance.__

Great deals on Laptop computers

2007-09-26 Thread John Travolta
Find cheap laptop http://cheaphardware.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this gr

Windows XP tips and tricks

2007-09-27 Thread John Travolta
http://windowsfreetips.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email

Recovery Windows Registry

2007-10-02 Thread John Travolta
Repair corrupted registry, fix your system http://windowsfreetips.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com

Re: Better solutions for my views?

2007-10-10 Thread John M
for your second question, i think you could use the ifchanged template directive on a list of all your media information. Similar to what you're doing, but you don't have to build a dictionary, the templates will print when the field on ifchanged changes. something like that I think. J On Oct

Re: Design Question : model needs in model or view

2007-11-07 Thread John M
Wow, that was quick, 3min response! Thanks. Yea, thats what I was thinking. Trying to be very DRY. John On Nov 7, 10:44 am, Kyle Fox <[EMAIL PROTECTED]> wrote: > I'd probably put it in the model. > > Putting it in the view means if you ever create an instance of th

Design Question : model needs in model or view

2007-11-07 Thread John M
n the SAVE() method would keep the design isolated from the other areas. Thanks for your help. John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Hybrid-django server leaving connections open...

2007-11-13 Thread John Penix
I'm wondering if we aren't always tripping the code that closes the database connection since this server is not using django to generate responses. Has anyone had to insert code to close connections when running a "hybrid" dja

Re: Another new Django site

2007-12-04 Thread John M
Wow, thanks for the compliment, but I hardly know django at all but did give you that one SMALL hint on your question I recall. Neat site, good luck with it. John On Dec 3, 11:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Many, many folks on this list helped me wi

Re: Combating submission form Spam

2007-12-05 Thread John Lenton
ate or up to date, although it looks about right; just saving you the google): http://chewpichai.blogspot.com/2007/10/how-to-integrate-recaptcha-with-django.html -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lot of self-made men is t

docs for the new ModelForm() class

2007-12-11 Thread John M
, and a few examples here and there. Thanks John --~--~-~--~~~---~--~~ 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 fr

Re: docs for the new ModelForm() class

2007-12-11 Thread John M
No, I don't need anything added, I'm just slow and didn't see the link at the end of the newforms doc, dh. Thanks everyone, I love this group, took only 2min to get an answer!! John On Dec 11, 11:32 am, "Joseph Kocherhans" <[EMAIL PROTECTED]> wrote: > On

Putting django on Amazon DB

2007-12-14 Thread John M
I just got an email from Amazon Web Services division, and they are starting a BETA of Amazon SimpleDB(tm)- Limited Beta, which turns their S3 into a simple database. I know the developers for django are pretty busy, but how hard would it be to put this simple DB into django? http://www.amazon.c

Re: Apache no longer responds to HTTP requests

2007-12-14 Thread John M
Im assuming Linux? Do other services work? Could be network. What is you just restart apache, what happens? J On Dec 14, 9:00 am, Joe <[EMAIL PROTECTED]> wrote: > Configuration: Django .96, apache 2.0 prefork, mod_python 3.1, python > 2.3.5 > > Symptoms: Monitor site (using wget) can't get HT

Re: Choices from table vs. Foreign Key relationship.

2007-12-18 Thread John M
Seems like you'd want a many-to-many relationship, no? Each student gets multiple teachers, and each teacher has multiple students, unless all my years in school were for nothing :). Or am I missing something? Does delete remove FK's with M2M? J On Dec 17, 4:05 pm, radioflyer <[EMAIL PROTECTE

Re: Python 2.5 anyone

2006-09-20 Thread John Morton
n.org/dev/whatsnew/section-other.html Nothing major this time around, but the C API changes may be an issue for some of the database driver dependencies. There are a few deprecated modules that have been removed as well, but that's unlikely to affect Django. John --~--~-~--~~

Re: Python 2.5 anyone

2006-09-20 Thread John DeRosa
27;t exist, and neither does setuptools. Trying to install Django 0.95 on top of Python 2.5 gives me this: ---- C:\Documents and Settings\John\Desktop\Django-0.95>setup.py install --- This script requires setuptoo

Re: Python 2.5 anyone

2006-09-20 Thread John DeRosa
Oliver Andrich wrote: > Hi, > > On 9/20/06, John DeRosa <[EMAIL PROTECTED]> wrote: >> How'd you do it? >> >> I'm on Windows XP. I installed Python 2.5 from python.org without a >> problem. >> >> But then I found that pysqlite Win

Generic view and registers vs. Public users

2006-09-20 Thread John M
I Love django! I am trying to build a site that allows people to register to use the features of my site, or to just look around at what others have allowed them to look at. So, im using the built in User login stuff, and it's working great! What I want is this: 1. If youre a registerd user (

Re: Generic view and registers vs. Public users

2006-09-20 Thread John M
Malcom, Thanks for the quick reply, I've printed out your stuff and will give it a go and let you know if it works for me. thank you! John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

Re: Python 2.5 anyone

2006-09-21 Thread John Morton
On Thursday 21 September 2006 05:44, John DeRosa wrote: > Oliver Andrich wrote: > > Hi, > > > > I am running Django 0.95 . And so far I can't see any problems. > > How'd you do it? > > I'm on Windows XP. I installed Python 2.5 from python

Login crazyness...

2006-09-24 Thread John M
I'm trying out the login / logout methods from a simple webpage, and am having some real trouble here. My main page has a link to /accounts/login, setup according to the docs, allows the user to fill in a name and password, hit OK, and viola they are logged in. On the main page, i check to see i

Re: Login crazyness...

2006-09-25 Thread John M
Thanks for the feedback... Karen Tracey wrote: > Shots in the dark -- you are passing a RequestContext, not a regular > old Context, into your main template? Karen how would I know that? I'm not passing anything into my templatles except the call by except whatever the Render_to_Response does.

Re: tutorials

2006-09-30 Thread John Sutherland
On 1 Oct 2006, at 01:08, Malcolm Tredinnick wrote: > > On Sat, 2006-09-30 at 23:10 +0200, Onno Timmerman wrote: >> Hi, >> >> Its not easy when you first learn Django. You just start to get some >> grasps with it when you do the tutorials but the tutorials stop >> after 4 >> pages. Any idea whe

Re: Organisational question

2006-10-01 Thread John Sutherland
may be worth having a look at the generic relationships [1] stuff and the Tag application used as an example. While the GR stuff in the Django admin is truly horrible, you can easily write a couple of views and maybe a custom manipulator to tidy things up. Hope that helps

Re: Anal not Analog, Analysis: DB Question

2006-10-04 Thread John DeRosa
heh. so do we get to guess what your django-based site is about? Tom Smith wrote: > If I am looking for titles like "Anal Sex" or "Being Anal" then how > do I construct this, ahem, query... to not return "Analysis" or > "Analog"? > > I tried adding spaces to the end of the word but it doesn

Re: Support for static content?

2006-10-04 Thread John M
Curious, does that give you the full user context too? I noticed with render_to_response() does not 'easily' use the user context. J On Oct 4, 1:35 pm, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I > > need a clean separation between the data that is changed by > > i

Re: Callable hooks for generic views after validation with no errors?

2006-10-05 Thread John Melesky
James Bennett wrote: > On 10/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: >> There is some documentation on how Django's signals system works and how >> to hook into it here: http://code.djangoproject.com/wiki/Signals > > I just went through and completely re-wrote that to cover signals in

Re: How do I select where x=a and y=b?

2006-10-08 Thread John Sutherland
On 8 Oct 2006, at 19:48, carlwenrich wrote: > What I'm looking for is something like r = Record.objects.get(x=a, > y=b) > which doesn't work. Give the following a go: Record.objects.filter(x__exact='a', y__exact='b') John. --~--~-~--~~---

Re: What IDE do you use? (semi-OT)

2006-10-08 Thread John Sutherland
e other than code on screen. Hope that helps. John. [1] <http://www.macromates.com/> [2] <http://www.scintilla.org/SciTE.html> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

directed graph in default admin

2006-10-24 Thread John Lenton
Admin: list_display = ['source', 'sink'] -->8- that works very nicely. Or does it? The link on the sink column in the admin interface sorts by source :( What am I missing? Oh, python2.4, django from svn, linux. -- John Lenton ([EMAIL PROTECTED]) -- Random

Re: directed graph in default admin

2006-10-26 Thread John Lenton
expected: Source v | Sink Anode | Cnode Cnode | Bnode Mnode | Anode Xnode | Anode this is as expected; but if you click on "Sink", you get Source | Sink v Anode | Cnode Cnode | Bnode Mnode | Anode Xnode | Anode i.e., it still sorts by Source instead of Sink. Is this a

Re: directed graph in default admin

2006-10-27 Thread John Lenton
AMSPORT - AP ALDENE 13 KV SK NUG WESTERN HUB ALDENE 13 KV SK NUG WEST INT HUB ALDENE 13 KV SK NUG WELLSBORO which is exactly the same as the previous one, if you look :( -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lot of

Re: looking for Django Contractors

2006-10-31 Thread John D'Agostino
Hi Benjamin, http://www.gypsyjobs.com/ - is a forum setup by Django contributor Ian Holsman, for django related jobs and there is also - http://code.djangoproject.com/wiki/DevelopersForHire On Nov 1, 5:33 pm, Benjamin Ward <[EMAIL PROTECTED]> wrote: > Hey good people, > > I'm wondering where i s

Re: Using admin js in template code

2006-11-08 Thread John Hwang
I'm trying the exact same thing but the widgets do not seem to display. I'd like to display the date/time pickers but the event doesn't seem to be triggered. I'm also getting errors in firebug about gettext() function. Any help/suggestion would be great. Thanks, /John O

Re: Re: Using admin js in template code

2006-11-08 Thread John Hwang
I figured it out... the template needs: the jsi18n file has the gettext() function Hope that works for you too. /JohnH On 11/8/06, John Hwang <[EMAIL PROTECTED]> wrote: > I'm trying the exact same thing but the widgets do not seem to > display. I'd like to display

Re: [patch] Generating slug for words with accents

2006-11-16 Thread John Lenton
On 11/16/06, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > German ß should be translated to ss > ä to ae > ö to oe > ü to ue but «ü» in Spanish should be just «u» (as in pingüino -> pinguino). -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lo

Re: Re: Suggestion: Aggregate/Grouping/Calculated methods in Django ORM

2006-12-04 Thread John Lenton
This way it would be clear that max() returns a tuple (value, queryset) (to me, at least...). Also, ...groupby('foo').max() would return the same result as max(...groupby('foo')), but less efficiently. Talking through my hat? -- John L

Re: Optimizing Templates

2006-12-07 Thread John Lenton
give you a better clue as to what is wrong... -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lot of self-made men is that they worship their creator. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

TextField and mysql text columns

2006-12-11 Thread John Morton
sistant for all TextField field types, or is it peculiar to mysql? John --~--~-~--~~~---~--~~ 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

mysql MyISAM save woe

2006-12-11 Thread John Morton
es, as they don't do transactions. Anyone else experienced this? John --~--~-~--~~~---~--~~ 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

Re: mysql MyISAM save woe

2006-12-11 Thread John Morton
On Tuesday 12 December 2006 03:10, John Morton wrote: > I'm working with an introspected model against tables in a mysql backed > with the MyISAM engine, and I'm having problems when creating new objects. > Basically, I instantiate a new instance of the model, save the new obj

Re: mysql MyISAM save woe

2006-12-11 Thread John Morton
On Tuesday 12 December 2006 17:26, Adrian Holovaty wrote: > On 12/11/06, John Morton <[EMAIL PROTECTED]> wrote: > > The database introspection was correctly detecting which field to set as > > the primary key, but failed to detect that that column was > > auto

Re: Property overrides

2006-12-12 Thread John Lenton
On 12/12/06, Nathan R. Yergler <[EMAIL PROTECTED]> wrote: > > Note that the property built-in takes the "getter" as the first, > required argument and the "setter" as the optional, second argument. A nit: none of the arguments of property are required.

Re: select_related() with the ForeignKey in the same table

2006-12-18 Thread John Lenton
ts of node A from the database: Node.objects.filter(path__startswith=A.path) the ugly thing is that now your database is denormalized, and your friends that teach Databases at the university will sneer. -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The

Re: "Decimal not JSON serializable"?

2006-12-19 Thread John Lenton
te that as isinstance(key, (float, decimal.Decimal)) -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lot of self-made men is that they worship their creator. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Types of projects Django is not well suited for?

2006-12-29 Thread John Lenton
On 12/26/06, mamcxyz <[EMAIL PROTECTED]> wrote: - You can't do a single-exe deployment, except if discover a way to hack the thing very much I wouldn't be so sure. You could almost certainly use PyInstaller to build a sqlite-backed django app down to a single exe. -- Joh

CRUD design question

2007-01-03 Thread John M
. Is this a good design? If not, why not? Just trying to get some expert feedback Thanks John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: CRUD design question

2007-01-03 Thread John M
[EMAIL PROTECTED] wrote: Create a form where if it's new, it's blank and has a "create" button that makes the thing. If you are viewing, fill in the form with the existing info with an "update" button. You can also add a "delete" button to the view/update version if you want. This is just a

What's the proper use of LazyDate?

2007-01-04 Thread John DeRosa
he web... E.g.: class UserReadComment(models.Model): scoop = models.ForeignKey(Scoop,raw_id_admin=True) [...snip...] last_read = models.DateTimeField(default=models.LazyDate(), auto_now=True) ? John --~--~-~--~~~---~--~~ Yo

Re: CRUD design question

2007-01-04 Thread John Matthew
ase your a 'public' user you only get view access to the data. Thanks again for the help. John On 1/4/07, Tim <[EMAIL PROTECTED]> wrote: The HTML in the template is fairly easy to do: {% if object %} we have an object so we're updating {% else %} no object so we're

Question about request.has_key()

2007-01-05 Thread John M
I am still learning about HTTP requests, etc, and am looking for an good explination of how django handles the whole coorelation between a form button's values / names and the has_key() function, I think they are related. For example, I'd like to mimic the multiple buttons on the admin interface

Re: Question about request.has_key()

2007-01-06 Thread John M
ction use the name field, not the value field. the value is the text of the submit button. I hope I'm right only to show that I've picked this up :-P. Thanks again. John On Jan 6, 3:54 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: Hm, as far I understood your ques

Empty related sets = Page not found?

2007-01-10 Thread John M
OK, again I'm stumpped. I have the following models: class Portfolio(models.Model): user= models.ForeignKey(User) description = models.CharField(maxlength=50) notes = models.CharField(maxlength=200) class Holding(models.Model): porfolio = models.Fo

Re: Empty related sets = Page not found?

2007-01-10 Thread John M
will raise a 404 instead of displaying an empty page. By > default, this is False. WOW, thanks for the answer ... But why did it take you a whole 5min to answer :-P, I love the Internet, support 24x7. Thanks again! John --~--~-~--~~~---~--~~ You receive

Re: Empty related sets = Page not found?

2007-01-10 Thread John M
Yup, that did it! Thanks again Brian! --~--~-~--~~~---~--~~ 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 e

Re: Python 2.5 + MySQLdb

2007-01-11 Thread John-Scott
o build it yourself or 2) install python2.4. It might just be easiest to install python2.4 (unless 2.5 really has something you can't live without), you can have both versions installed side by side (c:\python2.4 & c:\python2.5). John-Scott On Jan 11, 3:41 am, Carl Holm <[EMAIL PROTE

Re: Empty related sets = Page not found?

2007-01-11 Thread John Matthew
Thank you for the reply. On 1/10/07, Brian Beck <[EMAIL PROTECTED]> wrote: > > > Hi, > > object_list takes an allow_empty argument, try settings it to True. > >From the docs: > > allow_empty: A boolean specifying whether to display the page if no > objects are available. If this is False and no ob

Re: Generating Javascript w Django

2007-01-11 Thread John Morton
orks. But it seems like a strange way to solve this > problem. You could use the JSON support in a view which just returns a chuck of JSON, which is just a javascript data structure, containing all your images and urls, then include that as an extern

records for a particular user

2007-01-21 Thread John M
OK, I love the django way of doing DB lookups, but I can't seem to get a list of records for the following: class Portfolio(models.Model): user= models.ForeignKey(User) description = models.CharField(maxlength=50) notes = models.CharField(maxlength=200, blank

Re: records for a particular user

2007-01-21 Thread John M
James, Thanks for the quick response. Not 2hrs after I posted it, and playing around with examples,did I figure out the same thing. Thanks again John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Debugging Django: print statements?

2007-01-24 Thread John DeRosa
Filipe Correia wrote: > Haven't used pdb yet. 'pdb.set_trace()' would be added on the source > code to be debugged, right? > Having to change the source code to debug it doesn't feel very right... And adding print statements is...what? --~--~-~--~~~---~--~~ You r

Django Cheat Sheet

2007-02-13 Thread John Sutherland
n the digg front page [2]; but put it on your blog, your del.icio.us or where ever... Cheers, John. [1] <http://www.mercurytide.com/> [2] <http://digg.com/programming/Django_cheat_sheet> -- [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this m

Re: 'str' object has no attribute 'write'

2006-05-25 Thread John Melesky
mary wrote: > and i got this error > 'str' object has no attribute 'write' ... > output = ', '.join([m.menu_text for m in latest_menu_list]) > output.write(output) In the first line there, you're setting "output" (which used to be a file object) to a string, and then in the next line you

Re: html input tag width corresponding to CharFields always fixed

2006-05-26 Thread John DeRosa
ame="address_line1", maxlength=80, length=50), John --~--~-~--~~~---~--~~ 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

Serious Noobie question, what the $ for in urlpatterns.

2006-06-05 Thread John M
t line of the second example. When you don't have a $ in the polls/ setup, it doesn't scan down to the other entries. Since I'm so new to python and web stuff, was wondering if anyone could explain this. Sorry for such a noob question. Thanks John --~--~-~--~~-

Re: Harness our collective opinions -- Digg Django

2006-06-06 Thread John Melesky
Adrian Holovaty wrote: > The IBM Developer Works article about Django is a good opportunity to > get us some more exposure. If you have a Digg account (digg.com), Digg > it! Also on reddit (reddit.com): http://programming.reddit.com/info/7bzf/comments -johnn --~--~-~--~~---

Re: Django Article on Developerworks

2006-06-06 Thread John Sutherland
The article is the top post on digg.com right now - well done :) John. On 6 Jun 2006, at 18:54, Adrian Holovaty wrote: > > On 6/6/06, Ian Maurer <[EMAIL PROTECTED]> wrote: >> IBM has just posted an article on mine on the IBM website (hasn't >> made >> it

Re: Serious Noobie question, what the $ for in urlpatterns.

2006-06-06 Thread John M
WOW! and again WOW! Thank you all for your quick and thorough responses, I now have it, perfect Thanks again, John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

<    2   3   4   5   6   7   8   9   10   11   >