Hi All,
I have a manager which is used also as related manager:
class ReleaseManager(models.Manager):
use_for_related_fields = True
def all(self):
q = self.get_query_set()
q.query.add_q(Q(enabled=True) & Q(project__enabled=True))
return q
I need to add another f
Laszlo Antal escribió:
> Hi,
>
> I wrote my custome admin view and I would like to have the same error
> reporting style for edit templates like django's.
>
> Could someone point me in the right direction on how to have the message
> on the top of the page and the red color for the input boxes
Fabio Natali escribió:
> Dear All,
>
> I have a Django based web application to gather recipes. I have a
> "recipe" model with fields "ingredients", "date added", etc.
>
> I wish I could keep track of the user who added each recipe. Am I
> supposed to add a "user" (or say "cook") field to my rec
djangomax escribió:
> According to the Django Book for version 1.0, the following should
> work:
>
> fileField = forms.FileField(upload_to='foo')
>
> However, I get an error saying there was an unexpected argument. Any
> idea why?
> I'm new to Django and may be doing something outright stupid.
>
I just wrote an snippet, in case someone is interested.
http://www.djangosnippets.org/snippets/1486/
--
Kind Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
On Tue, May 5, 2009 at 10:20 AM, Alex Gaynor wrote:
> Yes, it's necessary to write your own tag, as you can't call methods that
> take parameters from the template language.
>
> Alex
>
Thank you for the quick reply.
I'll start working on it.
--
Kind Regards
--~--~-~--~~
I have a model with a method, like:
class Model ..
# class body
def is_maintainer(user):
#method body
Is there any way to invoke this method from a template ?
{% if model.is_maintainer request.user %} # this doesn't work
or should I write my own tag ?
Kind Regards
--~--~-~-
Malcolm Tredinnick escribió:
> The Model class calls pre_save() to work out the value to save into the
> database. That's working correctly for you, as you've noticed: the right
> value is being saved.
>
> Some Field subclasses in Django also use pre_save() as a way to
> normalise the value in th
I have a model with a custom field:
class Project(models.Model):
slug = fields.AutoSlugField(max_length=50, unique=True,
editable=False, prepopulate_from="name", force_update=False)
name = models.CharField(unique=True, verbose_name=_('Name'),
max_length=50, help_text=_('The project name t
On Wed, Apr 29, 2009 at 3:46 PM, Chris wrote:
>
> I thought this would be a common question, but Google doesn't show any
> Django-specific solutions. What's the general best practice for
> detecting disabled cookies in a single request?
>
Maybe this could help: request.session.test_cookie_worked
Hi all,
I followed the instructions here (http://docs.djangoproject.com/en/dev/
ref/forms/api/#customizing-the-error-list-format), on how to customize
the error list format:
class TipErrorList(ErrorList):
def __unicode__(self):
return self.as_tips()
def as_tips(self):
i
one app's middleware to
intercept and process the other app's stuff, does anyone know how to do
this?
Thank you,
Gabriel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
Hi,
I've decided to play a little more seriously with Django and as many
other people I
begun creating a simple blog application. I've encountered some issues when
displaying the comments form, where users are able to add comments to a
blog post.
I'm creating the form by extending django.forms.
__
Gabriel Falcão
Jabber: [EMAIL PROTECTED]
Blog: http://www.nacaolivre.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@google
Gabriel Rossetti wrote:
> Hello everyone,
>
> I'm trying to get a custom auth handler to work but I keep on getting
> this error when accessing request.user.get_profile() :
>
> DoesNotExist: User matching query does not exist.
>
> I followed the f
odels.ForeignKey(DjangoUser, unique=True)
#user = models.OneToOneField(DjangoUser, core=True) # This doesn't
work either
I really don't see why it doesn't work...does anyone have a clue?
Thank you,
Gabriel
PS I've already looked at past posts on the subject but the commo
Gabriel Rossetti wrote:
> Hello everyone,
>
> I would like to share a model with all my apps. I moved it from the app
> to the project's root dir, but now the admin interface can't find it!
> Does anyone know how to do this? I thought of createing empty models in
del, but I don't
really like this.
Thank you,
Gabriel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscr
Alex gmail.com> writes:
>
>
> I'm working on my first Django project and I can't seem to get
> information printed out as I would like it. I'm trying to print out
> quotes to a page with the newlines turned into HTML tags (similar
> to PHP's nl2br function). So far I've been able to do this u
JonSidnell gmail.com> writes:
>
>
> Hi everyone
>
> I'm suddenly struck by the notion that I would like to be dev'ing
> Django on Linux of some flavour rather than Windows.
>
> It's been a wee while since I stuck my toes in the Linux waters, so I
> was wondering if anyone here has any recomm
ydjango gmail.com> writes:
> I have propriety commercial code and some formula/ algo
> implementations which I do not want to expose.
> Hence I do not want to upload .py source files
>
> Is rewriting that business logic in a compiled langauge only way out?
> how do I call it from python, Using
Mike Chambers gmail.com> writes:
>
>
> Thanks for the input. I was considering doing this, but my only concern
> was if the key changed for some reason, I would have to regenerate the
> hashes. I might try it out though, and see how well it works.
>
> Of course, Im not sure why the key woul
Mike Chambers gmail.com> writes:
>
>
> I am not concerned if they can send the hash back. I dont want them to
> be able to access the underling value that the hash is based on.
>
> I am also not concerned about spam, but rather just dont want to expose
> raw database ids to the public.
>
o the
task:
{% for task in all_tasks %}
{% for user in all_users %}
{% endfor %}
{% endfor %}
How might I refactor all this code to make it more efficient and generally
better?
Thanks
Gabriel
--~--~-~--~~~---~--~~
You received this message b
What do you think about :
eclipse + plugins( pydev + html/css )
eric4 + django plugin
SPE - is there plugin for django
All of that around for-django usage?
Dnia 05-03-2008, śro o godzinie 22:22 +0800, limodou napisał(a):
> On Wed, Mar 5, 2008 at 10:32 PM, gabriel <[EMAIL PROTECTED]&
with IDE with a nice django support - does anything
alike exist??
Thanks for your answers,
Gabriel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
If you are stuck with PHP I recommend Symfony (http://www.symfony-
project.org/). It's the most Django-like PHP framework I've seen.
On Nov 21, 10:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> ok! argh... i don't want to use php anymore... :p is there at least a
> django like framework
I'll second Christian Joergensen by saying that foreign key fields are
the way to go here, rather than choices hacks. Put those types in
another table.
gsf
On Nov 20, 12:16 pm, David Marko <[EMAIL PROTECTED]> wrote:
> Using this I could create a static list only. But what I mean is
> dynamic li
I don't know details on this, but there have been a lot of
improvements to the Unicode handling in versions since 0.96, so an
obvious suggestion would be to upgrade to the latest Subversion
trunk. That will most likely solve your problem.
gsf
On Nov 20, 12:09 pm, cwurld <[EMAIL PROTECTED]> wrot
Hi Horace,
Depending on your webhost, you will need to use fastcgi or mod-
python. See http://wiki.dreamhost.com/index.php/Django as an example
-- therein are the steps necessary to get Django running on DreamHost,
a large webhost that supports fastcgi.
Also see http://www.djangoproject.com/doc
Did you have a view named "startsess" that you subsequently deleted?
Admin is looking for it but not finding it. You may need to remove it
from django_content_type. Try dropping that table from your database
and running python manage.py syncdb.
On Oct 3, 12:34 pm, Greg <[EMAIL PROTECTED]> wrote
On Jun 19, 5:19 pm, RichardH <[EMAIL PROTECTED]> wrote:
> This is probably more of a Python question than django, but django
> provides the context for my problem.
>
> Requirement: I have got a user defined list of field names (e.g.
> field_names=['id','name','description',...]) and I want to pass
On Jun 15, 3:13 pm, Gabriel Farrell <[EMAIL PROTECTED]> wrote:
> I've just replaced the RadioSelect widget with CheckboxSelectMultiple
> for one field in my view. Here's the relevant code:
>
> self.fields['patron_type'] = forms.ChoiceField(choices=(
On May 7, 4:32 am, Jens Diemer <[EMAIL PROTECTED]> wrote:
> That surprises me. Does nobody have the same problems?
> Still nobody delete a model class?
>
> How to clean up the django tables? With phpMyAdmin?
>
I've just run into a similar issue when I removed an app from a
project. After some at
I've just replaced the RadioSelect widget with CheckboxSelectMultiple
for one field in my view. Here's the relevant code:
self.fields['patron_type'] = forms.ChoiceField(choices=(
(pt.id, pt.name) for pt in patron_type_choices),
widget=widgets.CheckboxSelec
Hi,
I have a question about filtering queries concatenating fields.
I just saw in documentation the possibility to concatenate (AND, OR)
sentences, but not concatenate table-fields to filter something. Is
the Django DB-API able to do something like that?
[SQL]
WHERE lower(table1.label || ' ' ||
Robin Percy schrieb:
> Here's a simplified custom tag example using is_authenticated():
>
> class TestTagNode(template.Node):
> def render(self,context):
> return "User is authenticated? %s" %
> context['user'].is_authenticated()
Thanks a lot, I was close, argh! :)
--~--~-
Robin Percy schrieb:
> It sounds like you're trying to access the user as an attribute rather
> than a key in your tag renderer. Make sure you're using the syntax
> context['user'] as opposed to context.user.
>
I tried both, but if I use context['user'] I could not find a way to
apply is_authe
Hi everyone,
Scenario: I want to build a main menu with several entries. Some of the
entries should only be displayed if the user is logged in (profile,
settings), some only if it's an anonymous user (register, log in) and
some entries should be always visible (home, ...).
I tried it several
on top of Python open source
libraries such as the Django framework, smtpd.py mail service, and the
wsgiref web server software."
--
Gabriel Gunderson
http://gundy.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
ilter() those which have a
date in the future, or get a boolean to be true after a certain date?
--
The Public is merely a multiplied "me."
-- Mark Twain
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
--~--~-~--~~~---~--~~
You receiv
Is the Django site down?
I've been getting a (145) Connection timed out for a while now.
--
The Public is merely a multiplied "me."
-- Mark Twain
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
--~--~-~--~~~---~--~~
You receiv
isn't class models.Meta back from before
magic-removal?
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
signature.asc
Description: This is a digitally signed message part
fields in a model pointing to the same table?
> I have a vague feeling I might have seen some messages about stuff like
> that fly by but I could easily be wrong about that.
I'll have to do some more searching with different key words. Any
errors I found were PG specific, since that is
On 10/14/06, ggundy <[EMAIL PROTECTED]> wrote:
> There must be some kind of spanning or looping going on as the SELECT
> is full of this type of thing: "AND "country176"."world_region_id" =
> "world_region177"."id" AND "shipper169"."message_type_id" =
> "message_type178"."id" AND."
I thought I wo
I liked the Django font a lot. Does anyone know what font is used in the
Django logo[1]?
[1]http://media.djangoproject.com/img/site/hdr_logo.gif
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL
gt; clients.
http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
A list on the wiki of the Django-capable webhosts. There are even two
hosts which cater directly to Django users.
--
No violence, gentlemen -- no violence, I beg of you! Consider the furniture!
-- Sherlock Holmes
Gabri
On 9/21/06, Gabriel Puliatti <[EMAIL PROTECTED]> wrote:
> Hm, I used that. I can print new_data.getlist('courses') and get the
> list, but when I try to assign it to a variable for writing, I get
> "'str' object has no attribute '_get_pk_v
s no attribute '_get_pk_val'"
However, this only happens when I do new_profile.save(). When I try to
write what you said, it works and I can print, but the same happens
when trying to save.
--
No violence, gentlemen -- no violence, I beg of you! Consider the furniture!
'_get_pk_val'".
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
signature.asc
Description: This is a digitally signed message part
olence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
signature.asc
Description: This is a digitally signed message part
hanks a lot!
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
signature.asc
Description: This is a digitally signed message part
get no errors, but everything still passes,
not filtering anything.
Also, for "classesjoined".
>>> print(classesjoined)
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL PROTECTED]
p
ed)" where classes
joined is the ManytoMany in the student's model, I get "Error binding
parameter 0 - probably unsupported type."
Is there a way to fix this?
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gab
lemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti
[EMAIL PROTECTED]
predius.org
signature.asc
Description: This is a digitally signed message part
es.
[1] http://wiki.rubyonrails.org/rails/pages/Framework+Performance
--
No violence, gentlemen -- no violence, I beg of you! Consider the
furniture!
-- Sherlock Holmes
Gabriel Puliatti <[EMAIL PROTECTED]>
predius.org
signature.asc
Description: This is a digitally signed message part
I've uploaded a tutorial on uploading files into Django. I had some problems doing this when I started working on Django, and thought that perhaps people would appreciate it. I know that the files are not indented, blame Wordpress. It would be good to get some feedback, as I adapted it from my prog
lp is much appreciated at this point, considering I am a
newbie. :P
--
No violence, gentlemen -- no violence, I beg of you! Consider the furniture!
-- Sherlock Holmes
Gabriel Puliatti
predius.org
--~--~-~--~~~---~--~~
You received this message bec
ve the media files.
--
You can't get there from here.
Gabriel Puliatti
predius.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djang
gner's music is better than it sounds. -- Mark Twain
Gabriel Puliatti
predius.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@google
> the lan of my client but I believe that it will not solve the problem
> because I don´t have a domain name.
>
> Thanks in advance.
>
>
> >
>
Can't you invent a domain name and add it into /etc/hosts of the client?
--
Wagner's music is better than it sounds
error that is print()ed.
{'togroup': ['This field is required.']}
--
Wagner's music is better than it sounds. -- Mark Twain
Gabriel Puliatti
predius.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
Hey, I've been trying to do an uploading page, where users can upload a
file, outside of the admin panel, of course.
I follow http://www.djangoproject.com/documentation/forms/, but I end
up getting
"local variable 'errors' referenced before assignment"
All the code is here: http://arrrt.googlec
301 - 363 of 363 matches
Mail list logo