How do I display a template with Chinese characters in it?

2008-11-09 Thread Frank
tf8' codec can't decode bytes in position 1445-1446: invalid data Exception Location: C:\Python25\lib\encodings\utf_8.py in decode, line 16 -- The charset I use in the html file is 'gb2312'. What do I have to do in order to be able to display Chinese la

reverse function results in NoReverseMatch when passing parameters

2010-04-27 Thread Frank
I suspect I have a simple problem here... But I'm a Django beginner (plus my Python could be stronger) I'm trying to use the reverse(...). When I call it as such: return HttpResponseRedirect( reverse('my_site.core_prototype.views.PostWithList') ) it works as expected. Now I need to call it

Re: reverse function results in NoReverseMatch when passing parameters

2010-04-27 Thread Frank
I think I've discoved that part of my issue is not understanding that reverse(...) works in conjunction with the UrlConf file and not with the views directly... On Apr 27, 8:21 am, Frank wrote: > I suspect I have a simple problem here... But I'm a Django beginner > (plus my

Re: How to adapt some code provided by friend

2010-05-05 Thread Frank
se these tools. But, some basic knowledge will take you a long way when trying to determine what a problem might be or how to go about something. Regards, Frank (tOSU) On May 5, 7:05 am, Etienne Python wrote: > Well actually, I copied all of the data (including the database), not only > the

Re: where can I find good unit test examples?

2010-05-06 Thread Frank
re it has it's down falls, it works very well for my system. Frank [tOSU] http://blog.theOpenSourceU.com/ On May 6, 3:23 am, Chris Withers wrote: > Hi All, > > Where can I find good examples of django unit tests? > > I currently just want to test my models and some helper

Django NameError in first web app

2010-11-16 Thread frank
hi all, i just doing Django..tried the first example in Django book...i encountered problem at admin page. it says that admin is not defined. i followed each step in tutorial and i am able to run django server also. pls help me to solve it. i am adding error output here. Environment: Request Met

how to add poll app in Admin page

2010-11-17 Thread frank
hi all i followed each step in tutorial to create poll app...i am able to see the admin page...when i added the Admin class to Poll class as inner class, i am not getting the poll app interface in admin page..what to do>>> -- You received this message because you are subscribed to the Google Gro

Re: how to add poll app in Admin page

2010-11-18 Thread frank
Thanks everyone i will follow the new tutorial. and i have not created the admin.py with the correct contents.. thak a lot for the reply On Nov 17, 6:48 pm, frank wrote: > hi all > > i followed each step in tutorial to create poll app...i am able to see > the admin page...when i add

django.contrib.sitemaps unit tests dependency on django.contrib.auth

2010-11-21 Thread Frank
rt in trac but didn't want to re-hash that if it is known and accepted as appropriate. Furthermore, the docs do not note the dependency: http://docs.djangoproject.com/en/1.2/ref/contrib/sitemaps/ I suppose this might not be the best place for this type of thing but thought I'd start here...

Re: newbie - deploy error

2007-03-27 Thread Frank
Do I still need to so the Location setting in httpd.conf? SetHandler python-program PythonPath "['C:\djangoapps'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonDebug On Thanks Frank - Original Message

Re: newbie - deploy error

2007-03-27 Thread Frank
mysite works mysite3 gives me a 404 error I guess I still have something wrong. Thanks Frank NameVirtualHost * ServerName mysite SetHandler python-program PythonPath "['C:\djangoapps'] + sys.path" PythonHandler django.core.handlers.m

Re: newbie - deploy error

2007-03-28 Thread Frank
Hello, I followed step 4 from http://www.djangobook.com/en/beta/chapter21/ mysite works, but mysite3 goes not. Is the instructions wrong? Thanks Frank ServerName cmcfrocco.stemc.org SetHandler python-program PythonPath "['C:\djangoapps'] + sys.path"

Looking for more tutorials

2007-03-29 Thread Frank
Hello, I am new to django and python. I have experience in .net and php and jsp. Are there more tutorials other than the one on the djangoproject site? Looking to use forms and how to fill dropdrown boxes from a database. Thanks Frank --~--~-~--~~~---~--~~ You

Looking for tutorials

2007-03-29 Thread Frank
. Thanks Frank --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED

how do change TextField size on form?

2007-04-05 Thread Frank
Hello, I have a field defined as: Address = models.TextField(maxlength=200) I want to have a TextArea on the form (rows=3, columns=40) How do I tell the model to generate this? Thanks Frank --~--~-~--~~~---~--~~ You received this message because you are

Several newbie questions

2007-04-05 Thread Frank
in settings Thats all for now. Thanks Frank --~--~-~--~~~---~--~~ 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

Re: how do change TextField size on form?

2007-04-05 Thread Frank
Thanks, I am not at that level yet. I still am going through the tutorial. So do I not use the admin interface, but create my own forms? Regards, Frank - Original Message - From: "gordyt" <[EMAIL PROTECTED]> To: "Django users" Sent: Thursday, April 05, 200

Any books available

2007-04-05 Thread Frank
Hello, Looking for books on django. Frank --~--~-~--~~~---~--~~ 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 g

tutorial 4 not working

2007-04-06 Thread Frank
Hello, http://www.djangoproject.com/documentation/tutorial04/ I am getting template errors: is there a step missing? Thanks Frank here is my code: from django.conf.urls.defaults import * from mysite.polls.models import Poll info_dict = { 'queryset': Poll.objects.all(), } u

Re: tutorial 4 not working

2007-04-06 Thread Frank
I did not see that step in the tutorial to rename the templates. Thanks I am now getting this: No polls are available. I have one record on file. Frank - Original Message - From: John Danks To: [EMAIL PROTECTED] Sent: Friday, April 06, 2007 10:09 AM Subject: Re

Python 2.5, Postgres, Psycopg2 on OS X

2007-10-25 Thread Frank
All- Having a rough go getting database bindings in OS X. I've installed psycopg2 using the package here: http://pythonmac.org/packages/py25-fat/mpkg/psycopg2-2.0.5.1-py2.5-macosx10.4.zip When I run 'python manage.py shell' I get the following... any ideas on how to fix this? Traceback (most r

Download counter?

2006-09-18 Thread frank
This will probably show my incredible lack of understanding regarding web servers vs. django once more, but... Is there a reasonably simple and transparent (to the user) way of counting downloads? Sure, I could create a download button for each item, but that would be an extra step for the user.

Re: Download counter?

2006-09-19 Thread frank
Thanks, Barry and Malcolm! I'll have to explore a bit more to see if the Redirect class will work for me. And no, the grep approach (while conceptually simple) would be messy. -f --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Partial-coverage apache auth?

2006-09-20 Thread frank
At the 11th hour before the new site is to go online, we are suddenly unsure that using clear-text passwords is adequate. Currently the web site has a few pages that will be readable by anyone. If someone wants to see more, or download content, they have to establish an account. This is free, t

ifequal fails in loop (object attribute vs. direct?)

2006-10-02 Thread frank
I have a simple loop which sets up a series of radio-buttons. "objgroup" is obtained through a DB query/filter: {% for obj in objgroup %} showing other things... {% endfor %} However the operation never indicates the desired default condition. If I force an exception, I can see that t

Re: ifequal fails in loop (object attribute vs. direct?)

2006-10-02 Thread frank
Malcolm Tredinnick wrote: > On Mon, 2006-10-02 at 16:05 -0700, frank wrote: > > I have a simple loop which sets up a series of radio-buttons. > > "objgroup" is > > obtained through a DB query/filter: > > > > {% for obj in objgroup %} > >

Re: ifequal fails in loop (object attribute vs. direct?)

2006-10-02 Thread frank
[snip] > > Sure -- seek_id is calculated in the view. It is delivered to the > > template > > via the second argument to render_to_response: { ..., "seek_id" : > > value,...}. > > Yes, I realised it came from the view like that. So my question wasn't > clear. What have you said doesn't tell us w

apache-only: ViewDoesNotExist - no module named settings

2006-10-08 Thread frank
Everything seems to work fine with the development server. And with an earlier version of my code, things were (mostly) working under Apache/mod-python. But after this last (massive) set of changes, I'm suddenly getting nowhere once the python calls are not in the base project directory. The er

Re: apache-only: ViewDoesNotExist - no module named settings

2006-10-09 Thread frank
It's running now. I ended up putting a whole bunch of links so that files could be "found". Really ugly band-aid. It would be most helpful if there was some documentation somewhere that described what mod_python/apache needs as distinct from the development server. --~--~-~--~~---

Re: SET TIME ZONE Error

2006-10-09 Thread frank
I don't know if you've resolved this, but I had a similar error, and... The blooper that I had made was in renaming a column in the database. It was in the midst of a number of other changes, and somehow I never fixed the model to have the same literal name. Running python manage.py validate

Redirect from button event?

2006-08-30 Thread frank
table degree (given the number of different things that could be done and a large data table). This is clearly not the "Django way", but is there some way in which this might be accomplished? Thanks for all your insights! -frank --~--~-~--~~~---~--~---

Re: Redirect from button event?

2006-08-30 Thread frank
Russell Keith-Magee wrote: > On 8/31/06, frank <[EMAIL PROTECTED]> wrote: > > > > > > This is clearly not the "Django way", but is there some way in which > > this might be accomplished? > > > Can you make the button an inside a action="

forwarding email to a django application

2005-12-19 Thread Frank
reads the contents and interactions with the model. i found out how to do this with rails (http://wiki.rubyonrails.com/rails/pages/HowToReceiveEmailsWithActionMailer) and i am still searching for how to do this with django. any help would be greatly appreciated... thanks in advance. -frank

Is there a way to use the Cut Filter to only do the first instance?

2008-10-31 Thread Frank Peterson
I am using the following {{ section.get_absolute_url|cut:"/news/" }} on a string that is /news/new-york-jets/news/ I need to remove the first /news but the CUT filter removes all instances of it, is there a way for me to remove on the first "/news"? --~--~-~--~~~---~--

simple tags and (auto)escaping

2008-11-26 Thread frank h.
tag in the template with {% autoescape on %} {% testtag %} {% endautoescape %} doesn't work either. what am I missing? thanks for any insight -frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: simple tags and (auto)escaping

2008-11-27 Thread frank h.
forgot to add that I am using django-1.0.1 On Nov 26, 9:43 pm, "frank h." <[EMAIL PROTECTED]> wrote: > I am writing a simple tag as follows: > > - > from django.template import Library > from django.utils.safestring import mark_for_

why 'No module named safestring'?

2009-01-11 Thread frank Shi
i use django 0.96 ,template render html string. from django.utils.safestring import mark_safe context=Context({ 'div1':mark_safe(obj), }) return HttpResponse(template.render(context)) it's error: No module named safestring?why already install python 2.5 --~--~-~--~~-

Re: why 'No module named safestring'?

2009-01-11 Thread frank Shi
thanks David On Jan 12, 11:53 am, "David Zhou" wrote: > On Sun, Jan 11, 2009 at 10:25 PM, frank Shi wrote: > > > i use django 0.96 ,template render html string. > > > from django.utils.safestring import mark_safe > > context=Context({ > >        &#x

django 0.96 cancel template render automatically escape?

2009-01-12 Thread frank Shi
how do cancel django 0.96 template render automatically escape? 0.96 after version can use mark_safe() function..etc..,but i can't update new version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: newforms-admin branch has been merged into trunk

2008-07-18 Thread Frank Singleton
Brian Rosner wrote: > I have just recently merged the newforms-admin branch into trunk as of > r7967 [1]. A BIG Thankyou to all involved !! Cheers / Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

ifequal doesn't like spaces?

2008-10-15 Thread Frank Peterson
I have something like the following {% ifequal flatpage.title "Special Reports" %} http://example.com/icon_specialreports.png"; /> {% endifequal %} I get the error 'ifequal' takes two arguments so it doesn't like the fact that "Special Reports" has a space in it. Is there a way around t

Parsing through feed to get to enclosure data?

2008-10-16 Thread Frank Peterson
I have a RSS feed and I need to be able to get to the enclosure data out of it. Our code loads libRSS, here is what I have so far and its not working {% for itm in rss.items %} {{itm.description}} FLV {% endfor %} Here is what my feed l

Determine subclass of object in models.Model

2009-02-07 Thread Frank Becker
'fnord'): ... print "bar" ... bar So, even if that might not be possible considering the SQL-DB behind the ORM: What is the best way to determine the sub class? Thanks, Frank --~--~-~--~~~---~--~~ You received this message because y

Re: Determine subclass of object in models.Model

2009-02-07 Thread Frank Becker
2009/2/7 Frank Becker : Hi, > My question: I have a CommonInfo(models.Model) and I do subclassing it for a > couple of models. Getting CommonInfo.objects.all() returns a list of all > objects of CommonInfo and it's subclasses. Q: How to determine what subclass > the > obj

Re: Building a Django Blog: Change month "feb" to "02" in URL

2009-02-11 Thread Frank Becker
its respective number. [...] Search for month_format e. g. on: http://www.djangobook.com/en/1.0/appendixD/ assuming you are using generic views. hth, Frank -- Frank Becker (smtp|jabber) GnuPG: 0xADC29ECD | F01B 5E9C 1D09 981B 5B40 50D3 C80F 7459 ADC2 9ECD SILC-Net: a8 | Home: http://www.

Re: problem with django-voting

2009-03-14 Thread Frank Wiles
> > If I remove this line everything is fine. I wasn't getting this error > before but I had to wipe my server and create a new db. Anyone know > why this is happening? Just a guess, but it sounds like you're assuming there will be data in the table somewhere in your code. Try a

Re: Strategy for extending DB tables with additional columns

2009-03-19 Thread Frank Wiles
7;t expect to see any serious performance issues with your plan. Assuming given adequate hardware. Sure it would be an issue if you have 100k users and are running this on a 5 year old laptop, but that isn't a good reason to not build the software properly. -

Re: Editing base_site.html

2009-03-19 Thread Frank Wiles
version into your own template directory, maintaining the nested structure ( i.e. admin/base_site.html ) and editing it to suit your needs. Hope that helps! -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.com | (800) 647-6298 --~--~-~--~~~---~

About django.root

2009-06-28 Thread Frank Abel
Hi all, I'm using mod_python and have "PythonOption django.root" set. My question is, how can I access that var (my site deploy path prefix) so in case that my app change of location all URLs that my app generate ("get_absolute_url" models method, etc.) have the new loc

Re: Scientific Data Frontend with Django

2009-08-03 Thread Frank Stüss
time and thus memory is cleared. I have been keeping up django data viewing for several month now without any problems. Maybe you have to take this into account if you want to use matplotlib. And maybe this is not true anymore with the newest version of it. Have fun. Frank Markus Becker sc

Re: Table with search results and returning to previous page.

2009-08-30 Thread Frank Wiles
er other args to your search view you need, when redirecting to your search page. -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.com | (800) 647-6298 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Help with admin inlines

2009-08-30 Thread Frank Wiles
ister(Manufacturer, ManufacturerAdmin) You need to import the Manufacturer model in your admin.py -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.com | (800) 647-6298 --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: NetBeans IDE for Python

2009-04-14 Thread Frank Liu
python or javascript (funny the whole thing is firefox based). The only thing is it's somewhat slow to start compare to my previously fav gvim. But i guess it's worth it. Frank On Apr 14, 6:51 pm, Victor Hooi wrote: > heya, > > I'm still a bit confused as to how to setup D

IFEQUAL takes two arguments error on Django 0.91

2009-06-10 Thread Frank Peterson
I'm on Django 0.91 (unfortunately we are stuck with that and cannot upgrade). We have a variable - object.caption and lets say that it equals "Bling: whatever" (without the quotes) I am doing a hack in the templates (dont have access to anything else, and need to output "IT WORKED!" (without the

stringformat to get first 3 characters?

2009-06-11 Thread Frank Peterson
I need to use the stringformat filter on a variable in a template but I just want it to grab the first 3 characters of the variable. {{ object.caption|lower|truncatewords:"1"|stringformat:"3s" }} Doesnt seem to work. --~--~-~--~~~---~--~~ You received this message

Re: Help with installing MySQLdb package for Django on OS X Snow Leopard

2009-12-02 Thread Frank DiRocco
IMHO, source forge is a little wack these days. The UI is kinda convoluted, it took me a little digging before I found the file too :] -Frank On Dec 2, 2009, at 7:18 AM, James Dekker wrote: > Daniel, > > Under the Files tab, the only ones that are available are for Linux > not

Re: Inlineformset_factory and User model

2009-12-02 Thread Frank DiRocco
ot;) if request.method == "POST": formset = BookFormSet(request.POST) if formset.is_valid(): formset.save() return HttpResponseRedirect('books/latest.html') I'm a n3wb so, I'm fishing to

Re: missing template for login page

2009-12-02 Thread Frank DiRocco
I'm very interested in this as well. I wrote almost all the forms and logic to do what this module already does :/ I should lrn2RTFM! but that's been an uphill battle for many ppl ;) On Dec 2, 2009, at 8:48 AM, Andreas Kuntzagk wrote: > Hi, > > I try to get user authentication working. I follo

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Frank DiRocco
How about trying to look at whats available for django... mine says this >>> import django >>> dir(django) ['VERSION', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'conf', 'contrib', 'core', 'db', 'dispatch', 'forms', 'get_version', 'http', 'middleware', 'sho

Re: Browsing Django modules from interactive python shell

2009-12-02 Thread Frank DiRocco
e__', '__path__', 'cache', 'exceptions', 'files', 'management', 'signals', 'urlresolvers'] Thnx Bill for that info :] On Dec 2, 2009, at 11:37 AM, Kenny Meyer wrote: > On Wed, 2 Dec 2009 11:19:41 -0500

Re: Returning Django objects from Ajax request

2009-12-02 Thread Frank DiRocco
I'm not so sure that a django question as much as it is a Python question... http://docs.python.org/library/json.html On Dec 2, 2009, at 2:01 PM, jul wrote: > I'm using jQuery post: > > $.post("/getRestaurant/", location, > function(data) { > /* stuff */ > }); >

Re: Timer in Django

2009-12-03 Thread Frank DiRocco
Why use a timer, what about storing time in a "taken_time" column in your model, then subtract expiration time from current and check if this number is grater than the "Taken time" timestamp In the view the gets ready to render a browsable object, just do the same time difference hickamajig

Re: Custom Authentication Backend

2009-12-03 Thread Frank DiRocco
Or you could hack/port the library Peter spoke of earlier and add the functionality you are looking for :] but how would you admin it, and i bet alot would break at first sight. On Dec 3, 2009, at 4:33 PM, Peter Herndon wrote: > > On Dec 3, 2009, at 3:29 PM, bfrederi wrote: > >> I'm not looki

