Re: Best practice for non-root base URL setup?

2007-08-18 Thread John Shaffer
On 8/18/07, Przemyslaw Wegrzyn <[EMAIL PROTECTED]> wrote: > However Django 0.96 doesn't support named URL patters yet, so I can't > use {% url %} tag. Even in 0.96, you can use a view as the argument to the url tag. Where we use "{% url satchmo_cart %}", in 0.96 we would have to use "{% url satch

Make Operating System Faster !!

2007-08-18 Thread John Travolta
Tune up your system and make it faster 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 u

non-event driven method called?

2007-08-23 Thread John Menerick
Inside my django app, regardless of the events of my django-application, I would like to call a method every minute. Since Django is heavily event driven, I'm at a loss as how to make this work. I'm looking for a way to make this happen. Any ideas? Joh

Re: non-event driven method called?

2007-08-23 Thread John Menerick
Yeah, I was thinking of running a script in daemon mode, but I would prefer to keep the code inside the django instance to keep everything simpler. simpler as in the same settings for deployment, less hassle deploying on machines, etc John On 8/23/07, Sean Perry <[EMAIL PROTECTED]>

Re: objects.get overhead: at least 2 times slower than a select

2007-08-27 Thread John Melesky
On Aug 27, 2007, at 2:05 AM, Kugutsumen wrote: > cursor.execute("""SELECT id,name from "DNS_domain" WHERE name='%s' > """ > % domain) > row = cursor.fetchone() If you do just need those two fields, and no object methods, you can use the "values" queryset method. Something like: d = Domain.obje

Re: django under 2.5

2007-08-29 Thread John DeRosa
ditto Kevin Menard wrote: > On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote: >> Hi list, >> >> I have been running django under python 2.4 but now I'm considering >> switching to 2.5. Are there any known compatibility issues? Or is it >> just straightforward? > > I've been running under 2.5

Re: django under 2.5

2007-08-30 Thread John Shaffer
On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote: > I have been running django under python 2.4 but now I'm considering > switching to 2.5. Are there any known compatibility issues? Or is it > just straightforward? Django itself should work fine. Usually your apps and projects will work witho

Re: order_by with foreign keys

2007-09-10 Thread John Lenton
documentation, mentioning the bug, and pointing to the ticket with the patch that fixes the bug, right? :-D -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lot of self-made men is that they worship their creator. --~--~-~--~~~---~--~~

Private (owner) vs. public records

2008-01-16 Thread John M
I want to create a model system where a user can own a record (i.e. foreign key to users table) and those records are only seen by that user OR the user can choose to make the record public (boolean field in model) that allows others to view-only the record. I was trying to come up with some simp

Running django+apache on my macbook

2008-01-18 Thread John M
, etc. So my question is, whats the easiest way to just get my macbook intel 10.5 to run apache and Django. Thanks everyone John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Running django+apache on my macbook

2008-01-18 Thread John M
stion, how do I get a mac book with stock apache installed, to run django? Thanks John On Jan 18, 12:08 pm, Christian Joergensen <[EMAIL PROTECTED]> wrote: > John M wrote: > > OK, > > > So I know Linux / Apache pretty well, never really done any hard-core > > s

Re: Running django+apache on my macbook

2008-01-18 Thread John M
ts project, so maybe I'm biased, but I also came > from a linux environment and find MacPorts to be very useful for > package management. > > http://www.macports.org/ > > -Bill > > On Jan 18, 2008, at 9:55 AM, John M wrote: > > > > > OK, > > &

Re: Running django+apache on my macbook

2008-01-18 Thread John M
Anton, that was sort of my question, how do I complete your second idea but w/o the recompile. The mac already comes with apache 2 installed and running rather well, how hard would it be to add mod_python or mod_wsgi to that environment? Thanks John On Jan 18, 10:09 am, "Anton P. Lin

Re: Running django+apache on my macbook

