Anyone have any suggestions on this. I've tried all recommendations
and still getting same Template errors
On Aug 27, 7:17 pm, nixon66 <nixon@gmail.com> wrote:
> Still getting the same errors.
>
> On Aug 27, 7:10 pm, Javier Guerra <jav...@guerrag.com> wrote:
>
>
Still getting the same errors.
On Aug 27, 7:10 pm, Javier Guerra <jav...@guerrag.com> wrote:
> On Thu, Aug 27, 2009 at 2:03 PM, nixon66<nixon@gmail.com> wrote:
> > register.filter(uscurrency)
>
> should be
>
> register.filter ('uscurre
The file is mytag.py and the directory is now called templatetags
On Aug 27, 4:42 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Aug 27, 8:03 pm, nixon66 <nixon@gmail.com> wrote:
>
> > I've just created a template tag as described in the documents, but
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.
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
problem solved. Type
On Jul 26, 10:05 pm, nixon66 <nixon@gmail.com> wrote:
> ran into this error. Anyone familiar with it.
>
> TemplateSyntaxError at /lobby/lobbytype/public-relations/
>
> Caught an exception while rendering: Error binding parameter 0 -
> p
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
Problem solved!!!
On Jul 10, 5:41 pm, nixon66 <nixon@gmail.com> 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 e
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
ll <showel...@yahoo.com> wrote:
> On Jun 29, 11:13 am, nixon66 <nixon@gmail.com> 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
This is an __init__.py in the folder
On Jun 29, 2:08 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Mon, Jun 29, 2009 at 1:05 PM, nixon66 <nixon@gmail.com> wrote:
>
> > I'm getting an error no module name x. I've create all the
> > directories and I ca
Steve,
The is a __init__.py
On Jun 29, 2:09 pm, Steve Howell <showel...@yahoo.com> wrote:
> On Jun 29, 11:05 am, nixon66 <nixon@gmail.com> wrote:
>
> > I'm getting an error no module name x. I've create all the
> > directories and I can see them,
This is an _init__.py in the folder
On Jun 29, 2:08 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Mon, Jun 29, 2009 at 1:05 PM, nixon66 <nixon@gmail.com> wrote:
>
> > I'm getting an error no module name x. I've create all the
> > directories and I ca
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
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
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 <nixon@gmail.com> 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. Id
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 <alex.gay...@gmail.com> wrote:
> On Tue, Apr 14, 2009 at 11:19 AM, nixon66 <nixon@gmail.com> wrote:
>
> > Alex,
>
> > Ok, I'm going to ram my head into a wall now. Seriously thanks.
>
> >
Alex,
Ok, I'm going to ram my head into a wall now. Seriously thanks.
On Apr 14, 11:03 am, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Tue, Apr 14, 2009 at 11:01 AM, nixon66 <nixon@gmail.com> wrote:
>
> > I have this model with an get_absolute_url met
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})
11, 9:56 pm, nixon66 <nixon@gmail.com> 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 field
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
The meta option is already there. And the myproject_country table is
still created.
On Apr 10, 4:51 pm, Ramiro Morales <cra...@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 5:29 PM, nixon66 <nixon@gmail.com> wrote:
>
> > I have a legacy database that I used inspect
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
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
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
Thanks
On Mar 11, 11:36 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Wed, Mar 11, 2009 at 10:34 PM, nixon66 <nixon@gmail.com> wrote:
>
> > Here is the view, which works fine. Trying to write another that's
> > similar but wanted to try out in shell
Will give it a shot.
On Mar 11, 12:13 am, Malcolm Tredinnick <malc...@pointy-stick.com>
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 belo
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
Malcolm,
Thanks. Will give it a shot.
On Feb 22, 7:05 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
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
>
&
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):
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 %}
{{
Alex,
Once again sir you have shown me the light. Thank you.
On Feb 20, 7:59 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Fri, Feb 20, 2009 at 7:58 PM, nixon66 <nixon@gmail.com> wrote:
>
> > tried
>
> > Place.objects.values_list('county', fl
tried
Place.objects.values_list('county', flat=true).distinct()
Now its not returning any values.
On Feb 20, 7:49 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Fri, Feb 20, 2009 at 7:46 PM, nixon66 <nixon@gmail.com> wrote:
>
> > I'm using this in a templat
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
Alex,
Thanks
Ron
On Feb 20, 2:37 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> On Fri, Feb 20, 2009 at 2:34 PM, nixon66 <nixon@gmail.com> wrote:
>
> > eleom,
>
> > Thanks for the catch with country county in my model.
>
> > On Feb 20, 2:2
ounty='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, nixon66 <nixon@gmail.com> wrote:
>
> > If this is the wrong list to post a ne
nstead 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.S. By the way, you mix 'County' and 'Country' in your example.
>
>
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 =
41 matches
Mail list logo