Re: How to use CommaSeperatedIntegerList with CheckboxSelectMultiple

2010-05-29 Thread Jannon Frank
Don't know if you're still interested, Ben, But I just came across this as I was searching for the best place to tell someone how the django CommaSeparatedIntegerField(CSIF) should be changed. I was basically trying to do the same thing you were. After, taking a look at the django code, I found t

Re: Model Issue - wont let me name it follower or followee

2010-06-03 Thread Frank Wiles
ytime you have two ForeignKeys to the same model. Hope that helps! -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.com | (800) 647-6298 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Something like admin.StackedInline where 'extra'

2010-06-03 Thread Frank Wiles
tackedInline where 'extra' would be a > number of travelers. Any idea? Look into inline formsets: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets This is what you're wanting. -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.c

Re: Database error: Table 'test_XXX.django_content_type' doesn't exist

2010-10-28 Thread Frank Wiles
ng for you) you'll find that the table 'django_content_type' does indeed not exist. Possibly because you don't have 'django.contrib.contenttypes' in INSTALLED_APPS. -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.com   | (800) 647-6298 -- You re

Re: Using localflavor with admin?

2010-10-28 Thread Frank Wiles
o: from django.db import models from django.contrib.localflavor.us.models import PhoneNumberField class Test(models.Model): phone = PhoneNumberField() You'd obviously need to reference the exact field you're looking for, but then it just automagically works in the admin. -- Frank Wiles Revolution Sy