2008-01-18 Thread John M
Thakn you Graham, thats what I'm talking about. I just finished trying to compile mod_python, and it's not working, and I figured it was something like that. So it's off to try mod_wsgi. Thanks J On Jan 18, 4:29 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On

Re: Running django+apache on my macbook

2008-01-19 Thread John M
sng, Thank you for the offer. Thats a great idea, and one I will probably purse, and if I have any issues, I'll post them here, but thanks for the phone offer, thats is most generous. John On Jan 19, 10:30 am, luxagraf <[EMAIL PROTECTED]> wrote: > Since I wrote that little guide

How to check if my 1-1 record is there?

2008-01-19 Thread John M
B = charfield() Basically, in the save() routine, is there a way to check if the 1-1 is already there? thanks John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Manipulating my 1-N's parent object's properties

2008-01-25 Thread John M
Well, it is in my file, and I can thank Windows for the bad paste :). Assume the indenting is right, any other thoughts? John On Jan 25, 10:29 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Jan 25, 1:21 pm, John M <[EMAIL PROTECTED]> wrote: > > > I have a OneToMany

Re: Manipulating my 1-N's parent object's properties

2008-01-25 Thread John M
Thanks, I'll try the print statements. This is my first pass at the save() routine, and your idea is good, although I may try other methods. Thanks for the help. John On Jan 25, 11:01 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Jan 25, 1:39 pm, John M <[EMAIL

Manipulating my 1-N's parent object's properties

2008-01-25 Thread John M
record, I create a variable to point to the trade.holding ORM record, update the totals in the Holding and save it. But that's not happening, why? The same example in the shell works fine, whats up. I'm sure its a real NOOB issue. Th

Re: ForeignKey related bug

2008-01-29 Thread John DeRosa
ue' (Pdb) c There used to be a post on someone's blog about this, but darned if I can find it now. John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Web Development with Django: Windows vs Linux/Mac OS X

2008-02-09 Thread John U.
to test your web pages: Firefox, IE, Opera, Safari, etc. No need for Parallels or other hacks. 9. If you need an SSH client, PuTTY (www.chiark.greenend.org.uk/ ~sgtatham/putty) is an invaluable tool. 10. It's too late now: I have to left home. I hope my remarks can be useful. Bye, John. On

Re: using mod_python to host several django apps on the same vhost?

2008-02-11 Thread John Leith
make a new separate urlconf (name it `config_urls.py` or something) for each project `x/` and `y/` make the urlconf in each of them something like this: patterns = ( (r'^x', include("urls")), ) and the other file: patterns = ( (r'^y', include("urls")), ) Then your app will be able to read it

Issues with select_related()

2008-02-22 Thread John Leith
I'm noticing some oddness with select_related()... >>> invoice = Invoice.objects.select_related().get(pk=7000) >>> len(connection.queries) 1 >>> invoice.Student_ID >>> len(connection.queries) 2 Shouldn't it be the same number of queries? Here we have an Invoice with a foreign key to a student.

Re: Issues with select_related()

2008-02-22 Thread John Leith
right i figured it out: i had " nulls=true " in the field and so it wasn't followed :) --~--~-~--~~~---~--~~ 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@googlegro

Re: Issues with IE7 and {% for %} {% endfor %} tag

2008-02-22 Thread John M
for those of us who don't know enough about cookies and IE7, could you expand on the issue, and how u found it was cookies please. John On Feb 21, 8:30 am, merric <[EMAIL PROTECTED]> wrote: > It was a cookie issue. I had looked over this... but missed it on > first glan

Re: Trouble running dev server after upgrade to Leopard.

