Re: verbose field names in admin

2010-03-03 Thread Adam Yee
l help (ie. some example code of how you are actually doing this), and the more likely you are to get help. Adam On Mar 1, 4:12 pm, pixelcowboy wrote: > Im not trying to change the verbose name for the model class, but for > individual fields in the model, by the way. > > On Mar 1, 2:

Re: verbose field names in admin

2010-03-01 Thread Adam Yee
When in doubt, always refer to the docs - http://docs.djangoproject.com/en/dev/ref/models/options/ There may be something small overlooked. You shouldn't have to re-sync the database to use verbose_name. It's just a hook to be used for example, in the model's meta options. Give us more detail a

Can't explain this ImportError

2010-02-24 Thread Adam Yee
Just started using haystack. I've created an extended search form of SearchForm and have it located at /mysite/search/search_forms.py The import error happens in haystack.urls Traceback: File "/home/adam/stldata-djangosvn-2.6/lib/python2.6/site-packages/ django/core/handlers/base.py" in get_resp

Re: Template links when Django not domain root

2009-07-31 Thread Adam Yee
On Jul 30, 7:29 pm, Graham Dumpleton wrote: > If you are using mod_wsgi then you definitely do not need > FORCE_SCRIPT_NAME as mod_wsgi does the correct think in respect of > setting up SCRIPT_NAME/PATH_INFO. The only time it might not be right > with mod_wsgi is if you used WSGIScriptAliasMatch

Re: Submitting a form

2009-07-29 Thread Adam Yee
Use the model's verbose field name http://docs.djangoproject.com/en/dev/topics/db/models/#id2 On Jul 29, 3:55 pm, When ideas fail wrote: > Is there a way i can change the label for a field in the model form? > > On 29 July, 21:44, When ideas fail wrote: > > > > > Ok thanks seems to work now. >

Re: Dynamic Form - polls

2009-04-19 Thread Adam Yee
On Apr 18, 3:23 pm, google torp wrote: > Hi. > Normally, what you are doing would work, initializing the form > with request.POST. However the way you have constructed > your form, you need have a poll object as well. Not only that > but it should of cause be the poll that the post data is associ

Dynamic Form - polls

2009-04-18 Thread Adam Yee
I've been struggling with dynamically creating and validating forms. So far I've been able to create the forms using a ModelChoiceField. see below - models, forms, views, template http://dpaste.com/hold/35292/ After submitting the votes, in the if request.method=="POST" hook, I can't figure out

RadioSelect widget not rendering

2009-04-14 Thread Adam Yee
Can't get the forms.RadioSelect widget to render. I'm using svn 10559, I've looked over forms/widgets.py, but I don't know... I'm able to use forms.CheckboxSelect just fine. Is it Firefox giving me issues? What's going on here? #forms.py class PollForm(forms.Form): def make_fields(self, p

Re: Having trouble authenticating/validating

2009-03-26 Thread Adam Yee
On Mar 25, 6:27 pm, Karen Tracey wrote: > On Tue, Mar 24, 2009 at 2:11 PM, Adam Yee wrote: > > So, I now pass the bound form, but still no validation error messages > > show up.  More importantly, is_valid is still returning false even > > when I try logging in as a super

Re: Having trouble authenticating/validating

2009-03-25 Thread Adam Yee
On Mar 23, 8:30 pm, Karen Tracey wrote: > On Mon, Mar 23, 2009 at 4:45 PM, Adam Yee wrote: > > > I'm using Django's builtin AuthenticationForm > > > Here's my login view:http://dpaste.com/18110/ > > > Form submittal (not empty or empty fields) take

Re: Having trouble authenticating/validating

2009-03-24 Thread Adam Yee
On Mar 23, 8:30 pm, Karen Tracey wrote: > On Mon, Mar 23, 2009 at 4:45 PM, Adam Yee wrote: > > > I'm using Django's builtin AuthenticationForm > > > Here's my login view:http://dpaste.com/18110/ > > > Form submittal (not empty or empty fields) take

Having trouble authenticating/validating

2009-03-23 Thread Adam Yee
I'm using Django's builtin AuthenticationForm Here's my login view: http://dpaste.com/18110/ Form submittal (not empty or empty fields) takes me back to the login page with 'Did not login'. My debugging print statement isn't showing up in the terminal, so is_valid is somehow returning false. I

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-03-12 Thread Adam Yee
value response = HttpResponse(t.render(c), mimetype=mimetype) populate_xheaders(request, response, model, getattr(obj, obj._meta.pk.name)) return response > > On Jan 19, 7:17 am, Adam Yee wrote: > > > > > Success.  I added > > > 'script_name'

