Re: Setting system path for django

2011-03-25 Thread Tim Johnson
* Mike Ramirez <gufym...@gmail.com> [110325 17:13]: > On Friday, March 25, 2011 05:46:54 pm Tim Johnson wrote: > > > > > > It really sounds like when you install python, you're using `python > > > setup.py` > > > That's my bad. that should read "

Re: Setting system path for django

2011-03-25 Thread Tim Johnson
* Mike Ramirez <gufym...@gmail.com> [110325 15:42]: > On Friday, March 25, 2011 02:56:53 pm Tim Johnson wrote: > > I've set up python 2.7 on slax. > > I've also set up django 1.1 on slax. Slax does things a little > > differently, so it appears. django is installed at

Re: Setting system path for django

2011-03-25 Thread Tim Johnson
* Tim Johnson <t...@johnsons-web.com> [110325 14:39]: > * Shawn Milochik <sh...@milochik.com> [110325 14:30]: > > Use virtualenv and save yourself a lot of trouble. > Setting system paths is not a lot of trouble for me. It is just > that I have not had to use

Re: Setting system path for django

2011-03-25 Thread Tim Johnson
project, I'm just going to work thru some tutorials, so I must repeat my original question. thank you -- Tim tim at johnsons-web dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this message because you are subscribed to the Google Groups "Django users" group.

Setting system path for django

2011-03-25 Thread Tim Johnson
files are in /usr/lib/python2.6/dist-packages/ but 2.7 does not seem a 'dist-packages' directory at all. Any help would be appreciated. thanks -- Tim tim at johnsons-web dot com or akwebsoft dot com http://www.akwebsoft.com -- You received this message because you are subscribed to the Google

Re: django tutorial on asus netbook

2011-03-22 Thread Tim Johnson
me to resolved on the little feller. I'm thinking that slax might be worth looking into. I think it might be more appropriate if I start a separate thread regarding slax. However, FYI I've used up less than 20% of the disk space on the asus. cheers

django tutorial on asus netbook

2011-03-22 Thread Tim Johnson
pe to take the book along and work on getting an intro to django in some spare time. I am an experienced web programmer, python programmer and familiar with linux and the linux shell. I would welcome comments and advice on whether I can install the current versions of django and procede. thanks --

Re: data model help?

2011-03-07 Thread Tim
On Mar 5, 12:39 pm, Michael Radziej <m...@spieleck.de> wrote: > Hi Tim! > > On Sat, 5 Mar 2011 06:05:51 -0800 (PST), Tim <jtim.arn...@gmail.com> wrote: > > For me that looks a little complex. The 'sequence' doesn't really > > belong to the Chapter or th

data model help?

2011-03-05 Thread Tim
, but there are definitely things I haven't thought of before. How do you handle a property that belongs to a relationship? A manager of some sort? thanks, --Tim Arnold -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Converting to UTF8

2011-03-02 Thread Tim Sawyer
On 02/03/11 21:50, Javier Guerra Giraldez wrote: On Wed, Mar 2, 2011 at 4:21 PM, Tim Sawyer<list.dja...@calidris.co.uk> wrote: However, my web page now gets Harry Størksen instead. looks like part of your stack is still interpreting utf-8 data as latin1 check that 1: the field 2: the t

Converting to UTF8

2011-03-02 Thread Tim Sawyer
o the LATIN1 database, all is fine. Does anyone have any clues as to why this doesn't work and what I can do to fix it? Cheers, Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

htaccess/rewrite engine/default page

