Hello,
I am using django-tagging and just added a tagging.fields.TagField to
a Model. When running syncdb, everthinks works fine, but
when saving a model-instance I get this error
Error binding parameter 6 - probably unsupported type.
Any idea?
Thanks, Toni
--~--~-~--~~
Yes, I just forgot to import tagging.fields.
Thanks for your help
Toni
On 28 Mai, 08:27, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> On Wed, May 28, 2008 at 1:21 AM, mwebs <[EMAIL PROTECTED]> wrote:
>
> > Hi Alex,
>
> > I was trying to use this, but I got an no-attribute-tag-field-error...
On Wed, May 28, 2008 at 1:21 AM, mwebs <[EMAIL PROTECTED]> wrote:
>
> Hi Alex,
>
> I was trying to use this, but I got an no-attribute-tag-field-error...
> I also tried tagging.TagField() and models.TagField()
>
> Any idea?
Try this, Toni.
At the top of my models file, I have this import:
from
from tagging.fields import TagField
class Post(models.Model):
tags = TagField()
#in your template. For example, object_details
{% load tagging_tags %}
{% tags_for_object object as tag_list %}
{% if tag_list %}
Tags:
{% for tag in tag_list %}
{{ tag }}{% if not
Hi Alex,
I was trying to use this, but I got an no-attribute-tag-field-error...
I also tried tagging.TagField() and models.TagField()
Any idea?
On 28 Mai, 08:05, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> On Wed, May 28, 2008 at 1:00 AM, mwebs <[EMAIL PROTECTED]> wrote:
>
> > My problem is that
On Wed, May 28, 2008 at 1:00 AM, mwebs <[EMAIL PROTECTED]> wrote:
>
> My problem is that a.tags returns a list with tag objects.But what I
> need is a String of concatenated String like
>
> 'cool, funky, fresh, exiting'
>
> Has anybody an idea how to do this without iterating over the list of
> ta
Hello,
I am using the django-tagging application which allows to tag any
instance of any model within your project.
What I want to to is prepopoulate a form with data using :
form = forms.BlaForm(initial = {'description' = a.description, 'tags'
= a.tags} )
My problem is that a.tags returns a li
Hi, I need help, thanks .
My first problem with values:
class Servicio(models.Model):
empresa =
models.ForeignKey(Empresa,blank=True,null=True,related_name='servicios_internos')
[EMAIL PROTECTED] Trabajadores
trabajadores = models.ManyToManyField(Trabajador,
blank=True,null
I am sorry :-) could answer this by googling after "django
Querydict"
__getitem__(key) is the solution.
mwebs schrieb:
> Hello,
>
> I am performing an ajax-post-request.
>
> When I print request.POST I get this: [u'wew'], u'tags': [u'weew']}>
>
> How can I access the values?
>
>
> Thanks f
Hello,
I am performing an ajax-post-request.
When I print request.POST I get this:
How can I access the values?
Thanks for your help.
Toni
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
You should create an inclusion tag:
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags
Juanjo
--
mi blog: http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
I am have some issues setting up Django on shared web hosting. I have
searched around and tried a few fixes as posted to no avail. Linux
hosting environment. I get the following error message:
Traceback (most recent call last):
File "", line 1, in ?
ImportError: No module named django
I fol
I'm using sorl-thumbnails on Apache. It's working fine, except
permissions on the directory in which it writes the thumbnails — /
media/images — must be set to 777. For obvious security reasons, I'd
like to work around this somehow...or at least minimize the threat.
Any suggestions?
Thanks!
ME
--
On Wed, May 28, 2008 at 2:38 AM, radioflyer <[EMAIL PROTECTED]> wrote:
>
> Which is the most efficient, 'proper' way to get a count on a query
> set?
>
> t_results = Track.objects.filter(query).order_by('title')
> count = t_results.count() # and pass 'count' to the template.
>
> or, in the templa
Milan Andric wrote:
>
> Furthermore I just did
>
> import sys
> sys.stderr.write(os.system(cmd))
> sys.stderr.flush()
>
> to see what the error message from the command is in the production
> server log.
>
>
Try using the subprocess module (Python 2.4+) to call your program instead
of os.
This happens because the buffer from the os call is finite in size.
You probably weren't reading it originally... so the process blocked
while it waited for the buffer to empty out. Since you never read it,
the process stalls forever. That's why --quiet worked.
--~--~-~--~~--
On Mon, May 26, 2008 at 11:05 PM, Chris Moffitt <[EMAIL PROTECTED]> wrote:
> I am very happy to announce the immediate availability of Satchmo version
> 0.7.
Congratulations to you Chris and the rest of the team. I'm looking
forward to digging into all the new features. Good work.
Michael Trie
On May 28, 8:28 am, konatufe <[EMAIL PROTECTED]> wrote:
> The problem is related to the apache directive SetEnv
>
> I detected that this directive isn't working good, they not set
> correctly the var DJANGO_SETTINGS_MODULE
>
> Any idea?
As per documentation at:
http://www.djangoproject.com/d
The problem is related to the apache directive SetEnv
I detected that this directive isn't working good, they not set
correctly the var DJANGO_SETTINGS_MODULE
Any idea?
On May 19, 6:46 pm, konatufe <[EMAIL PROTECTED]> wrote:
> Hello Guys:
>
> I'm using one project withtwoapplications that are
On Tue, May 27, 2008 at 11:05 AM, Milan Andric <[EMAIL PROTECTED]> wrote:
> Worked just fine from the interpreter but I noticed some stuff being
> returned on stdout (same as on cmd line). So I added the --quiet
> option to htmldoc and now it seems fine and returns 0 in the
> interpreter. Maybe
On May 27, 11:05 am, Milan Andric <[EMAIL PROTECTED]> wrote:
> On May 27, 1:10 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
>
> > Milan Andric wrote:
> > > Hello,
>
> > > I have a helper-like django method that does a little pdf generation.
> > > For some reason when I run this view on the dev s
Hi Richard
Thanks for that - option 1 is pretty much what I was looking for
(although option 2 looks more interesting in the longer term :)).
So would I be right in thinking it's something like:
class UrlModel(models.Model):
url = models.CharField(maxlength=100)
def save(self):
1. Create a custom save() method on the model that took the contents of the
field in question and called .lower() on the string - If you simply want to
make sure only lowercase letter are saved to the database.
2. Create a custom field (subclass models.CharField?) that only accepted
lowercase let
hi,
i am trying create a unique manytomanyfield in my module, as I need to
some how manage to only create one object with a given selection of
m2m relations.
Unique together doesn't work on the m2m field.
i am not to sure how to approche this, if doing some custom save
function which checks if a
Hi
I'm developing my first proper Django app after going through some
books and tutorials (colour me newbie), and am wondering if there is
any way to enforce case sensitivity at the model level of a django
app?
I have a model class which has a field called 'url', which I would
like to ensure is
I think I'll check my target host server; I'm starting work on a site
that's to be hosted on GoDaddy - have to see what they're running.
And if their tech-support is worthy of the name; first guy I spoke
with there had to go offline a good five minutes to look up 'Django'.
Hmmm. On hold with the
In the following 'include' tag the 'dir' may vary:
{% include "dir/tag.html" %}
so I would rather use something like:
{% include {{ dir }}"/tag.html" %}
which of course doesn't work. Is there a way to accomplish this? Being
able to set a variable inside a template would solve the problem, but
On Tue, May 27, 2008 at 3:14 PM, bcrem <[EMAIL PROTECTED]> wrote:
>
> That must be it Karen - I'm running 0.96.2. Guess I'll have to wait
> for the next release (or be brave and install the dev version...).
>
> Thanks for your help.
>
I'd recommend installing the SVN version. If you are just ge
On first pass, it doesn't appear that google analytics allows this sort of
querying. Server log parsing seems to be the best solution suggested in
terms of scaling and such.
-justin
On Tue, May 27, 2008 at 2:59 PM, didier rano <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I think that store every page vi
How can I test whether the following (example) 'include' tag returns
any text?
{% include "dir/tag.html" %}
2B
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
I just thought of a solution to my own problem.
Instead of having three different 'next' pages, i should just have one
page which adjusts itself based on who the user is.
What else can I do?
On May 27, 2:00 pm, Adi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am currently using theloginviews straight
That must be it Karen - I'm running 0.96.2. Guess I'll have to wait
for the next release (or be brave and install the dev version...).
Thanks for your help.
bcrem
On May 27, 2:59 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Tue, May 27, 2008 at 2:23 PM, bcrem <[EMAIL PROTECTED]> wrote:
>
Hi,
I am currently using the login views straight out of the box. That
means that I have
(r'^accounts/login/$', 'django.contrib.auth.views.login'),
in my urls.py file.
We have three different type of users of our system. Based on what the
user type is, we would like to redirect the user to the
Hi,
I think that store every page view access in a log file seems to be very
efficient. But it needs to have a consolidated server who runs a script
(with cron). After analyze log file of each django server, this script could
store the number of page view with a very efficient and minimalist datab
On Tue, May 27, 2008 at 2:23 PM, bcrem <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm trying to use the 'with' tag in an html template, similar to
> below:
>
> {% with package.view.object as f %}
> {{ f.name }}
> ...
> {% endwith %}
>
> When I try this, however, I get a TemplateSynta
yes,
i've imported settings.
from django.conf import settings
On May 27, 9:52 pm, Sebastian Bauer <[EMAIL PROTECTED]> wrote:
> did you have this:
>
> import settings
>
> in files where you using settings variable?
>
> Mayank Dhingra pisze:
>
> > any thoughts ?
>
> > On May 27, 12:58 pm, Mayank
Which is the most efficient, 'proper' way to get a count on a query
set?
t_results = Track.objects.filter(query).order_by('title')
count = t_results.count() # and pass 'count' to the template.
or, in the template,
Your search returned {{t_results|length}} track{{t_results|
pluralize}}.
Thanks
Wow, I knew it would be something super simple. haha. That worked!
Thanks so much!! :)
On May 27, 2:14 pm, "Adam Fast" <[EMAIL PROTECTED]> wrote:
> Ok, the problem is 127.0.0.1 is localhost - just to your linux
> machine. Do this instead:
>
> Replace the word LINUX_IP with the actual IP address
Hi all,
I'm trying to use the 'with' tag in an html template, similar to
below:
{% with package.view.object as f %}
{{ f.name }}
...
{% endwith %}
When I try this, however, I get a TemplateSyntaxError whose exception
value reads:
Invalid block tag: 'with'
and my {% with .
Ok, the problem is 127.0.0.1 is localhost - just to your linux
machine. Do this instead:
Replace the word LINUX_IP with the actual IP address of your linux
machine (ifconfig is the command to get it)
python manage.py runserver LINUX_IP:8000 (or 80)
Then type the same IP/port you used LINUX_IP:
@Justin
Are you aware of any way to do that with Google Analytics. That is in
fact what we use but I am unaware of any API that I could use to
achieve that. It doesnt seem like this would let me integrate this all
into my models easily.
@Norman
Do you know of any good resources to do what you p
On the host machine. VM is just command prompt.
On May 27, 1:52 pm, Randy Barlow <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
>
> anndr0id wrote:
> > So I've never used Linux or Django or Python before. I've got this
> > huge project dumped into my lap and so f
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
anndr0id wrote:
> So I've never used Linux or Django or Python before. I've got this
> huge project dumped into my lap and so far I've got ubuntu 7.10
> command prompt running on my PC through VMWare and the Django server
> up. This is the first day I
So I've never used Linux or Django or Python before. I've got this
huge project dumped into my lap and so far I've got ubuntu 7.10
command prompt running on my PC through VMWare and the Django server
up. This is the first day I've got into any of this so please excuse
my total lack of knowledge ab
> I've tried with never_cache, but it doesn't work. The strange thing is
> that today, I've added a new blog post, which was immediately visible
> from the post list and post details. But some hours later it
> disappears until I restart Apache. I really don't understand where the
> problem can be.
You can do this with an intermediate table:
class Fruit(models.Model):
name = models.CharField()
def __unicode__(self):
return ('%s' % (self.name))
class FruitItem(models.Model):
fruit = models.ForeignKey(Fruit)
number = models.IntegerField()
def __unicode__(self):
did you have this:
import settings
in files where you using settings variable?
Mayank Dhingra pisze:
> any thoughts ?
>
> On May 27, 12:58 pm, Mayank Dhingra <[EMAIL PROTECTED]> wrote:
>
>> I am experiencing a strange problem while using
>> DualSessionMiddleware
>>
>> http://code.djangoprojec
47 matches
Mail list logo