Anyone have any suggestions on this. I've tried all recommendations
and still getting same Template errors
On Aug 27, 7:17 pm, nixon66 wrote:
> Still getting the same errors.
>
> On Aug 27, 7:10 pm, Javier Guerra wrote:
>
> > On Thu, Aug 27, 2009 at
Still getting the same errors.
On Aug 27, 7:10 pm, Javier Guerra wrote:
> On Thu, Aug 27, 2009 at 2:03 PM, nixon66 wrote:
> > register.filter(uscurrency)
>
> should be
>
> register.filter ('uscurrency', uscurrency)
>
> --
> Javier
--~--~-~-
The file is mytag.py and the directory is now called templatetags
On Aug 27, 4:42 pm, Daniel Roseman wrote:
> On Aug 27, 8:03 pm, nixon66 wrote:
>
> > I've just created a template tag as described in the documents, but
> > keep getting errors.
>
> > In an ins
Made the changes and still getting the same error.
On Aug 27, 3:11 pm, Javier Guerra wrote:
> i only see a couple of minimal typos, could be your problem:
>
> > In an installed app I created a directory called Templatetags. I
>
> should be 'templatetags', no capitalization.
>
> > created a blan
I've just created a template tag as described in the documents, but
keep getting errors.
In an installed app I created a directory called Templatetags. I
created a blank __init__.py file and a file called mytag. Mytag has a
function
from django import template
register template.Library()
def u
problem solved. Type
On Jul 26, 10:05 pm, nixon66 wrote:
> ran into this error. Anyone familiar with it.
>
> TemplateSyntaxError at /lobby/lobbytype/public-relations/
>
> Caught an exception while rendering: Error binding parameter 0 -
> probably unsupported type.
>
>
ran into this error. Anyone familiar with it.
TemplateSyntaxError at /lobby/lobbytype/public-relations/
Caught an exception while rendering: Error binding parameter 0 -
probably unsupported type.
Original Traceback (most recent call last):
File "C:\Python25\lib\site-packages\django\template\d
Problem solved!!!
On Jul 10, 5:41 pm, nixon66 wrote:
> Getting errors when I try to render a template. Django indicates that
> it is a problem in the template and tells me that there is no such
> column as "aid.id". There is no column called ID in either my
> templa
Getting errors when I try to render a template. Django indicates that
it is a problem in the template and tells me that there is no such
column as "aid.id". There is no column called ID in either my
template, view or model. Any suggestions. I've included the error,
template, my view and model belo
:
> On Jun 29, 11:13 am, nixon66 wrote:
>
> > Steve,
>
> > The is a __init__.py
>
> Ok, you need to provide a little more detail then. Can you tell us
> what your subdirectory structure looks like, and have you put
> __init__.py's in enclosing folders?
>
>
This is an __init__.py in the folder
On Jun 29, 2:08 pm, Alex Gaynor wrote:
> On Mon, Jun 29, 2009 at 1:05 PM, nixon66 wrote:
>
> > I'm getting an error no module name x. I've create all the
> > directories and I can see them, but I keep getting this error and
&
Steve,
The is a __init__.py
On Jun 29, 2:09 pm, Steve Howell wrote:
> On Jun 29, 11:05 am, nixon66 wrote:
>
> > I'm getting an error no module name x. I've create all the
> > directories and I can see them, but I keep getting this error and
> > can
This is an _init__.py in the folder
On Jun 29, 2:08 pm, Alex Gaynor wrote:
> On Mon, Jun 29, 2009 at 1:05 PM, nixon66 wrote:
>
> > I'm getting an error no module name x. I've create all the
> > directories and I can see them, but I keep getting this error and
&
I'm getting an error no module name x. I've create all the
directories and I can see them, but I keep getting this error and
can't understand why. Any ideas. Not sure why this is happening since
it did not happen when I've created other apps.
--~--~-~--~~~---~--~---
I have several database that I want to use in a project and my
question is should I put the all the database tables in one database
so its easier for the settings.py file or should each database be
separate. I'm using Mysql as a backend. So I would create one database
called projects with everythi
That's what I was thinking, so my question is can I do this?
def search_detail(request):
if 'q' in request.GET:
q = request.GET['q']
search_results = Activity.objects.filter
(country__country__icontains=q)
firm_search = Activity.objects.filter
(firm__firm__icontains=q
Oop, should be can you have more than one search results in a view for
a search form.
On Apr 16, 12:54 pm, nixon66 wrote:
> I have the view below and wonder if its possible to add other search
> results into the view or would I need to write seperate ones. Ideally,
> I'
I have the view below and wonder if its possible to add other search
results into the view or would I need to write seperate ones. Ideally,
I'd like to have
firm_search = Activity.objects.filter(firm__firms__icontains=q)
client_search= Activity.objects.filter(clients__client__icontains=q)
Would
Alex,
Thanks
Ron
On Apr 14, 11:22 am, Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 11:19 AM, nixon66 wrote:
>
> > Alex,
>
> > Ok, I'm going to ram my head into a wall now. Seriously thanks.
>
> > On Apr 14, 11:03 am, Alex Gaynor wrote:
> > > On T
Alex,
Ok, I'm going to ram my head into a wall now. Seriously thanks.
On Apr 14, 11:03 am, Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 11:01 AM, nixon66 wrote:
>
> > I have this model with an get_absolute_url method.
>
> > class Country(models.Model):
> >
I have this model with an get_absolute_url method.
class Country(models.Model):
country_cd = models.CharField(max_length=2, primary_key=True)
country = models.CharField(max_length=80, blank=True)
slug = models.CharField(max_length=80, blank=True)
class Meta:
db_table =
Forgot to add the view I'm using.
def country_detail(request, country):
c = Country.objects.get(slug=country)
lobbyists = Activity.objects.filter(country=c)
return render_to_response('country/country_detail.html',
{'country':c,
'lobbyists':lobbyists})
--~--~-~--~~
lobbyists':lobbyists})
On Apr 11, 9:56 pm, nixon66 wrote:
> I have a legacy database that I used inspectdb to create the models.
> I cleaned up the models, set primary keys, foriegn keys etc. But when
> I tried to create a view I get an "unknown column activity.fp_id_id
> in
I have a legacy database that I used inspectdb to create the models.
I cleaned up the models, set primary keys, foriegn keys etc. But when
I tried to create a view I get an "unknown column activity.fp_id_id
in field list". I'm not sure why its appending an extra id to the end
of a foriegnkey fie
The meta option is already there. And the myproject_country table is
still created.
On Apr 10, 4:51 pm, Ramiro Morales wrote:
> On Fri, Apr 10, 2009 at 5:29 PM, nixon66 wrote:
>
> > I have a legacy database that I used inspectdb on to generate models.
> > Once I genera
I have a legacy database that I used inspectdb on to generate models.
Once I generated the models and cleaned them up, I ran manage.py
syncdb. Everything went fine except I have one model that it creates
another table from with the name of the app attached to the front. So
the model is called coun
Anyone have a good example of using a pull down menu in a Django
template. I've just finished working through search forms, but
couldn't find any examples of a pull down menu. Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscri
I just redid my models in an application and ran "manage.py
runserver". But when I tried to log into the admin interface I get
model is alreadyregistered errors. Anyone have suggestions on how
to fix this?
--~--~-~--~~~---~--~~
You received this message because
Thanks
On Mar 11, 11:36 pm, Alex Gaynor wrote:
> On Wed, Mar 11, 2009 at 10:34 PM, nixon66 wrote:
>
> > Here is the view, which works fine. Trying to write another that's
> > similar but wanted to try out in shell first.
>
> > def county_detail(request, county
etail.html',{'county':c,
'Vendors': Vendors})
On Mar 11, 11:28 pm, Alex Gaynor wrote:
> On Wed, Mar 11, 2009 at 10:26 PM, nixon66 wrote:
>
> > Trying to test out something in the interactive shell as I write a
> > view.
>
> > Tried this:
>
>
Trying to test out something in the interactive shell as I write a
view.
Tried this:
f = Country.objects.get(slug=county)
I'm getting a nameError saying name: "country" is not defined. I've
imported the models so country should be there. I know there is
something simple I'm missing just can't f
Will give it a shot.
On Mar 11, 12:13 am, Malcolm Tredinnick
wrote:
> On Tue, 2009-03-10 at 21:10 -0700, nixon66 wrote:
> > I'm trying to filter information for a page by year and can't seem to
> > get the view to work correctly. The view below should get the list of
I'm trying to filter information for a page by year and can't seem to
get the view to work correctly. The view below should get the list of
counties and years so that I can show detailed information for vendors
by year. The url seems to work but I get a page without vendor data.
Could anyone point
Malcolm,
Thanks. Will give it a shot.
On Feb 22, 7:05 pm, Malcolm Tredinnick
wrote:
> On Sun, 2009-02-22 at 15:18 -0800, nixon66 wrote:
> > not sure I'm understanding how get_absolute_url to work.
>
> > in my model I created this
>
> > class S
not sure I'm understanding how get_absolute_url to work.
in my model I created this
class State(models.Model):
name = models.CharField(max_length=80)
slug = models.CharField(max_length=80)
def __unicode__(self):
return self.name
def get_absolute_url(self):
ret
I have a a list that I generate using this code in a template:
{% extends "base.html" %}
{% block title %}Lobbyist by Country {% endblock %}
{% block content %}
Browse by County
Click on one of the items below to get information about the firms
{% for county in county_list %}
{{ coun
Alex,
Once again sir you have shown me the light. Thank you.
On Feb 20, 7:59 pm, Alex Gaynor wrote:
> On Fri, Feb 20, 2009 at 7:58 PM, nixon66 wrote:
>
> > tried
>
> > Place.objects.values_list('county', flat=true).distinct()
>
> > Now its not return
tried
Place.objects.values_list('county', flat=true).distinct()
Now its not returning any values.
On Feb 20, 7:49 pm, Alex Gaynor wrote:
> On Fri, Feb 20, 2009 at 7:46 PM, nixon66 wrote:
>
> > I'm using this in a template to get a list of items in the list.
>
I'm using this in a template to get a list of items in the list.
{% for item in list %}
{{ item.var }}
{% endfor %}
The problem is that I get duplicate values when I do this. So if var1
appears in my database more than once, I get it as many times as it
appears. I looked at using the disti
Alex,
Thanks
Ron
On Feb 20, 2:37 pm, Alex Gaynor wrote:
> On Fri, Feb 20, 2009 at 2:34 PM, nixon66 wrote:
>
> > eleom,
>
> > Thanks for the catch with country county in my model.
>
> > On Feb 20, 2:22 pm, eleom wrote:
> > > Well, as the error message s
lient='G corp',
> city = 'Walla Walla', county='blah blah', dollar_amount =54000)
>
> where c is the County object defined before.
>
> P.S. By the way, you mix 'County' and 'Country' in your example.
>
> On Feb 20, 8:06 pm, nixon6
=54000)
>
> instead of
>
> l = Company(name='xyz corp', address='56 b. street', client='G corp',
> city = 'Walla Walla', county='blah blah', dollar_amount =54000)
>
> where c is the County object defined before.
>
> P
If this is the wrong list to post a newbie question please let me
know. I'm getting an error message while trying to populate the tables
created by the models and not sure why. Here are the models
from django.db import models
class County(models.Model):
name = models.CharField(max_length=80)
43 matches
Mail list logo