2008-03-26 Thread John Melesky
On Mar 26, 2008, at 3:08 PM, Emil wrote: > Is there a way for me to know which python interpreter is used by > manage.py? Try invoking the django shell ("manage.py shell"), and then checking sys.executable. Looks something like this on my machine: $ ./manage.py shell Python 2.5 (r25:51918, Se

How do i tell if a 1-1 relation exists?

2008-04-07 Thread John M
I have a model that uses a 1-1 relationship to another model. My question is, how can I tell if either end of the 1-1 exists? Thanks John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

What happened to django-updates?

2008-04-14 Thread John-Scott
There hasn't been any updates on the django-updates mailing list since March 18. At the time, someone on IRC said they thought it was due to the traffic from the sprint but that was a month ago. I am tracking trunk with my projects and it was really convenient to get email updates on trunk commits

Re: What happened to django-updates?

2008-04-14 Thread John-Scott
On Apr 14, 11:45 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Mon, Apr 14, 2008 at 10:43 AM, John-Scott > > <[EMAIL PROTECTED]> wrote: > > There hasn't been any updates on the django-updates mailing list since > > March 18. At the time

Re: Javascript GUI Editor that works with Django templates

2008-04-22 Thread John Hensley
for images.) For stricter access control, or to limit which images are shown, you'd just have to replace the generic view. Not that I have any strong preference for TinyMCE over FCKeditor, other than that I never wanted to have to explain the latter's name. ;^) TinyMCE does seem

Having a instance of a model object instantiate another

2008-04-24 Thread John Morris
ta modeling going on by inadvertently trying to make it do something without understanding more fundamentally how it is working at low-level and I haven't got there yet. Thanks much! -- John Morris [EMAIL PROTECTED] "Do nothing which is of no use." -- Miyamoto Musashi --~--~-

Re: Patch #2070, progress bar and form view. Can't make it work.

2008-05-03 Thread John Hensley
igured; forgetting to start memcached on your dev box after a reboot can cause some head-scratching. ;^) John On May 2, 2008, at 11:40 PM, Julien wrote: > > Hi everyone, > > I'm trying to use patch with ticket #2070 [1] to be able to upload big > files and have a prog

Re: Template - different layout for odd/even items

2008-05-07 Thread John Melesky
I think the tag you're looking for is "cycle": http://www.djangoproject.com/documentation/templates/#cycle That's most convenient when interfacing with CSS stuff, so you could do something like: > {% for menuitem in paginator.object_list %} > which would put your in a different class depen

Why are my parameters gettings mangled?

2008-05-07 Thread John M
t=0' but here is what the request.GET['info_hash'] returns: info_hash u'\ufffdm\ufffdmfD\u061a\ufffd\ufffd\u01c6\ufffd8\ufffd' Hopefully this is a simple something I'm just missing. Thanks John --~--~-~--~~~---~--~~ You received this m

Re: Why are my parameters gettings mangled?

2008-05-09 Thread John M
Randy, thanks for the follow-up, and you're on the right track, turns out it's an encoding 'problem' by default in django. I just have to change the encoding language and then ask it for a different code. I got it working for what I need. John On May 8, 9:16 pm,

Re: Job opening: Malaria Atlas Project, Oxford University

2008-05-09 Thread John Handelaar
On Fri, May 9, 2008 at 4:50 PM, anand <[EMAIL PROTECTED]> wrote: > > Further particulars can be downloaded from http://www.zoo.ox.ac.uk/jobs/ That's not true. jh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Building filter strings dynamically

2008-05-09 Thread John Lenton
y happening, > since "sections__name__exact" doesn't have to be defined anywhere. > > But is there any way to build the parameter to the filter dynamically? the usual python way of building dynamic args: filter = {'sections__name__exact': 'shooting'}

Home Based Typist/Data Entry Needed £250 - £750 per week

2008-05-11 Thread John Philips
*http://www.skyhighrecruit.info* Skyhigh Recruit UK are seeking only honest, self-motivated people with a desire to work in the home typing and data entry field, from the comfort of their own homes. The preferred applicants should be at least 18 years old with Internet access. No experience is ne

Re: accessing dictionary elements in opening tag of django template for loop

2008-05-14 Thread John Lenton
On Wed, May 14, 2008 at 6:33 PM, John <[EMAIL PROTECTED]> wrote: > > I'm having trouble accessing dictionary elements within a nested for > loop. here are some code snippets: > > [...] > > # so far so good, but then I try to iterate over the documents and >

