Re: ModelForm values.

2009-01-20 Thread tom.s.macken...@gmail.com
Should I override/overload the init function in my ApprovalForm class? Am I misusing the ModelForm constructor? On Jan 19, 2:27 pm, "tom.s.macken...@gmail.com" wrote: > I want to create a form based on a model and inject data into it > manually. See below for implementation. &g

ModelForm values.

2009-01-19 Thread tom.s.macken...@gmail.com
I want to create a form based on a model and inject data into it manually. See below for implementation. class Approval(models.Model): company = models.ForeignKey(Company) product = models.ForeignKey(Product) approval_type = models.ForeignKey(Approval_Type, help_text='How

Re: Form Media

2009-01-03 Thread tom.s.macken...@gmail.com
I dont believe I missed this... It wasnt showing because the browser was interpreting it as a html tag.. haha. nm. On Jan 3, 11:52 am, "tom.s.macken...@gmail.com" wrote: > Hello, > > I am trying incorporateFormMediain my forms and I'm having some > trouble interpret

Form Media

2009-01-03 Thread tom.s.macken...@gmail.com
Hello, I am trying incorporate Form Media in my forms and I'm having some trouble interpreting how this is done via, http://docs.djangoproject.com/en/dev/topics/forms/media/ My goal is to use the admin/media/css/form.css in my template. Here is my form: class ApprovalForm(ModelForm): clas

Re: Serving Static Pages with Dev server.

2008-12-23 Thread tom.s.macken...@gmail.com
Thanks Rajesh! it works! On Dec 23, 10:47 am, Rajesh Dhawan wrote: > On Dec 23, 10:38 am, "tom.s.macken...@gmail.com" > > > > wrote: > > Hello, > > > I am having some trouble serving static files with the development > > server. I have read th

Re: Serving Static Pages with Dev server.

2008-12-23 Thread tom.s.macken...@gmail.com
Sorry... ADMIN_MEDIA_PREFIX=/media/admin/ On Dec 23, 9:38 am, "tom.s.macken...@gmail.com" wrote: > Hello, > > I am having some trouble serving static files with the development > server. I have read the docs and various blogs out there and nothing > seems to work.

Serving Static Pages with Dev server.

2008-12-23 Thread tom.s.macken...@gmail.com
Hello, I am having some trouble serving static files with the development server. I have read the docs and various blogs out there and nothing seems to work. I am going nuts over this :) I have tried tweaking the values in my settings.py but I reverted them back to their defaults. Below is the in

Re: user.username not resoving in templates.

2008-11-11 Thread tom.s.macken...@gmail.com
Works!! thanks. I added the following into my view. from django.template import RequestContext Then used the render_to_response optional third arg. Much appreciated! On Nov 11, 4:30 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > no. i will give that a try. > > On Nov 11, 2:54 pm, "Alex Ko

Re: user.username not resoving in templates.

2008-11-11 Thread tom.s.macken...@gmail.com
no. i will give that a try. On Nov 11, 2:54 pm, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > Do you use RequestContext [1] in your views? > > [1]:http://docs.djangoproject.com/en/dev/ref/templates/api/#id1 > > On Tue, Nov 11, 2008 at 23:43, [EMAIL PROTECTED] < > > [EMAIL PROTECTED]> wrote: > > >

user.username not resoving in templates.

2008-11-11 Thread tom.s.macken...@gmail.com
Hello, I am having issues acquiring the user context from templates other than the template I specify with the following in my urls.py (r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'foods/login.html'}), I use the following in my base.html to display the username once a user