Re: admin usage

2010-10-29 Thread Frank Wiles
be using the interface many times per day I don't use the admin. Don't get me wrong, the admin is great, but it isn't ideal for many repetitive tasks. -- Frank Wiles Revolution Systems | http://www.revsys.com/ fr...@revsys.com   | (800) 647-6298 -- You received this message because

Re: Apache config. admin page displays without stylesheets

2010-11-01 Thread Frank Wiles
_wsgi and not mod_python as that mod_python project is no longer actively maintained. What you need to do is add a directive for your media locations such that Apache can find these files, or more correctly that Apache believes it is authorized to serve those files. Watch your Apache error lo

Re: Is mod_wsgi web application container?

2010-11-01 Thread Frank Wiles
exactly but..) > Could I use mod_wsgi as web application container? > > Sorry for poor English. > anyway thank you :) It's not called a 'web application container', as that is a Java term, but yes you can think of it that way. In general, mod_wsgi is definitely the to

Re: error using memcache and filter()

2010-01-06 Thread Frank DiRocco
'yam, I have not seen this error, but my responses to the error are inline. On Jan 6, 2010, at 6:30 AM, Subramanyam wrote: File "/home/bvemu/lib/python2.6/site-packages/django/core/cache/ backends/memcached.py", line 37, in set self._cache.set(smart_str(key), value, timeout or self.default_