Re: How best to place multiple orders from same screen?

2008-05-17 Thread John Hensley
Malcolm has a good how-to for this: http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/ On May 17, 2008, at 12:16 PM, Kenneth McDonald wrote: > I'm designing an order system wherein each order will be an object. > However, most customers will typically want to order more than

Re: Secure file access with contrib.auth

2008-05-17 Thread John Hensley
Pretty nice; I thought this might have been the requirement that finally pushed me over to nginx or lighty, but not yet John On May 15, 2008, at 7:38 PM, Julien wrote: > > Hi, > > I'm building a website where users can create projects and upload > files for their proj

Re: Secure file access with contrib.auth

2008-05-19 Thread John Hensley
y around that issue? No simple way springs to mind. 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 unsubscr

Re: Ordering extra fields in ModelForm

2008-05-21 Thread John Hensley
http://code.djangoproject.com/wiki/CookBookNewFormsFieldOrdering On May 21, 2008, at 8:15 AM, omat wrote: [...] > My form class is like that: > > class NoteForm(forms.ModelForm): >is_location = forms.BooleanField(required=False) > >class Meta: >model = Note > > I wish this checkbo

Re: Sorl Thumbnails Directory Permissions

2008-05-28 Thread John Hensley
Try 770 with the directory's group set to the effective group of the Apache process. If you need to get even finer, look into mod_wsgi's daemon mode, or FastCGI, under either of which your Django app could run as its own user. Then you could ratchet the directory permissions down to 700 an

Help with request encoding (again)

2008-05-29 Thread John M
I've run into some more trouble with what I think is an encoding issue? I am writting a bittorrent tracker, and one of the GET parameters that is passed is called info_hash, which is a lengthy / escaped hex string, for example: GET /announce?info_hash=%EByXm%C5%7EmfD%D8%9A%91%D4%F7%C7%86%C7%D18%

Re: Help with request encoding (again)

2008-05-29 Thread John M
POST No POST data COOKIES VariableValue sessionid 'f356ef76d6c20c3be39aec3d29ff023a' META VariableValue Apple_PubSub_Socket_Render '/tmp/launch-1GTNEW/Render' COMMAND_MODE 'unix2003' CONTENT_LENGTH '' CONTENT_TYPE 'text/plain'

Re: Help with request encoding (again)

2008-05-29 Thread John M
t; <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 10:16 AM, John M <[EMAIL PROTECTED]> wrote: > > > Karen, > > > Thanks for the response, but I'm unable to unquote the strings as > > django does it automatically for me when I get the GET list entries. >

Re: Help with request encoding (again)

2008-05-29 Thread John M
Well, either way, thank you so much for helping me on this. The more I dive into the framework and more so, Python, the more I know i've made the right choice. John On May 29, 11:15 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 1:16 PM,

Re: Help with request encoding (again)

2008-05-29 Thread John M
On May 29, 9:00 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 10:16 AM, John M <[EMAIL PROTECTED]> wrote: > > > Karen, > > > Thanks for the response, but I'm unable to unquote the strings as > > django does i

Re: Help with request encoding (again)

2008-05-29 Thread John M
;efbfbd6defbfbd6d6644d89aefbfbdefbfbdc786efbfbd38efbfbd' and the debug screen snippit QUERY_STRING 'uploaded=0&compact=1&numwant=80&info_hash=%EF%BF%BDm%EF%BF%BDmfD%D8%9A %EF%BF%BD%EF%BF%BD%C7%86%EF%BF%BD8%EF%BF %BD&event=started&downloaded=0&key=yoolrpcyku&cor

Re: Help with request encoding (again)

2008-06-02 Thread John M
Karen, Thanks so much for keeping up on this. I'll run through the software to find the correct answer. This is a side project, and my time gets in bursts, sorry for the late reply. John On May 29, 9:13 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, May 29,

