Thanks Karen you've been helping me out recently with debugging a few
things and have been a really great asset.
Cheers,
Ryan Kaskel
On Aug 26, 7:19 pm, Karen Tracey wrote:
> On Wed, Aug 26, 2009 at 3:33 PM, Ryan K wrote:
>
> > This is where it says the problem i
State in admin rendering process when error occurred:
/usr/local/lib/python2.6/dist-packages/django/template/debug.py in
render_node
74. e.source = node.source
75. raise
76. except Exception, e:
77. from sys import exc_info
78. wrapped = TemplateSyntaxError(u'Caught an exception while
This is where it says the problem is in the template:
Template error
In template /usr/local/lib/python2.6/dist-packages/django/contrib/
admin/templates/admin/base.html, error at line 30
Caught an exception while rendering: unsupported operand type(s) for
+=: 'function' and 'list'
20
21
I am getting a very strange error and I can't tell if it is coming
from my code or Django's code. I have not modified the templates of
the admin interface at all. Below is the error. I am trying to access
http://localhost:8080/. This error still occurrs if I remove all apps
from the install apps l
What exactly are your models? If you are using a ManyToMany fields you
could do it Rating.objects.get(user=request.user) and see if that
returns anything.
Cheers,
Ryan
On Jul 19, 10:06 am, The Danny Bos wrote:
> Hey there, this should be easy, but my code just won't play along.
>
> I've let a l
> urlpatterns = patterns('',
> (r'^someurl/', login_required(direct_to_template), { 'template':
> 'template.html', }),
> )
http://groups.google.com/group/django-users/browse_thread/thread/e9f85ce0666da8c/
Cheers,
Ryan
http://consulting.ryankaskel.com
On Jul 19, 5:31 pm, AKK wrote:
> Hi, i
I'm starting to see that I too need to participate in Django sprints
to help incorperate the features I want in Django and I think we all
should and perhaps you do which is great. This is great software there
is still a lot of work to be done.
Ryan Kaskel
http://consulting.ryankaskel.com/
On Jul
390. (this post
if for anyone searching the topic)
On Jul 11, 1:57 am, Ryan K wrote:
> I modified the above _cached_menu method to just create a new object
> every time (shown below). It only seems to get the links right, a
> ManyToMay field, after I save it _twice_? Hmmm...how I get the
; > wrote:
>
> > On Tue, Jul 14, 2009 at 6:27 PM, Ryan K wrote:
>
> > > Yea...it would be so elegant too! Here is a "bug" filing:
> > >http://code.djangoproject.com/ticket/5390. It's been open for two
> > > years
>
> > A litt
I'm not sure but try {{ original }} ...here is the code:
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/options.py
context = {
860 'title': _('Change %s') % force_unicode
(opts.verbose_name),
861 'adminform': adminForm,
862
I'm not really sure I understand your question but you don't need to
jump to another view...you just need to pass the relevant objects to
the mailer function and then "return render_to_response(...)." If the
mailer function is already in another view, refactor the code and
create a non view functi
adding print statements to your
> save methods or handlers and running the dev server from terminal).
> The reason is that when you initially create the object, related
> objects have to link to the existing object, so the parent object is
> saved before them.
>
> On Jul 13, 9:
To be a little more explicit, perhaps your view code contains:
render_to_response('template.html",{},RequestContextInstance)
as opposed to
return render_to_response(...)
Cheers,
Ryan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
Are you returning render_to_response in the view?
On Jul 14, 6:12 am, alecs wrote:
> Hi all :) Can u help me with .views._CheckLogin.__call__ didn't return
> an HttpResponse object . I'm trying from my view 'jump' to another
> view by calling mail_to_user(request,username,dummy) The
>
Recently I've been trying to get answers about the post_save signal
behavior and perhaps have been asking too much of readers without
narrowing down the problem enough myself. So here is my effort to ask
a rather straightforward question:
The code that connects to the post_save signal, according
I am trying to avoid circular dependency issues between signals.py
and models.py. Is there any reason why I can't connect the post_save
signal in signals.py itself (the function is connects with would be in
the same file? Should I import it in the apps/__init__.py file to
ensure the signal is ins
I modified the above _cached_menu method to just create a new object
every time (shown below). It only seems to get the links right, a
ManyToMay field, after I save it _twice_? Hmmm...how I get the updated
many2many table?
def _cache_menu(self, menu, xhtml):
"""
Stores xhtml into
Hello,
I am trying to implement a cache system using the post_save signal.
The problem is the code below, a Thread subclass that ends up calling
run(), the cache database never runs. It's driving me crazy!!! Is
there something going on with the way Django cache's queries which is
what I expect? C
Is there any reason you can't create your own signal and put it in the
rounds save() method and then just call the parents save?
http://docs.djangoproject.com/en/dev/topics/signals/#defining-and-sending-signals
Cheers,
Ryan
On Jul 9, 6:12 am, Eugene Mirotin wrote:
> Hello!
>
> I have a tricky
Please ignore this. I'm an idiot and placed the reference to the
middleware in the template_context_processros settings. And so strange
errors resulted. Please delete if possible.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
I'm getting a very strange error:
TypeError at /admin/
object.__new__() takes no parameters
I've isolated the problematic code to my middleware for an application
I built called staticpages. It uses the same mechanism and so the same
middleware as flatpages. This is the code:
from django.http
def run(self):
pass
def build_menu_from_link_mod(...
def build_menu_from_menu_mod(..
I hope this better specifies the issue. Should I import these in the
run method for each Thread subclass?
On Jul 8, 4:47 pm, Alex Gaynor wrote:
> On Wed, Jul 8, 2009 at 3:45 PM, Ryan K wrote:
I am creating an application that uses the dispatcher in Django. In
the apps models.py file I connect the post_save of two models to
functions in a signals.py file. The problem is that I need to use
several models in models.py and that leads to a circular import. What
is the best way to solve this
Greetings,
I am designing an application that includes a menu with a many to many
relationship with links. These menus will hardly ever change. What is
the best way to cache these pages? Should I use the messaging system
to create an html file to use when the menu is changed? Is database
access q
Lets say I retrieve from my database an object foo and foo's model has
a ForeignKey field, baz, with null and blank set to True. Will a
simple test like if foo.baz ... test whether the field is set to NULL
or not?
Cheers,
Ryan
--~--~-~--~~~---~--~~
You received thi
Greetings,
I am designing an application that is very simple like flatpages but I
need the ability to associate a menu with the content which will be
done through the URL (i.e. example.com/products/widget2009 would
invoke the products menu and the widget2009 static page).
I expect these pages to
Ok thank you for your responses. I would try this out but not at the
office now... what about __init__.py in the project's root directory?
Right now I am trying this all on the Django development server. So
let's say on my production server I have /home/ryan/projects/llcom/
trunk/lib (all svn:exte
I used svn propset svn:external so my project (in transition to
another developer when I return to college) can easily use the most
recent version fo Django (and comment_utils, etc). How can I ensure
that the project uses that django module instead of the one found
on /.../python2.X/site-packages
For all your testing needs http://www.softwareqatest.com/qatweb1.html
On Jan 2, 2:58 pm, mamcxyz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wonder what tool let me to do web load & stress testing with this
> options:
>
> - Run on Windows, test target are windows & solaris
> - Simulate diferent users,
I have a simple functions that pulls objects from the database that
are between a date range:
def get_sp_from_date_range(start_date, end_date, order=False):
s_products = ScheduledProduct.objects.filter(start__gt=start_date)
s_products = s_products.filter(finish__lt=end_date)
if order:
Nevermind on this.
--~--~-~--~~~---~--~~
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, send email to [EMAIL PROTECTE
Hello. I want to use the pytz package. It has a tzinfo objects called
pytz.UTC that it recommends you store as the general timezone. Is
there a way for Django to set the tz to pytz.UTC whenever it deals
with datetimes?
Thanks,
Ryan Kaskel
--~--~-~--~~~---~--~~
You
<[EMAIL PROTECTED]>
wrote:
> Ryan K wrote:
> > What is the best way to serve static media and only letting certain
> > users (using django.contrib.auth) download that data?
>
> > Thanks,
> > Ryan Kaskel
>
> http://blog.lighttpd.net/articles/2006/07/02/x
What is the best way to serve static media and only letting certain
users (using django.contrib.auth) download that data?
Thanks,
Ryan Kaskel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Thanks a lot. Missed save_FOO_file in the docs.
On Dec 18, 12:52 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Dec 18, 2007 12:08 PM, Ryan K <[EMAIL PROTECTED]> wrote:
>
> > def save(self, user):
> > if user != self.scheduled_produ
Just to make the question a little more clear:
What type of object does model.FileType expect to get?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
I am trying to allow certain users to upload media and then "attach"
it via the contenttypes framework. The code posted below just puts the
contents of the file in the media field. How do I make this work with
the model.FileField? (putting it in the settings.MEDIA_ROOT+upload_to
directory?) This i
Try the Django book
http://www.djangobook.com/en/beta/chapter09/#s-create-update-delete-generic-views.
On Dec 5, 7:56 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
> Hello,
> I'm looking for an example on how to use the
> django.views.generic.create_update.create_object generic view (with
> new
I have a model called a course that when created needs to insert
several classes (another model) into the schedule model. Is it best to
override the course's save method or use the dispatcher? Is there any
difference for this use case?
Thanks,
Ryan Kaskel
--~--~-~--~~~
On Nov 28, 10:40 am, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Nov 28, 2007 10:12 AM, Ryan K <[EMAIL PROTECTED]> wrote:
>
> > I have a basic registration form for my site that has fields for a
> > postal code, state and a country. Since our site caters
I have a basic registration form for my site that has fields for a
postal code, state and a country. Since our site caters to
international users, I only want to require a state and postal code
only if the country is the United States. I have a clean_country
method in my form that raises a Validat
Hi. When there is a server error (error 500 returns) the template
context processors don't seem to be doing anything (not passed to the
template).
I have this template context processor:
import llcom.settings
def site_context(request):
""" Add URL prefixes from settings file to request cont
Hi. When there is a server error (error 500 returns) the template
context processors don't seem to be doing anything (not passed to the
template).
I have this template context processor:
import llcom.settings
def site_context(request):
""" Add URL prefixes from settings file to request cont
Perfect! Thanks.
On Oct 25, 2:20 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On 10/25/07, Ryan K <[EMAIL PROTECTED]> wrote:
>
> > Why can't I change the User's name like so:
>
> > results[0].user.name = 'Brian'
> > r
For example, I have to basic models:
class User(models.Model):
name = models.CharField(max_length=30)
class AlterEgo(models.Model):
nickname = models.CharField(max_length=30)
user = models.ForeignKey(User)
I do a lookup for a User named 'Ryan' and one object is found.
results
For example, I have to basic models:
class User(models.Model):
name = models.CharField(max_length=30)
class AlterEgo(models.Model):
nickname = models.CharField(max_length=30)
user = models.ForeignKey(User)
I do a lookup for a User named 'Ryan' and one object is found.
results
Ok thank you! I've taken care of the superfluous code and thought it
was something silly I was missing. Thanks!
On Sep 25, 11:25 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > if not request.GET.get('avatarkey',''):
> > raise Http404
> > elif len(request.GET['avatarkey']
from django.http import HttpResponse, Http404
from django.template import RequestContext
from django.shortcuts import render_to_response
def verify_sl(request):
if request.method == 'GET':
if not request.GET.get('avatarkey',''):
raise Http404
elif len(request.GET[
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/django/core/handlers/
base.py", line 77, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/llcom/projects/llcom/makeav/views.py", line 231, in
create_avatar
return rend
You are correct Nis...in
django.utils.translation.trans_real.to_locale. No idea why the two
need be any different...
On Sep 13, 10:02 am, Nis Jørgensen <[EMAIL PROTECTED]> wrote:
> Ryan K skrev:> Hi. I have a few languages I've translated my site into. They
> all work
&
Yesafter checking the Django sources I saw that zh_CN is where
the .po .mo files should go.
On Sep 13, 10:02 am, Nis Jørgensen <[EMAIL PROTECTED]> wrote:
> Ryan K skrev:> Hi. I have a few languages I've translated my site into. They
> all work
> > except Simplifie
Anyone? I have the site translated and working in Spanish, French,
Italian and Russian yet simplified Chinese does not work. Any clues?
This is my first attempt at internationalization.
On Sep 11, 10:11 pm, Ryan K <[EMAIL PROTECTED]> wrote:
> Hi. I have a few languages I've tran
Ok...nevermind. Jake is righttemplate context processors are my
friend. Thanks!
On Sep 12, 10:06 am, Ryan K <[EMAIL PROTECTED]> wrote:
> Ok...so how do I pass my 'site_context' dictionary (which is just a
> dict with URL prefixes in it for static media) to the default
Ok...so how do I pass my 'site_context' dictionary (which is just a
dict with URL prefixes in it for static media) to the default 404
handler?
On Sep 12, 4:24 am, Collin Grady <[EMAIL PROTECTED]> wrote:
> You don't need a custom 404 handler in order to use RequestContext -
> the default handler a
ttp://www.djangoproject.com/documentation/templates_python/#writing-...
>
> -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 on many different URLs,
> > this includes CSS fil
Hi. I have a few languages I've translated my site into. They all work
except Simplified Chinese. Any hints as to why?
This is in my settings file:
LANGUAGES = (
('es', ugettext('Spanish')),
('fr', ugettext('French')),
('it', ugettext('Italian')),
('ru', ugettext('Russian')),
Hi. All URLs in my templates are preceded by variables I added to the
settings file so I could easily deploy my site on many different URLs,
this includes CSS file URLs. When the custom error 404 page comes up,
there is obviously no style because I can't pass the setting to it. Is
there a way to h
Have you tried restarting the web server?
Arnold Chen wrote:
> Dear all,
>
> I am experiencing some situation that is very strange. the development
> site is http://alberta.design97.com
>
> This site is django-powered, it is up sometimes, on some computers,
> you can visit this site for a preview
Hi. I have certain settings about the locations of static files (like
CSS files) that I need to pass to the 404 page so it can render
properly. How do I go about doing this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Sorry about that. I figured out what the problem was. It seems like
that usually happens AFTER I post to a newsgroup. Anyway, thanks!
On Aug 16, 12:19 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 8/16/07, Ryan K <[EMAIL PROTECTED]> wrote:
>
> > I am using
I am using Django 0.96 and I am getting this error. Any ideas as to
why?
Thanks,
Ryan
--~--~-~--~~~---~--~~
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@googlegr
I have a log that I want to generate reports from. It is an access log
where each row represents a "hit." One of the columns in the table is
a key and each user has a unique key. Is there a way using Django's
database API to get the count of distinct keys so I can get the number
of unique users?
Note - I know that I am not using a parameter and it's much easier to
do that (I was searching without having created the form yet so this
slipped my mind). But how would you capture something like "red fox"
in a URLconf pattern?
On Jun 28, 2:46 pm, Ryan K <[EMAIL PROTECTED]
Hi. I'm trying to setup an re pattern for /search in my URL conf. How
can I match an entire string like "red fox" e.g.
http://example.com/django/search/red%20fox?
I noticed that Google replaces their query parameter q's spaces with
'+'s using Javascript. Is that a better way to go?
Thanks.
--~
up for the documentation (which has gotten
better though).
On Jun 27, 6:45 pm, Ryan K <[EMAIL PROTECTED]> wrote:
> Right but I'm using the Django server included with the package for
> development and Apache for another. So the root of my test server is /
> mydjangosite, bu
gt; deployed:
> Instead of "http://example.com/mydjangosite/manage/manage"; I would
> just do "/mydjangosite/manage/manage"
>
> On Jun 27, 2:41 pm, Ryan K <[EMAIL PROTECTED]> wrote:
>
> > What if I am using generic views?
>
> > On Jun 27, 3:26 pm, Ryan K
What if I am using generic views?
On Jun 27, 3:26 pm, Ryan K <[EMAIL PROTECTED]> wrote:
> Perfect. Thanks.
>
> On Jun 27, 12:40 pm, Thomas Steinacher <[EMAIL PROTECTED]> wrote:
>
> > Try the {% url %}
> > tag:http://www.djangoproject.com/documentation/temp
Perfect. Thanks.
On Jun 27, 12:40 pm, Thomas Steinacher <[EMAIL PROTECTED]> wrote:
> Try the {% url %}
> tag:http://www.djangoproject.com/documentation/templates/#url
>
> tom
>
> On Jun 27, 2007, at 6:33 PM, Ryan K wrote:
>
>
>
> > What is the best form
What is the best form of a link in my Django site's templates? For
example, I have a base.html which serves as the base template for all
others. It contains links that are relative to the current directory
like Manage. However, when I am at a page like
http://example.com/mydjangosite/manage/edit/2
On Apr 29, 4:26 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-04-29 at 03:47 +0000, Ryan K wrote:
> > Hi all...quick question. If I have the auth app enabled, is the user
> > object automatically exposed to templates used with generic views? I
> > w
Hi all...quick question. If I have the auth app enabled, is the user
object automatically exposed to templates used with generic views? I
want to display a login link if no one is logged in and a logout link
if a user is.
Thanks,
Ryan
--~--~-~--~~~---~--~~
You re
On Apr 10, 8:32 pm, "Brian Beck" <[EMAIL PROTECTED]> wrote:
> On Apr 10, 8:31 pm, "Brian Beck" <[EMAIL PROTECTED]> wrote:
>
> > I'm not sure, but it might be that tildes aren't valid URL characters.
> > Web browsers have to violate the spec in order to support this thanks
> > to someone screwing
On Apr 10, 8:08 pm, "ryan k" <[EMAIL PROTECTED]> wrote:
> Hi. My django project lies in my public_html so I access my website
> throughhttp://209.xxx.xxx.xx/~ryan/django-project. Do I have to do
> anything special because of the tilde?
>
> Using the URLconf defin
Hi. My django project lies in my public_html so I access my website
through http://209.xxx.xxx.xx/~ryan/django-project. Do I have to do
anything special because of the tilde?
Using the URLconf defined in kitabu.urls, Django tried these URL
patterns, in this order:
1. ^/~ryan/django-project/
74 matches
Mail list logo