Re: Recent admin redirect url error?

2009-02-04 Thread Adam Yee
Using Django version 1.1 pre-alpha SVN-9805 On Feb 4, 4:44 pm, Adam Yee wrote: > I'm experiencing Change password / Logout redirect errors while trying > to logout or change the password. > > The 404 messages show below: > Request Method:         GET > Request URL:  

Recent admin redirect url error?

2009-02-04 Thread Adam Yee
I'm experiencing Change password / Logout redirect errors while trying to logout or change the password. The 404 messages show below: Request Method: GET Request URL:http://127.0.0.1/admin/admin/logout/ It's adding in an extra ^admin/ Same for Change password: Request URL:http:/

Re: Strange "problem" with tutorial

2009-02-03 Thread Adam Yee
On Feb 3, 9:49 am, Joshua Russo wrote: > I'm working through the tutorials and have encountered a strange > problem. So far everything works but Python doesn't acknowledge my > base site as a package. So everywhere that you see a reference like > "mysite.poll" I need to use only "poll". I think

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-01-18 Thread Adam Yee
to reiterate what Preston said, please share other solutions. On Jan 18, 8:13 pm, Adam Yee wrote: > On Jan 18, 7:39 am, ptone wrote: > > > > > > > In the tutorial, the form action in the poll_detail template is > > hardcoded to "/polls/..." > > > So th

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-01-18 Thread Adam Yee
gt; > This proobably means a // in the URL if you mount your site at /, but > I think most browsers and servers won't care about that extra / > > I welcome anyone pointing out a better way to make the form action > more "portable" in projects... > > -Preston > &g

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-01-18 Thread Adam Yee
On Jan 18, 3:44 am, Graham Dumpleton wrote: > On Jan 18, 8:46 pm, Adam Yee wrote: > > > > > > > On Jan 17, 8:36 pm, Malcolm Tredinnick > > wrote: > > > > On Jan 18, 2:53 pm, Adam Yee wrote: > > > > > It was a slam dunk for completing th

Re: Deploying Django tutorial part 4, redirecting problem, apache error

2009-01-18 Thread Adam Yee
On Jan 17, 8:36 pm, Malcolm Tredinnick wrote: > On Jan 18, 2:53 pm, Adam Yee wrote: > > > It was a slam dunk for completing the tutorial in the development > > server, but I can't figure out this issue I'm having with the generic > > views while using my apa

Deploying Django tutorial part 4, redirecting problem, apache error

2009-01-17 Thread Adam Yee
It was a slam dunk for completing the tutorial in the development server, but I can't figure out this issue I'm having with the generic views while using my apache server. I'm unable to get the vote view to redirect correctly. My apache error seen here with both urls.py and views.py. The apache

Re: How to obtain an intermediate ManyToMany object?

2009-01-15 Thread Adam Yee
Maybe try a all(), filter(stuff) or get(thing)? lightbox.lightboxphotograph_set.all() Does that yield anything? On Jan 15, 10:51 am, JonUK wrote: > lightbox.lightboxphotograph_set yields: > > TypeError: "'RelatedManager' object is not iterable" > > :( --~--~-~--~~~-

Re: very basic beginners question

2009-01-08 Thread Adam Yee
On Jan 8, 7:49 am, Evan wrote: > This is probably the most basic question in the history of the group. > Still, I googled the error message both in this group and in google at > large and went through the first 5 pages, and didn't see anything. > > i installed django a few weeks ago.  i'm pretty

change/edit list not showing in admin interface

2008-12-03 Thread Adam Yee
Hi, Going through chapter 6 in the djangobook. Using 1.1 SVN-9368. I think this chapter might be missing a step or two, or there's something I'm overlooking. In both the django development server and my apache server I can't seem to show the created models 'Publiser, Author and Books'. All mo

Re: djangobook ch3, can't see the view current_datetime

2008-11-16 Thread Adam Yee
Thanks again. On Nov 16, 6:31 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-11-16 at 17:41 -0800, Adam Yee wrote: > > [...] > > Good debugging info snipped. > > > When enteringhttp://localhost:8080/testproject/timeI'm reading this >

djangobook ch3, can't see the view current_datetime

2008-11-16 Thread Adam Yee
I'm a new user to Django, hi everyone. My system: Windows XP Python 2.5 Apache 2.2 >>configured for mod_wsgi MySQL, MySQLdb #Irrelevant at this point My issue: Having trouble getting the through the first example. Basically, when directing the browser to '.../time/' I'm still at the 'It worke