user in template tag without passing it

2009-07-30 Thread Jake
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

Re: Float Field not displaying the two zeros at the end of a price

2007-08-19 Thread jake
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

Re: Float Field not displaying the two zeros at the end of a price

2007-08-19 Thread jake
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

Re: Float Field not displaying the two zeros at the end of a price

2007-08-20 Thread jake
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: >

Re: index page

2007-08-21 Thread jake
;> 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

Re: Initial value for a choices field in admin?

2007-08-21 Thread jake
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 >>

Re: a question about flatpage

2007-08-25 Thread jake
? 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/

Re: dynamic links

2007-08-28 Thread jake
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 --~--~-~--~~

Re: What's this mean? 'module' object has no attribute 'TagField'

2007-08-28 Thread 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 --~--~-~--~--

Re: so wierd problem?

2007-09-03 Thread 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

Re: Help with One-to-Many Models

2007-09-04 Thread jake
'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

Re: Dreamhost now supports Django

2008-07-17 Thread jake elliott
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

Re: simple record output

2009-02-02 Thread Jake Elliott
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

Re: signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Jake Elliott
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

Re: Generic foreignKey model: Category

2009-02-11 Thread Jake Elliott
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

Re: Generic foreignKey model: Category

2009-02-11 Thread Jake Elliott
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

Re: Help me understand the error of my ways...

2007-09-07 Thread jake elliott
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

Re: Form field deletion

2007-09-07 Thread jake elliott
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

Re: Help me understand the error of my ways...

2007-09-07 Thread jake elliott
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') --

Re: Help me understand the error of my ways...

2007-09-07 Thread jake elliott
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

Re: 404 Page Help

2007-09-11 Thread jake elliott
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

Re: ifequal function not working?

2007-09-13 Thread jake elliott
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&

Re: Add Support for Hex numbers is Admin

2007-09-19 Thread jake elliott
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

Re: Can't update my django source via svn

2007-09-19 Thread jake elliott
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

Re: General site organization

2007-09-20 Thread jake elliott
_template, {'template': 'frontpage.html', 'extra_context': {'news': News.objects.all, 'sidebars': Sidebar.objects.all } }), (r'blog/$', include('blog.urls')), ) or something like th

Re: How to call a .htm page without going to the views.py file?

2007-09-21 Thread jake elliott
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

Re: elsif in templates?

2007-09-24 Thread jake elliott
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

Re: Union/join of two queryset?

2007-09-24 Thread jake elliott
"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

Re: Sorting product

2007-09-26 Thread jake elliott
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 --~--~-~--~~~---~--~~

Re: change list in admin

2007-09-27 Thread jake elliott
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

Re: How to keep track of iterations through a for loop in my template?

2007-10-01 Thread jake elliott
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

Re: Problem with nesh.thumbnail

2007-10-04 Thread jake elliott
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

Re: generic views

2007-10-11 Thread jake elliott
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

Re: template and array like template variable access

2007-10-17 Thread jake elliott
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 %

Re: generic views

2007-10-22 Thread jake elliott
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)

Re: generic views

2007-10-22 Thread jake elliott
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. > > #

Re: Oh boy, I've gone and done it now.

2007-11-05 Thread jake elliott
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

Django newb question about status of OneToOne relationships in ORM

2007-12-26 Thread Jake B
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

converting from function based views to class based views

2011-12-10 Thread Jake Richter
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('-', ' ')

Database partition strategies and scalability advice

2011-06-29 Thread Jake D
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

creating text area for subpage inside models.py

2011-03-29 Thread jake k.
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

Re: icontains case-sensitive on MySQL

2015-05-31 Thread Jake Gordon
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

Interfacing Django Project with Python Script

2015-07-16 Thread Jake Rudolph
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

Re: Interfacing Django Project with Python Script

2015-07-17 Thread Jake Rudolph
. 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

Buttons

2015-07-22 Thread Jake Rudolph
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

Re: Buttons

2015-07-23 Thread Jake Rudolph
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

Re: My django-admin startproject (project name) is not working

2019-01-31 Thread jake ksi
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,

Re: Beginner

2019-02-02 Thread jake ksi
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

Re: My django-admin startproject (project name) is not working

2019-02-04 Thread jake ksi
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

creating a utility script inside a django app; relative import woes

2020-05-18 Thread Jake Waxman
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

Director of Engineering for Headless CMS SaaS Startup

2020-12-01 Thread Jake Lumetta
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