appengine and django default filters

2008-06-03 Thread John M.
Hey guys... anybody had in luck getting the django default filters working with appengine When I include this line in my templates {% load filters %} I get the following error... 'filters' is not a valid tag library: Could not load template library from django.templatetags.filters, No module nam

Capturing full URL string

2008-06-04 Thread John M
ect to /announce/ instead of just the / announce that I put in the URL? The reason for all this, is I'm having trouble in another post about a torrent tracker im trying to write, and i'm not getting the parameters passed as I would expect. Any information about this behavior would b

Re: Capturing full URL string

2008-06-04 Thread John M
lly info_hash: before 301 info_hash=%10%C2%E1%96%E0%8D%90%05%B7%DF%C6%BC%8E%C2%15%E4%3D%60%CC%84 After 301 info_hash=%10%EF%BF%BD%EF%BF%BD%EF%BF%BD%05%EF%BF%BD%EF%BF%BD%EF%BF%BD %EF%BF%BD%EF%BF%BD%EF%BF%BD%CC%84 Am I right in my observations? Is there anything I can do to avoid this in django? HELP

Re: Help with request encoding (again)

2008-06-04 Thread John M
Karen, I think I found my problem, and added a new post, maybe you can help? http://groups.google.com/group/django-users/browse_thread/thread/fc47edb1b9f8ec8f# Thanks again, you've really helped me see this through John On Jun 2, 1:01 pm, John M <[EMAIL PROTECTED]> wrote: > Kar

Re: Capturing full URL string

2008-06-04 Thread John M
Yes, I understand that, and I think it's a good thing, but when it redirects, it mangles the parameters, would you agree? J On Jun 4, 10:35 am, Gregor Müllegger <[EMAIL PROTECTED]> wrote: > This is because Django will redirect you to a page with an appended > slash to your url if it's not alread

Re: Capturing full URL string

2008-06-04 Thread John M
together. Now I can move on a continue my app. John On Jun 4, 12:59 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 2:03 PM, John M <[EMAIL PROTECTED]> wrote: > > Yes, I understand that, and I think it's a good thing, but when it > &

Re: Can Someone Do something about ALL THIS SPAM

2008-06-05 Thread John Handelaar
On Thu, Jun 5, 2008 at 6:05 PM, James Bennett <[EMAIL PROTECTED]> wrote: > > * The way to train Google's spam filter is to use their spam-reporting > mechanism. One way to *completely waste your time* is to use their spam-filtering mechanism. I am absolutely not the only group member who flags e

Re: Capturing full URL string

2008-06-05 Thread John M
How exciting, im actually getting involved (via Karen of course), I'll submit today and put the ticket number back here. Thanks so much. John On Jun 5, 10:28 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 4:35 PM, John M <[EMAIL PROTECTED

Re: Capturing full URL string

2008-06-05 Thread John M
Ticket 7379 http://code.djangoproject.com/ticket/7379 On Jun 5, 2:41 pm, John M <[EMAIL PROTECTED]> wrote: > How exciting, im actually getting involved (via Karen of course), > I'll submit today and put the ticket number back here. > > Thanks so much. > > John &

Re: building distributed systems with django?

2008-06-07 Thread John Dohn
On Sun, Jun 8, 2008 at 2:11 AM, lgr888999 <[EMAIL PROTECTED]> wrote: > how you would build a huge decentraliced system. Now of course it > would depend on what the purpose of the system is so lets just take > twitter as an example. :) > It's easy. All you have to do is to avoid all single points

Re: building distributed systems with django?

2008-06-08 Thread John Dohn
On Sun, Jun 8, 2008 at 7:57 AM, lgr888999 <[EMAIL PROTECTED]> wrote: > > replication isnt exactly distributing... with only one master db which > handles all the writes you have a single point of failure... In MySQL and very likely in other DBs you can have a multi-master setup with more than on

Re: "intro to django" script -