Re: handle astronomically high number of users via the new BigIntegerField and contrib.auth.user

2010-01-10 Thread Frank DiRocco
I assume you could checksum some form of the user's object or "cleaned" form values and store it as unique attribute of the users. You would prolly have to override the clean method and add in valudation of the uniqueness and generate using an alternate method if the first does not validate

Re: RV: photos sexy

2010-02-26 Thread Frank DiRocco
I was kinda in the mood for Raven ;) On Feb 26, 2010, at 12:10 PM, Gisela Cartaya wrote: My apologize for all, this has been a big mistake error, this is a technical mailing list I ask to the administrator to delete from archive that email as soon as possible. Thanks Greetings. De: Nicolas

Re: get subversion revision-number in a django-project

2007-06-18 Thread Frank Tegtmeyer
that tracks the revision for use in the source code everytime you check something in. You have to explicitely enable keyword replacement in svn. Regards, Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: Generating graphs from db data and displaying results using Django?

2007-07-12 Thread Frank Tegtmeyer
27;t it be possible to adapt ZSVG_Graph to Django? Link: http://www.zope.org/Members/aho/ZSVG_Graph Regards, Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Generating graphs from db data and displaying results using Django?

2007-07-13 Thread Frank Tegtmeyer
an additional "simple" interface (if it is not already there, I didn't have a look at your package yet). Something like Tex and LaTeX, the one for total control, the other for common tasks. Regards, Frank --~--~-~--~~~---~--~~ You received this mess

DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-03 Thread Frank Singleton
Hi, fedora 7 django 0.96 DATABASE_ENGINE = 'sqlite3' maybe its late but DateField is causing me some grief when trying to load some test data from the command line (ie: not via admin web). in model test_date = models.DateField() in another python script (run on command line ) that imports t

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-08 Thread Frank Singleton
line read from a file, with the date in a field position specified by MY_DATE eg: mydate = datetime.date(*time.strptime(inputdata[MY_DATE], '%Y-%m-%d')[:3]) I'll take some stronger tea next time !! /Frank --~--~-~--~~~---~--~~ You received this me

Re: DateField() , AttributeError: 'str' object has no attribute 'strftime'

2007-08-08 Thread Frank Singleton
po on my part ;-) yes this works !! mydate = datetime.date(*time.strptime(inputdata[MY_DATE], '%Y-%m-%d')[:3]) Cheers. /Frank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Seeking Django Developers USA (several projects and maintenance)

