user to do the check itself.
Any ideas how i can find the user in the template tag? it's not in
'context' that gets passed to the Node, I'm guessing i need to get it
in there somehow. context processors don't seem to affect the contexts
passed to these Nodes
hi greg,
just checking - did you try both at once? ie DecimalField in your model
and |floatformat:2 in your template.
-jake
Greg wrote:
> Vincent and James,
> I tired both of your suggestions and I couldn't get either to work.
>
> First, still using my prices as FloatFie
greg,
Greg wrote:
> Jake,
> No I didn't. When I tried the 'floatformat:2' I made sure that my
> model fields were of type FloatField.
i have used DecimalField in my model and |floatformat:2 in my template
and gotten the behavior you're looking for; that's
hi greg,
Greg wrote:
> Jake,
> I've made the change to where both of my fields are now of type
> DecimalField. However, I'm getting the same error:
>
> TypeError
> float() argument must be a string or a number
> Here is what I have is my models file:
>
;> ModelFormClass = forms.models.form_for_model(Model)
>>> ModelFormClass.base_fields['myfield'].help_text
-jake
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
se the
stored-value (first) element from the stored/representation tuple you use.
ie if your UNITS tuple is defined
>>> UNITS = ( ('in', 'Inches'), ('cm', 'Centimeters'), )
you'll want to use
>>
? it should live in
'flatpages/default.html' in your templates folder.
-jake
Hai Dong wrote:
> Hello:
>
> I got a strange problem with flat page. I created a test flatpage called
> "/test2/". I know the flatpage middleware is working, since if I enter
> /test/
just a guess - if self.fk_day is a ForeignKey field then you'll want to
pass self.fk_day.id here or the expression won't match.
also, i use the permalink decorator for this:
http://www.djangoproject.com/documentation/model-api/#the-permalink-decorator
best
jake
--~--~-~--~~
27;s not part of
django's 'models' module but part of the 'fields' module in django-tagging.
you probably want:
>>> from tagging.fields import TagField
at the top, and then:
>>> tag = TagField()
in your model declaration.
best
jake
--~--~-~--~--
hi kevin -
it sounds like your PythonPath is not being set properly in your
project's apache configuration. there are some instructions about that
here:
http://www.djangoproject.com/documentation/modpython/#basic-configuration
-jake
[EMAIL PROTECTED] wrote:
> i used the development s
'll be accessible like:
{% for hours in business.hours_set.all %}
{{ hours.day }} {{ hours.open_time }} {{ hours.close_time }}
{% endfor %}
etc.
does that help?
best
jake
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
ch older version of MySQLdb and I'd be very
> interested in knowing for certain that they've upgraded at some point in
> the past 12 months.
i get:
(1, 2, 1, 'final', 2)
-jake
--~--~-~--~~~---~--~~
You received this message because yo
hi john -
you can use the 'spaceless' tag in your template:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#spaceless
to filter out spaces & carriage returns.
-jake
On Mon, Feb 2, 2009 at 3:41 PM, John M wrote:
>
> Grrr, I answered my own quesiton, if I remo
hi robocop -
is it enough to add the '**kwargs' syntax to your receiver function?
or is that already present?
like:
def _save(self, **kwargs):
...
and
def delete(**kwargs):
...
-jake
On Mon, Feb 9, 2009 at 12:15 PM, Robocop wrote:
>
> Hello,
> I've re
hi dan -
a little further down on the contenttypes doc page you link to there
is documentation on the generic foreign key mechanism bundled with the
contenttypes app:
http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1
pretty similar to what you describe ;)
On Wed, Feb 11, 2009 a
thing like
`mycategory.categoryitem_set.all` just as with any other foreign key.
On Wed, Feb 11, 2009 at 11:56 AM, danfreak wrote:
>
> Cheers Jake,
>
> given the code:
> --
> from django.db import models
> from django.contrib.contenttypes.models import ContentType
> from
but they are separate entities.
-jake
--~--~-~--~~~---~--~~
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 unsubscribe from this group
el() is only
available in the SVN version of django.
one quick way to get this behavior without that argument is to set the
'user' field 'editable=False'
user = models.ForeignKey(User, editable=False)
remember this will affect the change form in contrib.admin
late's context (and therefore
not a valid key to the dictionary-like object 'context'). if you'd like
to more-or-less silently ignore this error for now you can use instead
context.get('link')
--
hi atendo -
i think you may have some misunderstandings about what template context
is and what it's doing here.
maybe another look at this page:
http://www.djangoproject.com/documentation/templates_python/#basics
will help clear this up for you.
best,
jake
Atendo wrote:
> I think I
hi ryan,
how about a context processor?
http://www.djangoproject.com/documentation/templates_python/#writing-your-own-context-processors
-jake
Ryan K wrote:
> Hi. All URLs in my templates are preceded by variables I added to the
> settings file so I could easily deploy my site o
hi john -
John M wrote:
> {% ifequal selected_id recordset.id %} never seems to work.
>
> where selected_id = 1
> recordset has ID from 1 - 10
just a guess - are selected_id and recordset.id really the same type?
{% ifequal %} will not match for example '1&
o get it back into a hex representation when someone goes
to edit the field? the only thing that comes to my mind is javascript
but i'm sure there's a less hackish solution :)
best
jake
Kevin wrote:
> In the admin interface if someone enters a number in hex, then it
> fails t
hi jeff -
django devs are in the process of moving servers so i think this is
probably just a temporary issue. fwiw i am able to 'svn up' right now
with no problem :|
best,
jake
jeffself wrote:
> I've never run into this problem before but all of a sudden its not
> w
_template, {'template': 'frontpage.html',
'extra_context': {'news': News.objects.all, 'sidebars':
Sidebar.objects.all } }),
(r'blog/$', include('blog.urls')),
)
or something like th
hi greg -
you're looking for this:
http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-direct-to-template
best
jake
Greg wrote:
> Ok,
> Very easy question here. Is there anyway that I can directly call
> my .htm file from within my urls.py fil
hi a.
A. Reppel wrote:
> does the template language have a elsif clause for if and if{not}equal?
nope, you'll have to go with
{% if %}
{% else %}
{% if %}
{% endif %}
{% else %}
{% endif %}
best,
jake
--~--~-~--~~~---~--~~
You received this
"extend()".
you can use the bitwise operators '&' and '|', '&' will give you
intersection and '|' will give you union
qs & otherqs = intersection
qs | otherqs = union
best
jake
--~--~-~--~~~---~--~~
You rec
my own
projects that provides a couple of generic views for sorting, which i
just now packaged together and wrote some light documentation for:
http://dai5ychain.net/jake/2007/09/27/a-simple-django-sorting-app/
hope it's useful!
best,
jake
--~--~-~--~~~---~--~~
entation/model-api/#modifying-initial-manager-querysets
best,
jake
--~--~-~--~~~---~--~~
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 unsub
ation through my for loop to set
> the appropriate bgcolor.
>
> Any suggestions?
i think you want {% cycle %}:
http://www.djangoproject.com/documentation/templates/#cycle
best,
jake
--~--~-~--~~~---~--~~
You received this message because you are su
up:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Templatetagloadingrespectsdottednotation
that page is an invaluable reference when living on the trunk!
best
jake
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
x27;re getting a list of more than one author.
actually you'll use "author_list" here - list_detail.object_list appends
"_list" to the value set for "template_object_name"
best
jake
--~--~-~--~~~---~--~~
You received this message becau
hi johnny,
you can use dot syntax for indices also, ie:
{{ a_tup.0 }}
{{ a_tup.1 }}
-jake
On Wed, 2007-10-17 at 08:20 -0700, johnny wrote:
>
> {% for a_tup in rs %}
>
> {{ a_tup[0] }}/
>{{ a_tup[1]
>
> {% endfor %
w. you can use
HttpResponseRedirect - or if you really want to end up using a generic
view remember that you can call them within your own views also.
# views.py
from django.views.generic.simple import redirect_to
def myview(request):
# something
return redirect_to(url=mycalculatedurl)
On Mon, 2007-10-22 at 14:12 -0500, jake elliott wrote:
> this is probably another really simple view. you can use
> HttpResponseRedirect - or if you really want to end up using a generic
> view remember that you can call them within your own views also.
>
> #
google.com/group/nesh-django-utils/browse_thread/thread/42d4db5985e5b8f
best
jake
--~--~-~--~~~---~--~~
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@goo
ause it to change, and in what way.
Please let me know. Thanks.
Jake
--~--~-~--~~~---~--~~
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
ct(info_dict,
template_name='blog/list.html')),
)
# views.py
from django.views.generic.list_detail import object_detail
from tagging.models import Tag,TaggedItem
from blog.models import Entry
def tag_detail(request, slug):
unslug = slug.replace('-', ' ')
ad over multiple databases.
I very much appreciate any feedback.
best,
Jake
--
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 unsubscribe from this gro
Hi, All
I was wondering if you can help me with this one.
I've modified part of my models.py file so I can have a new text area
inside
my django admin page. I need to add this text area so I can add
content to a new subpage
I have added the new text area, but after saving and refreshing the
page
There needs to at least be a warning in the documentation. I spent a lot
of time debugging only to find this was a problem with Django.
On Thursday, October 16, 2008 at 6:56:07 PM UTC-4, Malcolm Tredinnick wrote:
>
>
> On Thu, 2008-10-16 at 11:15 -0700, AndyB wrote:
> > Well - someone on #Djang
If I have a separate Python script that I want to interact with my Django
project, how do I set them up to communicate?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an em
.
On Friday, July 17, 2015 at 5:12:51 AM UTC-7, larry@gmail.com wrote:
>
> On Thu, Jul 16, 2015 at 7:44 PM, Jake Rudolph > wrote:
> > If I have a separate Python script that I want to interact with my
> Django
> > project, how do I set them up to communicate?
>
&g
I am trying to make a button on the index page that changes the boolean
field of my object, and then displays that object in a different place on
the page. I am not sure what to put as the action for this button, and
where to put and call the function that will actually change the value in
the
ON response to
> the effect of {success: [true|false], reason: 'failure reason, if any'}.
> Don't forget to update your urls.py to reflect the new view.
>
> On the Javascript side, in the registered function, you write code that
> both posts to your Django view in an
use python3
Sent from Mailspring
(https://link.getmailspring.com/link/1548937978.local-70546635-0195-v1.5.5-b7939...@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D),
the best free email app for work
On Jan 31 2019, at 6:01 pm,
search github codingforentreponuers ecommerce
Sent from Mailspring
(https://link.getmailspring.com/link/1549102582.local-9ef6665c-d01d-v1.5.5-b7939...@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D),
the best free email app fo
DID YOU CONFIGURE PYTHON ?
Sent from Mailspring
(https://link.getmailspring.com/link/1549297886.local-887807ae-9dc1-v1.5.5-b7939...@getmailspring.com/0?redirect=https%3A%2F%2Fgetmailspring.com%2F&recipient=ZGphbmdvLXVzZXJzQGdvb2dsZWdyb3Vwcy5jb20%3D),
the best free email app for work
On Feb 1 201
I'm a relatively new Django user.
I'm running into a problem related to relative imports.
I have a project and app set up the usual way
mysite
-- myapp
__init__.py
all the modules and templates in myapp including one that contains the
definition of MyClass
-- mysite
__init__py
Howdy!
I'm Jake, founder and CEO of ButterCMS. I'm looking for someone to own tech
at ButterCMS. We're built on Django + Vue.js. You'd work closely with me
(founder) on all product initiatives. There’s zero bureaucracy - you will
have maximum autonomy and responsibilit
51 matches
Mail list logo