2008-06-09 Thread John M
Also, the week in django has some really good webcasts, maybe we could get them to post it to your website? http://blog.michaeltrier.com/2008/6/9/this-week-in-django-25-2008-06-08 On Jun 9, 8:04 am, Carl Karsten <[EMAIL PROTECTED]> wrote: > I want to make ahttp://showmedo.com"Getting started wit

Re: Django graphic designers

2008-06-09 Thread John M
There are a TON of free resources for all of that, let me see if I can post a few for u . http://www.cssbeauty.com/ http://www.templatesbox.com/ http://vyk1.spaces.live.com/Blog/cns!EBE3A761F939F926!1051.entry http://www-128.ibm.com/developerworks/library/wa-freeweb/ Good Luck On Jun 9, 3:37 p

ifequal tag in template with hard coded string confusion

2008-06-10 Thread John Teague
s is that the priority_value field is a foreignkey. Obviously, the value of the foreign key is, in this case, a pk integer, but the name is returned in what should be just a string __str__. Am I missing something simple here? Any help would be very much appreciated. Regards, John --~--~-~--~--

Re: ifequal tag in template with hard coded string confusion

2008-06-11 Thread John Teague
{% ifequal foo.bar__unicode__ "foobar" %} Thanks again Karen -- For anyone else who might be confused by this. On Jun 10, 7:08 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Jun 10, 2008 at 5:33 PM, John Teague <[EMAIL PROTECTED]> wrote

AttributeError getting cached SortedDict using database cache

2008-06-11 Thread John Huddleston
Preface: I'm not sure if this is a bug or not, but I could not find any mention of it in the tickets or the mailing lists. Problem: Using database caching, I set a non-empty SortedDict instance in the cache. When I try to retrieve it, I get an AttributeError with the message "'SortedDict' objec

Re: sending large downloads

2008-06-25 Thread John Hensley
If it doesn't require authorization (seems unlikely here), would a simple redirect to the tar file work? If it does, look into X-Sendfile if you're using Apache (you need mod_xsendfile) or lighty, or X-Accel-Redirect under nginx. You do only what you need to in the Django view and hand off

dynamic choices for views/newforms

2008-06-29 Thread John Aherne
nd, since noone else is having this problem. I would be very pleased if someone could point me in the way to go on this. John Aherne --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: dynamic choices for views/newforms

2008-06-29 Thread John Aherne
Daniel Roseman wrote: > On Jun 29, 11:34 am, John Aherne <[EMAIL PROTECTED]> wrote: > >> I've been looking at django for a while. Been through the tutorial a few >> times and read 2 books several times and am still trying to find out how >> some things work

Re: dynamic choices for views/newforms

2008-06-29 Thread John Aherne
John Aherne wrote: > Daniel Roseman wrote: > >> On Jun 29, 11:34 am, John Aherne <[EMAIL PROTECTED]> wrote: >> >> >>> I've been looking at django for a while. Been through the tutorial a few >>> times and read 2 books several time

Re: dynamic choices for views/newforms

2008-06-29 Thread John Aherne
Daniel Roseman wrote: > On Jun 29, 2:24 pm, John Aherne <[EMAIL PROTECTED]> wrote: > >> OK. I did some more experimenting with ModelChoiceField and my table. >> >> Surprise. It worked when I thought it would not. Why did it work. By >> luck in my model I had

Re: Regex assistance

2008-07-01 Thread John Lenton
le > > local numbers start with 281, 832, 713 , or 1281, 1832, or 1713, my > regex which isnt working looks like this in other words, local numbers match the regex r'^(?:281|832|713|1281|1832|1713)' -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with

Newforms Admin - Overriding the Save Method of an Inline Model

2008-07-02 Thread John Boxall
eclared is never run. Any thoughts? Cheers, John --- class OptionModelForm(forms.ModelForm): class Meta: model = Option def save(self, commit=True): # Will -NEVER- run assert False def clean(self):

Re: Newforms Admin - Overriding the Save Method of an Inline Model