2011-03-02 Thread Tim Johnson
an .htaccess file in the same directory as the script with 'rewriteengine on' (I don't need to use mod_python) at this time. I could use some examples on how to set up .htaccess to enable this. I haven't used .htaccess since apache 1.~ URLs to relevant discussions are welcome. thanks -- Tim tim

Re: sqlite path

2011-02-28 Thread Tim
On Feb 28, 10:05 am, Tim <jtim.arn...@gmail.com> wrote: > On Feb 26, 9:25 am, spa...@gmail.com wrote: > > > > > > > > > > > Have you tried updating the DB path in settings.py and creating a new db > > file? > > > On Sat, Feb 26, 2011 at 2:3

Re: sqlite path

2011-02-28 Thread Tim
tom location to the beginning of your PYTHONPATH. > > > Sincerely, > > Andre Terra > > > On Fri, Feb 25, 2011 at 5:28 PM, Tim <jtim.arn...@gmail.com> wrote: > > >> hi, > >> I'm using Django 1.2.3 and I have a new sqlite (3.7.5) installed in a > &g

Re: sqlite path

2011-02-25 Thread Tim
On Feb 25, 4:00 pm, Andre Terra <andrete...@gmail.com> wrote: > On Fri, Feb 25, 2011 at 5:28 PM, Tim <jtim.arn...@gmail.com> wrote: > > hi, > > I'm using Django 1.2.3 and I have a new sqlite (3.7.5) installed in a > > custom location. > > There is an old sq

sqlite path

2011-02-25 Thread Tim
hi, I'm using Django 1.2.3 and I have a new sqlite (3.7.5) installed in a custom location. There is an old sqlite (3.6.23.1) installed in /usr/local/bin/. How do I tell Django to use the new sqlite? I'm on FreeBSD 8.0. thanks, --Tim Arnold -- You received this message because you

Re: Displaying a table and make its columns sortable

2011-02-17 Thread Tim Sawyer
/jQuery. I'd suggest looking at some jQuery plugins, such as: http://tablesorter.com/docs/ http://plugins.jquery.com/project/PicNetTableFilter Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: help understanding mptt/treebeard

2011-02-04 Thread Tim
again for your input, --Tim Arnold On Feb 3, 12:08 pm, Jason <goodri...@gmail.com> wrote: > "maybe a chapter needs to be added as the > 13th chapter in a Book, for example" > > MPTT and the other trees are mainly used on data structures where node > insertion might happ

help understanding mptt/treebeard

2011-02-03 Thread Tim
and the associated mathematics, but from reading the mptt docs, I think that the application might be the perfect fit for my project. Can someone confirm or point me to some other documentation to help me figure this out? thanks, --Tim Arnold -- You received this message because you are subscribed

Re: mis-named setting? SESSION_EXPIRE_AT_BROWSER_CLOSE

2011-01-31 Thread Tim Sawyer
presence? Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For

Re: Can I store full dates (mmddyyyy) and year-only dates (yyyy) in the same field?

2011-01-25 Thread Tim Sawyer
, and January where unknown. I then had a method on the model object to return the format based on the stored date and the resolution. It worked for what I needed it for, Tim. > Hello, > > I'm designing a model which is a collection of texts. Some of the > texts will be things like books,

Re: Screen/Form Fields

2011-01-11 Thread Tim Sawyer
ngs').hide(); } }); Hope that gets you started. Tim. On 10/01/11 18:18, hank23 wrote: So in the widget attrs for the dropdown I should define an event and a javascript function to call whenever the event (like onclick) fires? So where's a good place to find the javascript code to actual

Re: Screen/Form Fields

2011-01-10 Thread Tim Sawyer
of within the form? Specify each field individually and just output text for the ones you want to be readonly. See: http://docs.djangoproject.com/en/dev/topics/forms/#customizing-the-form-template Tim -- You received this message because you are subscribed to the Google Groups "D

Re: New to Django, sheet music organization site

2011-01-03 Thread Tim Sawyer
the url" Hope that helps, Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroup

Re: Subdomain/Accounts

2010-12-29 Thread Tim Sawyer
That's a cunning plan, nice one Andy! I'd use that if I did it again - a virtual host instance per subdomain uses lots of memory on a VPS... Tim. On 29/12/10 18:19, Andy Shaw wrote: Tim's solution would obviously work, but it sounds to me like you would need to manually configure

Re: Subdomain/Accounts

2010-12-29 Thread Tim Sawyer
://drumcoder.co.uk/blog/2010/oct/02/limiting-records-django-admin/ The above posts also show how to use a manager to limit the records, so you can do Blog.objects.all() to get all records across all sites, and Blog.on_site.all() to get the records only for the current site. Hope that helps, Tim. On 23/12

case insensitive "in" query

2010-12-24 Thread Tim Saylor
I have two lists of values and I need to filter a queryset to only rows in which a column's value is in one of these lists. The data is not case consistent, so if I were comparing the column to a single value I would use the "iexact" lookup type. Since I'm comparing to a list of values I'm using

Re: Custom SQL questions

2010-12-20 Thread Tim Sawyer
On 20/12/10 00:10, Andy wrote: On Dec 19, 6:20 pm, Tim Sawyer<list.dja...@calidris.co.uk> wrote: I think so, yes. Something like this: You can then do something like anObjectA = ObjectA.objects.filter(id=1)[0] objectBs = ObjectB.objects.filter(object_a=anObjectA) This requ

Re: Custom SQL questions

2010-12-19 Thread Tim Sawyer
B.objects.filter(object_a__id=1) Hope that helps. I'm a bit confused by what you're selecting in: > SELECT * FROM TableA JOIN TableB ON TableA.id=TableB.some_id > WHERE TableA.id=1 What are you hoping to have returned? Tim. -- You received this message because you are subscribed to the Google Groups

Re: PyDev Django Debugging

2010-12-17 Thread Tim Sawyer
this at the top of manage.py import sys sys.path = ['/path/to/web/sites/mysite', '/path/to/web/sites/app'] + sys.path Tim. On 17/12/10 15:03, MLG wrote: Hi Tim, Thank you for your prompt response. The "runserver --noreload" is in place as well in the arguments tab. I have already set t

Re: PyDev Django Debugging

2010-12-17 Thread Tim Sawyer
Here's my instructions for debugging in PyDev, hope that helps: http://drumcoder.co.uk/blog/2010/apr/21/debugging-django-pydev/ This is done using the development server, not Apache, from within Eclipse. Does your app work in the development server? Tim. > Hi, > > I am new to Djan

Re: Apache & mod_wsgi are configured correctly. Need Django to recognize my django.wsgi file.

2010-12-11 Thread Tim Sawyer
Here's the config I'm using for mod_wsgi: http://drumcoder.co.uk/blog/2009/nov/21/apache-mod_wsgi-config/ Hope that helps, Tim. On 11/12/10 23:35, jc wrote: You definitely lost me in some places but you've also cleared some things up in the process. I also noticed that I had "&qu

Re: ORA-01425

2010-12-04 Thread Tim Sawyer
On 03/12/10 17:29, Ian wrote: On Dec 2, 3:17 pm, Tim Sawyer<list.dja...@calidris.co.uk> wrote: I unpatched mine (changed LIKEC to LIKE) and then ran: >>> from django.db import connection >>> cursor = connection.cursor() >>> result = cursor.execute(r&q

Re: ORA-01425

2010-12-03 Thread Tim Sawyer
On 03/12/10 12:52, Jani Tiainen wrote: On Thursday 02 December 2010 17:13:48 Tim Sawyer wrote: Hello, I'm using Django against an Oracle 10 database. It used to work. Then they upgraded it to 10.2.0.5 (not sure what from, I can probably find out). This query now gives: ORA-01425: escape

Re: Initial Create Table Script

2010-12-03 Thread Tim Sawyer
Excellent, thanks. I needed to run ./manage.py sql auth ./manage.py sql sites ./manage.py sql sessions ./manage.py sql admin ./manage.py sql contenttypes to get what I needed. Cheers, Tim. On 03/12/10 12:45, Anurag Chourasia wrote: Yes there is. You need to use *./manage.py sql auth

Initial Create Table Script

2010-12-03 Thread Tim Sawyer
is correct? INSTALLED_APPS = ( 'django.contrib.auth', ... ) I don't have direct access to the database that I'm running against on a customer site - therefore I need a script to create the database. Thanks, Tim. -- You received this message because you are subscribed to the Google Groups

Re: ORA-01425

2010-12-02 Thread Tim Sawyer
NSLATE('A' USING NCHAR_CS) LIKE TRANSLATE('A' USING NCHAR_CS) ESCAPE TRANSLATE('\' USING NCHAR_CS)") >>> rows = cursor.fetchall() >>> for row in rows: > ... print row[0] > ... > 1 >>> print rows > ((1,),) Tim. -- You received this message because

Re: ORA-01425

2010-12-02 Thread Tim Sawyer
On 02/12/10 15:40, Jirka Vejrazka wrote: I'm using Django against an Oracle 10 database. It used to work. Then they upgraded it to 10.2.0.5 (not sure what from, I can probably find out). Hi Tim, sorry, I don't have a solution for you, but you might want to check out http

Re: ORA-01425

2010-12-02 Thread Tim Sawyer
/backends/oracle/base.py?rev=12293 that regressed back to LIKE. http://code.djangoproject.com/ticket/11017 the reason. Tim. On 02/12/10 15:13, Tim Sawyer wrote: Hello, I'm using Django against an Oracle 10 database. It used to work. Then they upgraded it to 10.2.0.5 (not sure what from, I can

ORA-01425

2010-12-02 Thread Tim Sawyer
DER_LOG"."BLL_LENDER_RESPONSE", "BROKER_LENDER_LOG"."BLL_DATE" FROM "BROKER_LENDER_LOG" WHERE ("BROKER_LENDER_LOG"."BLL_JOBID" LIKE TRANSLATE(%s USING NCHAR_CS) ESCAPE TRANSLATE(\'\\\' USING NCHAR_CS) AND "BROKER_LENDER_LOG&qu

Re: Installing on Ubuntu Python 2.6- Install failure

2010-11-29 Thread Tim Bowden
On 29 November 2010 21:15, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Nov 29, 2010 at 6:56 AM, Tim Bowden <tim.bow...@gmail.com> wrote: >> >> When installing django from an official release tarball onto Ubuntu >> 10.04 python 2.6, (python setup.py install)

Installing on Ubuntu Python 2.6- Install failure

2010-11-29 Thread Tim Bowden
tructions be updated or is this a bug in the packaging? Regards, Tim Bowden -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send e

Cheetah templates

2010-11-23 Thread Tim
` function.") The "tools/example.tmpl" is a subdirectory under my templates dir, which is configured in the settings TEMPLATE_DIRS and django has no problem finding other templates in those subdirectories. Can someone point out what I'm doing wrong here? thanks, --Tim Arnold --

Re: Mobile website using Django

2010-11-18 Thread Tim Sawyer
If it helps, I've used iui and now jquery mobile with Django. http://code.google.com/p/iui/ http://jquerymobile.com/ Some random scribblings of mine on jQueryMobile here: http://drumcoder.co.uk/blog/2010/nov/12/jquery-mobile-basics/ Tim. On 18/11/10 20:51, Helge wrote: Hi I wish to develop

Re: CMS for django

2010-11-14 Thread Tim Johnson
Thanks for the responses. -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.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-us...@googlegroups.com. To unsubs

CMS for django

2010-11-14 Thread Tim Johnson
Greetings: I would welcome comments on what CMS is compatible with django. I have seen much on the web regarding this topic, but I would suspect that from this ML I am much more likely to hear directly from someone who is deploying a CMS with django. thanks in advance -- Tim tim at johnsons

Re: Postgres LATIN1 to UTF-8

2010-11-12 Thread Tim Sawyer
On 08/11/10 07:03, Christophe Pettus wrote: On Nov 7, 2010, at 2:17 PM, Tim Sawyer wrote: Does anyone have a recommended method for converting a Postgres database from LATIN1 to UTF-8? Probably the most efficient way is to use pg_dump with the --encoding option: Dump the database in UTF8

Postgres LATIN1 to UTF-8

2010-11-07 Thread Tim Sawyer
. For this I used pg_dump to create a sql file, then just ran it from an empty utf8 database. Cheers, Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubs

Re: Django and Flux

2010-10-18 Thread Tim Sawyer
e same Eclipse instance. Having said that, we use Flex standard install for Flex development, and a seperate Eclipse isntance for the back ends (Java/Python/Whatever). It's more stable that way. Tim. -- You received this message because you are subscribed to the Google Groups "Django u

Re: modelformset_factory, initial, and queryset

2010-10-17 Thread Tim Valenta
> The only thing I can think of is that the choices for the field are > not being set correctly to start with - in the bit where you write > `(choices=[yada yada]`, what is 'yada yada'? Obviously, this must > contain *all* possible values for the codes across all responses, so > that the relevant

Re: modelformset_factory, initial, and queryset

2010-10-17 Thread Tim Valenta
code up just now. Thanks for the second pair of eyes! I knew of course that the `initial` keyword argument worked in my other views, but I doubted myself. Surprising how many really lame mistakes you can make even after a couple years of using Django every day! Tim On Sun, Oct 17, 2010 at 08:38

Re: modelformset_factory, initial, and queryset

2010-10-15 Thread Tim Valenta
ue for any of the objects' "codes" field is empty. On Oct 14, 3:09 am, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Oct 14, 10:32 am, Tim Valenta <tonightslasts...@gmail.com> wrote: > > > > > > > > > > > This is driving me mad, so I must as

modelformset_factory, initial, and queryset

2010-10-14 Thread Tim Valenta
This is driving me mad, so I must ask the community, in hopes of a workaround: I've got a simple formset of models on a page, generated by modelformset_factory. This particular page will never create forms-- it only modifies existing ones. Therefore the queryset I pass into the formset

Re: How to specify NULL as the default of a model field.

2010-10-09 Thread Tim Diggins
Yes I'm setting blank=True and null=True. But, when I migrate using South (I've added this field to an existing model), South complains that the field has no default value... In this instance, it isn't that important, but just wondering how I specify "NULL" in python in future (I would normally

How to specify NULL as the default of a model field.

2010-10-09 Thread Tim Diggins
It may seem odd but I want to explicitly specify NULL as the default for a particular field / column. (This is so that South picks up that the default value is null, rather than there being no default specified, which is what happens if you specify "null=True" any thoughts (or it may just be

Re: django graphs

2010-10-06 Thread Tim Sawyer
I've used http://teethgrinder.co.uk/open-flash-chart-2/ and http://g.raphaeljs.com/ To do charts in a Django app. Tim. > ashy wrote: >> Hi All, >> >> I want to create line graph in django. I have installed django graphs, >> but there aren't sufficient examples for

Re: apache reload

2010-10-04 Thread Tim Sawyer
ey are changed? Yes. You get get mod_wsgi to watch your source files and reload if they change. See http://drumcoder.co.uk/blog/2009/nov/21/apache-mod_wsgi-config/ Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Django Tutorial

2010-10-04 Thread Tim Reischmann
shopping for used books to get ones that are updated to be used with v1 or v1.1 of the software TIM On Mon, Oct 4, 2010 at 13:57, Sithembewena Lloyd Dube <zebr...@gmail.com>wrote: > IMHO, you'd be better off starting with the official documentation and > tutorial. Both are kep

Re: Adding help text to Django admin

2010-10-04 Thread Tim Sawyer
Set help_text on the appropriate model field name = models.CharField(max_length=100, help_text='Current name of band') Tim. On 04/10/10 09:46, Sithembewena Lloyd Dube wrote: Greetings folks, I need to add "help text" to a Django admin. Sort of like the text below fields in

Re: Removing the 'site' (not the website/url) field from django-comments

2010-09-28 Thread Tim Sawyer
DIRS pointed to different top level templates. In that way I have different sites, but still referring to the same database tables, and crucially the same SITE_ID, so you wouldn't have the problem with django-comments. Would that work for you? Tim. -- You received this message because you are subscrib

Re: SITE_ID

2010-09-27 Thread Tim Sawyer
> On 25/09/2010 18:32, Tim Sawyer wrote: >> On 25/09/10 15:57, craphunter wrote: >>> Yes, I have read it, but I don't really get it. What is the meaning of >>> it? >> >> Consider a website that has multiple blogs, all of which are deployed to >> the sam

Re: error in urlconf

2010-09-25 Thread Tim Sawyer
On 25/09/10 21:14, bagheera wrote: Dnia 25-09-2010 o 22:04:16 Tim Sawyer <list.dja...@calidris.co.uk> napisał(a): On 25/09/10 20:39, CarloRatm wrote: http://pastebin.com/aY6tZm6j What's wrong with that code ? Thank you, cheers ^blog/ ^(?Pd+)$ should be ^blog/ ^(?P\d+)/$ ?? Tim.

Re: error in urlconf

2010-09-25 Thread Tim Sawyer
On 25/09/10 20:39, CarloRatm wrote: http://pastebin.com/aY6tZm6j What's wrong with that code ? Thank you, cheers ^blog/ ^(?Pd+)$ should be ^blog/ ^(?P\d+)/$ ?? Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Django on Apache

2010-09-25 Thread Tim Sawyer
to restart, and if something isn't working I'll restart the test server as my first test. If it still doesn't work then it's more than likely my fault rather than the server's... Tim. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Django on Apache

2010-09-25 Thread Tim Sawyer
refreshing. If you're deploying on apache using mod_wsgi, you can set that up to automatically pick up your changes when the code updates. Details at: http://drumcoder.co.uk/blog/2009/nov/21/apache-mod_wsgi-config/ Hope that helps, Tim. -- You received this message because you are subscribed to the Goo

Re: SITE_ID

2010-09-25 Thread Tim Sawyer
rows in the django_site database table, with serials 1 and 2. The table that holds the blog entries has a foreign key to Site, and so identifies which site the blog post appears on. At least that's how I used it...hope that helps clarify it a bit! Tim. -- You received this message because

Re: Recommend a book

2010-09-24 Thread Tim Johnson
* Sandro Dutra <hexo...@gmail.com> [100924 09:28]: > "The Definitive Guide to Django: Web Developement Done Right", Apress, > updated Django 1.1 > "Pratical Django Projects", Apress, updated Django 1.1 Thanks for all the input. I know have the means to mak

Re: Recommend a book

2010-09-23 Thread Tim Johnson
Thank you - Shawn Milochik and Tran Cao Thai. :) thus far. I'll check back in the morning. cheers -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com -- You received this message because you are subscribed to the Google Groups "Django users" grou

Recommend a book

2010-09-23 Thread Tim Johnson
to a particular IDE. (I roll my own with either vim or emacs) TIA -- Tim tim at johnsons-web.com or akwebsoft.com http://www.akwebsoft.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: multiple servers one database

2010-09-21 Thread Tim Arnold
server setup and though that seems a little complicated, I suppose my desires are more difficult than I thought at first. Any other ideas out there? Is SQLite a possibility or is master-master the way to go? thanks, --Tim On Sep 20, 9:22 pm, Steve Holden <holden...@gmail.com> wrote: > On

multiple servers one database

2010-09-20 Thread Tim Arnold
I read this weekend). So finally, my question is how to solve the problem and maybe whether SQLite would be a better database since AIUI, it is simply file-based. thanks, --Tim Arnold -- You received this message because you are subscribed to the Google Groups "Django users" grou

paypal ipn change

2010-09-11 Thread Tim Arnold
Hi, I started having trouble with paypal IPN on Sept. 4 (a week ago), but didn't know it until they notified me yesterday that my endpoint url was failing. Well, I had just upgraded to Django 1.2.1 and figured it had to be that or some code refactoring I had done. However, as far as I can tell,

Re: Django template : For Loop

2010-09-06 Thread Tim Chase
but is this correct way to get values from two tables and use in templates? Me actually want to combine to tables and use there values in template Is the above post code is correct way to do this? Combine the in the *view* with the zip() built-in, and use Steve's suggestion to split the

Re: LIMITATIONS of django

2010-09-04 Thread Tim Chase
On 09/04/10 11:45, samie wrote: sir what are the shortcomings and limitations of Django. i am newbie and got to develop my own cms using python. Some of the limitations I know of: - composite keys (long-range plans; alternatively, nothing prevents you from using SQLAlchemy or the like) -

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Tim Chase
On 08/30/10 10:09, dave b wrote: well you finish the tutorial(s) now and then you try to upload a file right? So you start uploading the file. Now because (I assume you are still using the django built in webserver) why don't you play with this a bit, start uploading say 10 1gb files(all at

Auto-generating menus based on walking urls.py?

2010-08-27 Thread Tim Chase
Just playing around with some ideas, I've been trying to figure out how to auto-generate some menus based on my url.py config layout. 1) what's the preferred way to get the "base" (rather than include()'ed) urls.py I see a core.urlresolvers.get_urlconf but that seems an internal piece of

Re: double for in the template

2010-08-26 Thread Tim Chase
On 08/26/10 11:10, Andrea Imparato wrote: How can i scan the zipped list in the template page? If I do {% for f in zip %} {{ f }} {% endfor %} How can I access the second item in the index? I think since version 1.0, you can just use standard tuple-unpacking syntax as detailed in the

Re: double for in the template

2010-08-26 Thread Tim Chase
On 08/26/10 10:17, Andrea Imparato wrote: I have 2 lists and I have to scan them "concurrently" with the same indexes at the same time. Something like: {% for lists %} first item from the first list first item from the second list {% endfor %} I thought about creating something like a map

Re: writing HTML Code into Template with render_to_response: How?

2010-08-25 Thread Tim Sawyer
achieve it to get my generated HTML- Code inserted "as is" into my Template? Instead of {{output}} use {{output|safe}} http://docs.djangoproject.com/en/1.2/ref/templates/builtins/#safe Tim. -- You received this message because you are subscribed to the Google Groups "Django users&

Re: command python not recognized with syncdb

2010-08-25 Thread Tim Sawyer
Add your python directory to your PATH Control Panel/System/Advanced/Environment Variables You'll need to restart your DOS box to pick up the new PATH. Type SET in the DOS box to see the values. Tim. On 25/08/10 09:21, yotta wrote: Hi i am new on Djagon and i was fellowing the tutorial

Re: Bind variables in Oracle backend - how to use them?

2010-08-20 Thread Tim Sawyer
Excellent, thanks Ian. It works a treat, post updated. Tim. > On Aug 19, 11:58 am, Tim Sawyer <list.dja...@calidris.co.uk> wrote: >> No, I don't think you're mistaken, especially if you want to use hints. >> >> I tried this code again today with the django databa

Re: Bind variables in Oracle backend - how to use them?

2010-08-19 Thread Tim Sawyer
emy? Does that have hint support? I've never used it. Tim. On 18/08/10 21:58, buddhasystem wrote: Thanks, I'll look into that. In the meantime, I managed to just use the cursor from cx_Oracle (as in the example on Oracle site) and the code looks slightly more elegant. However, both &quo

Re: Bind variables in Oracle backend - how to use them?

2010-08-18 Thread Tim Sawyer
gt;>> There was a bug in Django that prevented this working (hence the None in the code above) - it's fixed in Django 1.2. The full thread for this is at http://www.mail-archive.com/django-users@googlegroups.com/msg100490.html Hope that will help send you in the right direction. Tim. --

Re: javascript

2010-08-13 Thread Tim Sawyer
Yes myJavaScriptFunction( {{DjangoTemplateVariable}} ); function myJavaScriptFunction( pValue ) { ... } Tim. > Hi > Is it possible to give a javascript function a django variable as a > parameter? > thank you > > -- > You received this message because you are subscribed

Re: do QuerySet joins still suck?

2010-08-10 Thread Tim Chase
On 08/10/10 18:39, Phlip wrote: The point of a relational database is to distribute everything into normalized tables, then perform set operations on multiple tables. Given an Order model with many order_items, other ORMs allow me to query them like this (in a hypothetical notation):

Re: accessing a dictionary in template

2010-08-09 Thread Tim Sawyer
On 09/08/10 19:56, owidjaya wrote: in php i can do this $some_mapping = array( "var1" : content_var1, "var2" : content_var2, ) for($i =1; $i< 3; $i++){ echo $some_mapping["var"+$i]; } can i do this in django

Re: Search Field on All Pages

2010-08-08 Thread Tim Sawyer
On 08/08/10 14:48, kostia wrote: To continue, Tim, do you use haystack? I passed its beginning tutorial and configured with xapian through haystack-xapian module. Now I'm discovering the other haystack docs and api. Not everything is clear. For example I have a user with name Bob. When I type

Re: Search Field on All Pages

2010-08-08 Thread Tim Sawyer
://www.brassbandresults.co.uk/ Hope that helps, Tim. On 08/08/10 10:41, wchildsuk wrote: Hi, I want a search field on all my pages and was wondering the best way to do this. I could create a function and import it to every view but this doesn't seem to follow the django DRY principles. I was wondering if anyone

Re: Best way to find near people

2010-07-29 Thread Tim Chase
sum of the squares of the differences. (a little algebra/geometry there). Alternatively, you could .order('-distance') and then slice those results, taking the top 10 nearest or paginate them by distance putting the nearest people at the front. -tim -- You received this message because you

Re: single point of entry to a webpage

2010-07-27 Thread Tim Chase
On 07/27/10 03:08, bruno desthuilliers wrote: A django *project* is composed of * one or more apps. * templates * static resources (css, images etc) ...and one or more "utils.py" files... :-) (tips his hat in the direction of JKM and makes a hasty exit...) -tkc -- You received this

Re: scaling my site

2010-07-24 Thread Tim Chase
On 07/24/10 09:12, tiemonster wrote: First off, what type of application is it? Many reads, many writes, or both? If you have lots of reads and few writes (like a blog or PR site), you can do heavy caching and you'd be fine with just about any host. If you have lots of writes (like a forum or

Re: working with model fields

2010-07-24 Thread Tim Chase
bility to resize text fields, I'd stop visiting your site pretty quickly... -tim [1] https://addons.mozilla.org/en-US/firefox/addon/3818/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: URL problem

2010-07-19 Thread Tim Sawyer
of one or more letters (1ste-blog-post - not ok, there are hypens and numbers. this should be [-\d\w]+ - slash So, try this: ^(?P\d{4})/(?P[a-z]{3})/(?P\d{1,2})/(?P[-\d\w]+)/$ Hope that helps, Tim. > Hi, > > i have a strange problem with urls. > > Project name: erp > Appl

Re: URL didn't match

2010-07-16 Thread Tim Chase
On 07/16/2010 04:26 PM, Duncan wrote: Request URL: http://[redacted]/seeds/ ... 1. ^seeds/ ^/$ ... urlpatterns = patterns('', (r'^seeds/', include('seeds.general.urls')), While you don't include seeds.general.urls in your post, given the traceback you kindly included, it looks

Re: No module named site - error deploying a django-jython war in tomcat

2010-07-16 Thread Tim Sawyer
I got around this problem by downgrading from jython 2.5.2beta1 to jython 2.5.1. Hope that helps! Tim. On 15/07/10 22:47, Jose Flores wrote: Hi guys, Any workaround on this issue? Regards, Jose On Jul 8, 2:43 pm, Rafael Nunes<rafael.nu...@gmail.com> wrote: Same problem here

Re: Error related to googlebot?

2010-07-12 Thread Tim Chase
On 07/12/2010 01:10 PM, Tor Nordam wrote: So my question is if there is anything in particular which might cause the page to crash when a searchbot tries to load it, but not do the same for a regular user. Well, additional information about the HTTP transaction might help. Bots may or may

Re: www.djangoproject.com

2010-07-01 Thread Tim Chase
On 07/01/2010 02:37 PM, FC wrote: I already used Wireshark to see what's going on with the unique combination "Firefox under Lucid Lynx accessing djangoproject.com": the djangoproject.com host simply doesn't respond to the initial HTTP GET request (or the reply never gets through). Not sure what

Re: Proper approach to updating model object with 100 attributes.

2010-06-30 Thread Tim Chase
I'd stick to setattr and maybe verify that the key in the dictionary is one of the model's fields. I think there is a method on _meta called get_all_field_names. I've used this before to validate such actions. If that's the case, you can tweak the above to something like for name in

Re: Proper approach to updating model object with 100 attributes.

2010-06-30 Thread Tim Chase
On 06/30/2010 02:10 AM, euan.godd...@googlemail.com wrote: I think you need to be careful messing with __dict__ as Django turns most fields in descriptors behind the scenes so setting them in the __dict__ could break these. Yeah, that was somewhat my assumption (and thus my caveat). Well,

Re: Proper approach to updating model object with 100 attributes.

2010-06-29 Thread Tim Chase
On 06/29/2010 12:01 PM, Ray Cote wrote: Hi List: I have a Django model with over 100 fields in it that is loaded from a data feed. Each row in the model has a unique field, let's call it item_id. When loading new data, I'm first checking to see if item_id is in the table, if it is, I want to

<    5   6   7   8   9   10   11   12   13   14   >