2007-08-16 Thread Frank Moten
Must have experience installing, configuring python, etc... contact [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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@googlegr

Re: Application parameters

2007-02-15 Thread Frank Tegtmeyer
Malcolm Tredinnick <[EMAIL PROTECTED]> writes: > You can pass whatever extra arguments you like to views as the optional > third argument in the urlpatterns tuples Ahh thanks. That was the missing piece in the puzzle. Regards, Frank --~--~-~--~~~---~

login_required decorator

2007-02-19 Thread Frank Tegtmeyer
Hi, is there any reason that the login_required decorator doesn't have the login_url parameter? The other decorators have it. Besides me there seem to be also other people who need this parameter (see the comments to the auth docs page). Regards,

Re: unicode in filters

2007-02-19 Thread Frank Tegtmeyer
"omat * gezgin.com" <[EMAIL PROTECTED]> writes: > I couldn't figure out which encoding declaration does the message is > talking about. This means the encoding of your Python source file itself. There is a PEP about this: http://www.python.org/dev/pep

Re: login_required decorator

2007-02-20 Thread Frank Tegtmeyer
est) is what I need. Regards, Frank --~--~-~--~~~---~--~~ 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

Re: Django keeps growing, performance keeps dropping

2007-03-07 Thread Frank Tegtmeyer
Such things are the reason for bad performance in many applications. Selections should be performed inside the database. That's one thing that databases are for. That means you should have a topic table or an attribute in your model and use filters then. Regards, Frank --~--~-~--~---