2008-07-02 Thread John Boxall
do it that way - but I'd rather not to ... The Poll model is generic and I would be putting application specific logic inside that generic class. Then again, maybe it's best just to do that and avoid the headache :) Cheers, John On Jul 2, 11:53 am, "Richard Dahl" <[EMAIL PROT

Re: Regex

2008-07-02 Thread John Boxall
You might want to refer to this recent article at Coding Horror: http://www.codinghorror.com/blog/archives/001016.html I would stick to what you have. (and I would also only do the calculation once and store it as a boolean field in the database as suggested : ) John On Jun 30, 7:13 am

Re: Creating a Scheduled Task

2008-07-12 Thread John M
I've seen previous posts which tell you to setup the CRON job with the correct settings, so you can just call django from the CRON job, since django is just python, as long as it finds the settings file you should be ok. J On Jul 12, 7:53 am, Chris <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a newb

SMS code examples

2008-07-14 Thread John Handelaar
Hola I'm looking to use an SMS service provider to allow users to 'register' their cell phones to receive updates. The registration is necessary in the same way that email confirmation is necessary. Available gateways here (UK and Ireland) all seem to have HTTP POST gateways for this sort of th

Re: Designing for Speed - conditionals inside the view versus the template

2007-03-12 Thread John DeRosa
ttered with code that was extremely efficient but impossible to maintain or adapt to changing requirements. You can double your application's performance by buying or leasing a new box + more memory next year. What % improvement do you think code shifting from template to view will get you?

Re: newb: Newform conditional regexField

2007-03-16 Thread John Lenton
On 3/16/07, johnny <[EMAIL PROTECTED]> wrote: > > In newform, how do I allow a single regexField to accept either a > whole number, or number with decimal places? doesn't r"\d+(\.\d*)?" work? -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with

Re: Adding a field to a model

2007-03-24 Thread John M
I think the new .96 version has a export / import data function now. On Mar 24, 6:04 pm, "Mark Engelberg" <[EMAIL PROTECTED]> wrote: > I know that, unfortunately, there's no painless way to migrate all the > data in your database when you add a new optional field to your model. > Pity. > > So wh

Re: django as a platform for a commercial SaaS project?

2007-03-24 Thread John DeRosa
walterbyrd wrote: > SaaS = Software as a service, just in case that was not clear. What's the difference between SaaS and an ASP? I don't quite get the distinction between them. John --~--~-~--~~~---~--~~ You received this message because you a

Re: django as a platform for a commercial SaaS project?

2007-03-24 Thread John DeRosa
Lee Hinde wrote: > > > On Mar 24, 8:03 pm, John DeRosa <[EMAIL PROTECTED]> wrote: >> walterbyrd wrote: >>> SaaS = Software as a service, just in case that was not clear. >> What's the difference between SaaS and an ASP? I don't quite get the >

Re: username > 30 characters?

2007-03-26 Thread John Lee
r.email is transferred to 'str' instead of 'CharField' so I'm stuck here. Thanks. -- John On Feb 5, 12:46 pm, "Vasily Sulatskov" <[EMAIL PROTECTED]> wrote: > Create your own authentication backend that uses emails instead of > usernames. Something

Re: username > 30 characters?

2007-03-28 Thread John Lee
site, the 'event' object still refer to 'auth_user' instead of 'mysite_user', and this will cause an error whenever you add/change/ delete. Does that means the best I can do is to use 'auth' and 'admin' apps as a simple admin backend, and build my

get_or_create isn't atomic?

2007-03-28 Thread John Penix
know this. So, assuming it's not atomic (by default) is there a way to make it safe other than using the django middleware layer to get transactions? Like a flag... or a db schema tweak Thanks for any help, suggestions or witty insults. John --~--~-~--~~~-

Re: Securing the admin site

2007-04-04 Thread John DeRosa
d, To change the URL root to something else, did you just have replace r'^admin/' with something else in the URL conf file? Or, did you have to also do some other hacking? I ask because we're thinking of doing the same thing. John --~--~-~--~~~---~--

RE: Django IDE

2007-04-05 Thread John Goodleaf
Wing IDE. I'll second that recommendation. I have both Komodo 4 and Wing at work. I use Wing pretty much exclusively. From a purely aesthetic standpoint, Komodo 4 is somewhat "cleaner" looking, but otherwise I think Wing is stronger. In addition to mentioned debugger, Wing does a very nice job wi

Re: Newforms best practice

2007-04-06 Thread John M
that too. HTH John On Apr 5, 10:58 am, "tyman26" <[EMAIL PROTECTED]> wrote: > >def add_edit_model(request, id=None): > > if id is not None: > >instance = MyModel.objects.get(id=id) > >InstanceForm = MyForm(instance=instance) > >

Re: Encoding in models.py (and maybe other files too)

2007-04-18 Thread John Lenton
asking :) I don't know about Nicolas, but I'm writing something for a Spanish-speaking customer, so I might have a TelephoneField ("teléfono") in there, for example. -- John Lenton ([EMAIL PROTECTED]) -- Random fortune: The trouble with a lot of self