Re: Blocking IP with middleware?

2007-03-21 Thread Frank Tegtmeyer
ication deal with this? Regards, Frank --~--~-~--~~~---~--~~ 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, sen

Re: Database exception handling please

2007-03-22 Thread Frank Tegtmeyer
en. Try without the try/except clause and look which exception occurs. Regards, Frank --~--~-~--~~~---~--~~ 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@g

MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Frank Tegtmeyer
| || ... Questions: 1. Why is the default value in the database not set to 0? 2. Why does the generic view not use the default value when inserting blank values? Instead data with a wrong type (string) is used. 3. How can I work around the situation (suppress warnin

Re: MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Frank Tegtmeyer
s. I assume pre_save would be the right place to do this. I also saw in releasenotes for 0.95 that save() can be overridden, but I have no clue what to do in this function. Can you point me somewhere to look for a solution? Regards, Frank --~--~-~--~~~---~--~~ You re

Re: MySQL-problem with NULL values (svn rev. 4788)

2007-03-23 Thread Frank Tegtmeyer
Malcolm Tredinnick <[EMAIL PROTECTED]> writes: > http://www.djangoproject.com/documentation/model-api/#overriding-default-model-methods > . Found it two minutes before :) Many thanks! Regards, Frank --~--~-~--~~~---~--~~ You received this message

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

2007-03-25 Thread frank h.
> If I wanted to create commercial quality hosted software, would django > be the best solution? it depends! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: newbie - deploy error

2007-03-27 Thread Frank Rocco
Can't I have a deploy like ASP or PHP apps that use the same port and use a different directory for each app? Thanks Frank On Mar 27, 2007, at 5:30 PM, risomt wrote: > > You have both virtual hosts connecting on the same port - switch > mysite3 to something like :8081 and

how do I install MySqldb on mac?

2007-04-05 Thread Frank Rocco
Hello, I just installed django on my mac, but cannot get mysqldb installed. I have mysql running from mamp. What do I need to do to install this? Regards, Frank Rocco [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are

Re: how do I install MySqldb on mac?

2007-04-05 Thread Frank Rocco
I downloaded mysql from mysql.com this is the error I get. Mysql is running ok. frank-roccos-computer:~/MySQL-python-1.2.2 farocco$ sudo python setup.py installsh: line 1: mysql_config: command not found Traceback (most recent call last): File "setup.py", line 16, in ? metadat

Can you add a variable to a block?

2007-04-20 Thread Frank Peterson
{% block {{story.title}} %}{% endblock %} Maybe my question should be can i add a varible inside {% %} ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

How do I Sort Years in Template

2007-05-01 Thread Frank Peterson
Story archive {% for date in date_list %} {{ date.year }} {% endfor %} Not sure how to do this --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

list_display with multiple url in admin , select item to change

2007-05-03 Thread Frank Singleton
perlink you get for free), but I would also like foreignkeyref to be a hyperlink also in the 2nd column. I would like them both to appear as hyperlinks and not just foreignkey as text, when you visit the admin "select item to change" page. Cheers / Frank --~--~-~--~~---

Re: list_display with multiple url in admin , select item to change

2007-05-03 Thread Frank Singleton
Frank Singleton wrote: > Hi, > > Is it possible to embed hyperlinks in the list_display list for model ok read this in the docs.. If the string given is a method of the model, Django will HTML-escape the output by default. If you’d rather not escape the output of the method, give t

Re: Securing static files

2007-05-21 Thread Frank Tegtmeyer
I/O on the Django site. lighttpd includes two modules to handle such situations (mod_trigger_b4_dl and mod_secdownload). With Apache I did this using a solution with mod_rewrite and an external rewriting program (checking a time limited permission in the database

  1   2   3   >