Using a block more than once.

2007-04-19 Thread John Morton
7;t appear to be possible. Does anyone have a solution to this problem that doesn't involve putting the title into the context passed to the template render? TIA, John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

Re: Curious error with Session Variables

2007-05-08 Thread John DeRosa
tion'. Perhaps your system is running a similar product? John Diego pylorca wrote: > m > > I deployed my site, and in the admin when i try to login i get this message: > > "Looks like your browser isn't configured to accept cookies. Please > enable cookies,

Re: How well should I know Python before using Django?

2007-05-09 Thread John DeRosa
(1) If you're making a simple web site. (2) If you're making a site with a non-trivial use of authentication, session variables, complicated db lookups; or uses complicated algorithms under the hood. $.02, John walterbyrd wrote: > Before attempting to use Django, a person

Is it really this hard?

2007-05-15 Thread John M
I have checked the forum, and still can't believe I can't find a solution to what I perceive as a simple problem: I have two models: Customer Name phone Order Customer (foreign key to Customer) date product When I put up the form for order, I don't want the Customer (foreign key

Re: Is it really this hard?

2007-05-15 Thread John M
Ok, what if I make the FK just not editable and assign a value at runtime? Will that work? 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 I perceive as a simple problem:

Re: Is it really this hard?

2007-05-15 Thread John Matthew
id=1) form = OrderForm(instance) does this get me the form filled with the data from instance? Thanks On 5/15/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 5/15/07, John M <[EMAIL PROTECTED]> wrote: > > When I put up the form for order, I don't want the Customer (

Re: django vps hosting

2007-05-15 Thread John M
Im really suprised no one has tried Amazon's EC infrastructure, it's pretty sweet, for production I would think! On May 15, 8:12 am, urielka <[EMAIL PROTECTED]> wrote: > I am running two django sites with vpsland(good support) for the last > 7 days, but since i having problems with their ssh(runn

Re: Is it really this hard?

2007-05-15 Thread John M
out a lot of hassle. John On May 15, 6:56 pm, "anders conbere" <[EMAIL PROTECTED]> wrote: > As far as I know the officially recommended way of accomplishing this > while still using the form_for_* helper functions is through the use > of a formfield_callback, a function

Re: Is it really this hard?

2007-05-15 Thread John Matthew
Ah Ha, now we're getting somewhere! Let me start searching for that, thank you!! John On 5/15/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 5/15/07, John M <[EMAIL PROTECTED]> wrote: > > I wish the custom form option would allow me to bind to a data

Re: Is it really this hard?

2007-05-16 Thread John Matthew
Thank you Grigoriy, It's given me some new ideas. John On 5/16/07, Grigoriy Petukhov <[EMAIL PROTECTED]> wrote: > > > John M wrote: > > I have checked the forum, and still can't believe I can't find a > > solution to what I perceive as a

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