Using cmemcache - not a good idea?

2009-09-01 Thread Ryan Mark
not also been monitoring memcached while load testing. Anybody have anything to add to this? Ryan Mark -- Ryan Mark http://ryan-mark.com 847 691 8271 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: [Solved] Re: Make dev server respond on multiple IPs?

2009-09-01 Thread Ryan Mark
I've got some screwy DNS stuff going on on my local machine and need >> the development server to respond to requests on two IP addresses at >> once (127.0.0.1 and 192.168.1.7).  Is there any way to wrangle that? >> >> Thanks! > &

submit logins over SSL

2009-03-25 Thread Ryan Kelly
checks for non-local URLs and simply ignores them. Does anyone have advice for setting up this little redirect dance? Or is Django trying to steer me towards a better way of securing logins that I'm just not aware of? Thanks, Ryan -- Ryan Kelly http://www.rfk.id.au | This

Re: Sending large, generated files

2009-04-14 Thread Ryan Kelly
start_response() before processing any of the response body - my understanding is that this should cause the headers to be sent immediately. Have you tried this under mod_wsgi? Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk

Re: Sending large, generated files

2009-04-14 Thread Ryan Kelly
start_response from sending the headers. Nevertheless, I'd be interested to hear if different deployment options affect the behaviour of your examples. Cheers, Ryan -- Ryan Kelly http://www.rfk.id.au | This message is digitally signed. Please visit r...@rfk.id.au| http://www.

Re: Best way to get a proxy model instance from a base class instance

2009-04-20 Thread Ryan Kelly
d): return user return None def get_user(self,user_id): try: return ProxyUser.objects.get(pk=user_id) except ProxyUser.DoesNotExist: return None Cheers, Ryan -- Ryan Kelly http://www.rfk.id.

ValueError on deleting a model object with an ImageField through Admin Interface

2010-05-13 Thread ryan west
r, and this error pops up. Any thoughts on why? I have tried with & without my custom delete function, with the same results. Help would be appreciated, thanks. Ryan # ProjectImage Model def get_project_image_path(instance, filename): return os.path.join('projects', insta

Re: ValueError on deleting a model object with an ImageField through Admin Interface

2010-05-13 Thread ryan west
I found the solution to my own problem. When the page was reloading, I am guessing that the actual entity had not been deleted yet, and the method __unicode__(self) was being called, requesting access of self.image (which did not exist, because that HAD been deleted). A simple modification to the

Django Project & App Structure

2010-05-13 Thread ryan west
So, I apologize for another topic focused on Django project and app structure, but every resource I've found is either outdated or incomplete. What I am trying to accomplish is the creation & incorporation of pluggable django applications that are NOT dependent in ANY way on the project that uses

Re: Django Project & App Structure

2010-05-14 Thread ryan west
Hey Scott, thanks for the reply! I just figured that out the hard way actually, but I appreciate your response. My new directory structure now looks like: /home/website/djangoprojects/mydjangoproject/ --- / manage.py ---

Installing 3rd party django applications on a shared environment

2010-05-18 Thread ryan west
unning, but still no success. Is there any way to do this? It seems like overkill that I would have to have my own installation of python running just to get 3rd party apps to work, considering I can get mine going great. Thanks in advance! Ryan -- You received this message because you are sub

Re: Installing 3rd party django applications on a shared environment

2010-05-18 Thread ryan west
Thanks Tom, I'll have a look at that. Ryan > > Google for virtualenv. > > Cheers > > Tom > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us

Re: Installing 3rd party django applications on a shared environment

2010-05-18 Thread ryan west
Hey Tom, Any idea why ./activate would be failing "Permission Denied"? 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-us...@googlegroups.com. To unsubscribe from this

Re: No stylesheet in administration panel

2010-05-18 Thread ryan west
Just a django noob, but are you sure that the path for media is set correctly in your settings.py file? For instance, my media settings look like: MEDIA_ROOT = '/home/ryanisnan/ryanwest.info/public/media' MEDIA_URL = '/media/' ADMIN_MEDIA_PREFIX = '/media/' It could be that your MEDIA_ROOT are s

Inline formsets

2010-07-19 Thread Ryan Osborn
7;:ladder,'formset':formset}) return render_to_response('ladder/challenge.html',context) ladder/challenge.html {% extends "base.html" %} {% block title %}Ladder Challenge{% endblock %} {% block content %} {% csrf_token %} {{formset}} {% endblock %} I would be very grat

Re: Multiple URLs, Common View

2010-07-19 Thread Ryan Osborn
You could try using this as your pattern: (?P[a-zA-Z0-9-]+) Ryan On Jul 19, 1:03 am, Phil Edwards wrote: > On 18/07/2010 23:55, Phil Edwards wrote: > > > > > -begin- > > def servePage(request): > > if request.path[1:] == '': > > th

Re: django mailing list app

2010-07-19 Thread Ryan Osborn
How about this? http://www.freehackers.org/thomas/2010/04/03/announcing-colibri-10-alpha1-a-mailing-list-manager-with-a-django-based-web-interface/ Ryan On Jul 18, 10:34 am, James Hancock wrote: > I am looking for an app that can manage subscriptions to a mailing list for > a web ap

Re: filter users by full name

2010-07-22 Thread Ryan LeTulle
Why wouldn't you simply? User.objects.filter(firstname="John", lastname="Doe") On Thu, Jul 22, 2010 at 4:01 PM, Scott Gould wrote: > It won't work because there's no database column that corresponds to > the full name. > > A simple but limited alternative would be to split the string on " "

Re: filter users by full name

2010-07-22 Thread Ryan LeTulle
O sorry, I took it that he was just trying to match both the first and last name in the admin model. (i.e. 2 fields) On Thu, Jul 22, 2010 at 4:24 PM, Shawn Milochik wrote: > On Thu, Jul 22, 2010 at 5:20 PM, Ryan LeTulle wrote: > > Why wouldn't you simply? > > >

Re: filter users by full name

2010-07-22 Thread Ryan LeTulle
actually meant the _users_ model http://docs.djangoproject.com/en/dev/topics/auth/ On Thu, Jul 22, 2010 at 4:27 PM, Ryan LeTulle wrote: > O sorry, I took it that he was just trying to match both the first and last > name in the admin model. (i.e. 2 fields) > > > > > &

Re: Inline formsets

2010-07-23 Thread Ryan Osborn
Can anyone help with this? 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-us...@googlegroups.com. To unsubscribe from this group, send email to django-user

Select widget options

2010-08-04 Thread Ryan Osborn
7;] widgets = {'result': forms.RadioSelect(), 'date': AdminDateWidget()} The select widget shows the returned value from the User models __unicode__ method, which is their username. I want to change this to display get_full_name. Is there an easy way to do this? Thanks

Re: absolute url in template and url name

2010-11-24 Thread ryan west
if you have a view let's say views.activate that corresponds to the URL at let's say /account/activate/2, you can use the template tag {% url views.activate params_for_url_capturing %} Cheers On Nov 24, 8:01 am, robos85 wrote: > Hi, > I'm writing an email sending module based on on templates. I

SQL modulus using QuerySet API

2010-01-12 Thread Ryan Nowakowski
I have a model that has an IntegerField. I'd like to filter only the even integers. sqlite has a modulus operator so I can do: select * from mytable where my_int = my_int % 2 However, I'd like to use the QuerySet API to do this instead of resorting to SQL. Any ideas or hints? Tha

Re: SQL modulus using QuerySet API

2010-01-12 Thread Ryan Nowakowski
On Tue, Jan 12, 2010 at 01:40:50PM -0800, Daniel Roseman wrote: > On Jan 12, 9:29 pm, Ryan Nowakowski wrote: > > I have a model that has an IntegerField.  I'd like to filter only the > > even integers.  sqlite has a modulus operator so I can do: > > > >   se

getting a view function from a view name

2010-02-18 Thread Ryan Mark
Any thoughts as to how I could get the view function from a url name? Is there something like django.core.urlresolvers.resolve() that takes a url name and returns a view function? Thanks! -- Ryan Mark -- You received this message because you are subscribed to the Google Groups "Django

Empty urls.py file and {% url %} tags

2007-06-25 Thread Ryan Kanno
I know this isn't big (and maybe it's by design), but this didn't happen prior to I believe -r 5516. If you have a empty urls.py include file in any app within the project, it causes the {% url %} tag to not resolve for any app, even an unrelated app view. The exception returned is somewhere nea

Best way to link to other pages in templates

2007-06-27 Thread Ryan K
(e.g. Manage) for my links or is there a better way? 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@googlegroups.com To u

Re: Best way to link to other pages in templates

2007-06-27 Thread Ryan K
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

Re: Best way to link to other pages in templates

2007-06-27 Thread 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

Re: Best way to link to other pages in templates

2007-06-27 Thread Ryan K
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, but for my deployment server its /~ryan/...etc..etc I just put a LINK_PREFIX string in the top settings module and a wrapper function

Re: Best way to link to other pages in templates

2007-06-27 Thread Ryan K
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

Searching for strings and URLconfs

2007-06-28 Thread Ryan K
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. --~

Re: Searching for strings and URLconfs

2007-06-28 Thread Ryan K
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]

Distinct rows by a column field?

2007-08-01 Thread Ryan K
distinct method does not accept a column argument (why?)? Is there a cleaner way to do this? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

'dict' object has no attribute 'rindex'

2007-08-16 Thread Ryan K
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 dj

Re: 'dict' object has no attribute 'rindex'

2007-08-16 Thread Ryan K
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

Extra_context for 404 pages?

2007-09-10 Thread Ryan K
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

Many Django checkouts, setting which one to use (PYTHONPATH perference)

2008-01-07 Thread ryan k
r/lib/python2.5/site-packages/django/__init__.pyc' Any help is greatly appreciated! Thanks, Ryan Kaskel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Many Django checkouts, setting which one to use (PYTHONPATH perference)

2008-01-07 Thread ryan k
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/ trun

Re: Many Django checkouts, setting which one to use (PYTHONPATH perference)

2008-01-08 Thread Ryan Kaskel
Graham Dumpleton wrote: > On Jan 8, 8:50 am, ryan k <[EMAIL PROTECTED]> wrote: >> 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

'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-03-30 Thread Ryan Vanasse
I'm sorry for writing at such an early, clueless time in my learning process (both with python and django) but this problem appears to be in code I didn't write and I'm not sure what the best way to work around this problem is. I'm sorry for not having lurked more to understand the norms of this g

Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-03-30 Thread Ryan Vanasse
I just commented out the ordering, and it's bringing up the same error. When I try looking at the Events list (to check if anything was added), and got a Template syntax error. (see below) I used an SQLite admin program to check out what was in the calendar_Events table and found nothing. I have

Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-04-01 Thread Ryan Vanasse
am, "Erik Vorhes" <[EMAIL PROTECTED]> wrote: > That's because the table storing your information doesn't have an > "EventDate" field, and it can't be ordered by something that doesn't > exist. You'll need to update the table before it will work c

Re: 'module' object has no attribute 'day_abbr' --Problem editing using Admin

2008-04-02 Thread Ryan Vanasse
;s one of those "duh" things but it's really useful to me when I'm just starting out. Again, thanks! ryan On Apr 2, 1:08 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 2, 2008 at 1:18 AM, Ryan Vanasse <[EMAIL PROTECTED]> > wrote: > &g

Way to show recently updated items from multiple apps?

2008-04-07 Thread Ryan Vanasse
ndering if there is an easy way to implement this so I can have a list that is contains the most recently updated items from multiple apps. Thank you, Ryan Vanasse --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &qu

'HttpResponse' object has no attribute 'rindex' error on 0.96

2008-04-18 Thread Ryan Vanasse
novEvents = Event.objects.filter(start_DateTime__month = 11) decEvents = Event.objects.filter(start_DateTime__month = 12) eventsByMonth = {'january':janEvents, 'february':febEvents, 'march':marEvents, 'april':aprEvents, 'may':

Re: 'HttpResponse' object has no attribute 'rindex' error on 0.96

2008-04-19 Thread Ryan Vanasse
I should have known it was something that simple. Thank you Malcolm. ryan On Apr 19, 1:44 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-04-18 at 23:15 -0700, Ryan Vanasse wrote: > > [...] > > > My urls.py looks like this (I'm just getting started

Looking at objects by year, month

2008-04-28 Thread Ryan Vanasse
e a way to insert the key (i.e. 'january'...see the eventsByMonth in my view above) in the image source where I presently have {{ month }}? I'm sorry for thinking about things in such convoluted ways. I'm trying to keep things simpler, but it is a learning process. Thanks

Re: Looking at objects by year, month

2008-05-01 Thread Ryan Vanasse
ave it as is. when I switch to months it doesn't pop an exception (though I'm still working on making it show my data.) Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Looking at objects by year, month

2008-05-02 Thread Ryan Vanasse
I got my data to populate mostly alright. The key was changing the template example to "{% for month in months.values %}" it wasn't working before that. Now, my problem is that for every month, I want a different color of image text... //blue/orange swap so that on even months i'd have them com

ifnotequal strange behavior--

2008-05-04 Thread Ryan Vanasse
er have? (I originally used it because i figured that the two DateTime objects wouldn't have the same Time, and so would evaluate to not being equal) Is there any way to get this working the way I envision it? Thanks for your time and patience. ryan vanasse --~--~-~--~~--

Re: Looking at objects by year, month

2008-05-11 Thread Ryan Vanasse
I ended up using the "divisibleby" filter and that worked out fine. Thank you for both of your ideas! I learn so much through this group. Thank you very much. Ryan Vanasse On May 2, 9:27 pm, Pawel Pilitowski <[EMAIL PROTECTED]> wrote: > Maybe something like this would hel

Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
() arg 2 must be a class, type, or tuple of classes and types Running it using manage.py shell works fine. Doing a... print Card.objects.all() ...works fine either way. I've set my sys.path and DJANGO_SETTINGS_MODULE correctly. Ideas? Thanks, Ryan --~--~-~--~~---

Re: [SOLVED] Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
On Thu, Jul 10, 2008 at 04:07:47PM -0500, Ryan Nowakowski wrote: > > Hey Folks, > > I'm using trunk. When I run this using python (without manage.py)... > > card = Card(serial='0749FT266F') > > ...I get this error: > > Traceback (most recent cal

Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread Ryan Alexander
I've gotten pretty much everything else done, but I can't figure out how to tell mod_python where my django install directory is. The current directory is /opt/perfmanager but I can't figure out what to do past that. I've tried changing the path to contain those directories but it's still not fi

Re: Help with mod_python and apache2 on Edgy Ubuntu with Django 0.95.1

2007-03-07 Thread Ryan Alexander
do you mean that you have a separate > installation that you want to use? > > konstantin > > On Mar 7, 10:56 am, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: > > I've gotten pretty much everything else done, but I can't figure out > > how to

Connection reset by peer error on POST content longer than about 6k chars...

2007-03-13 Thread Ryan Alexander
Function in question: http://dpaste.com/6787/ Simply put, this is a little client program that goes out to the Django server, which tells it which URLS to test and how many times to hit them. It'll average the results, then return the timing info, along with the HTML generated by the render (it

Detect ajax request

2007-04-10 Thread Ryan Kanno
ax-example-part-1 ie http://website.com/some/request/?xhr and in my view, dump out json accordingly, etc, but I was wondering if there was a standard way without attaching a key (perhaps looking at a request header). Thanks, Ryan --~--~-~--~~~---~--~~ You rec

Anything special needed in URLconf for tilde?

2007-04-10 Thread ryan k
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

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread ryan k
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

Re: Anything special needed in URLconf for tilde?

2007-04-10 Thread ryan k
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

Re: Detect ajax request

2007-04-11 Thread Ryan Kanno
Ahh... that's what I was missing. Thanks, Nathan (as I'm also using jQuery). :) On Apr 10, 6:23 pm, "Nathaniel Whiteinge" <[EMAIL PROTECTED]> wrote: > I've been happily using limodou's suggestion with the jQuery framework > for a few weeks, hopefully whatever framework you're using also sends >

How can I order foreign key items presented in the admin?

2007-04-13 Thread Ryan Alexander
So I have the following bit of model code: class SuitetoTest(models.Model): runorder = models.IntegerField(core=True) test = models.ForeignKey(Test) suite = models.ForeignKey(Suite, edit_inline=models.TABULAR, num_in_admin=10) So the SuitetoTest model shows up in the Suite admin page

Re: How can I order foreign key items presented in the admin?

2007-04-13 Thread Ryan Alexander
m_in_admin=10) > class Meta: > ordering = ("runorder",) > > On Apr 13, 12:17 pm, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: > > So I have the following bit of model code: > > > > class SuitetoTest(models.Model): > > runor

Choice newforms field not auto updating...

2007-04-13 Thread Ryan Alexander
I've got this little bit of code in my Views.py file: def get_suite_choices(): for suite in Suite.objects.all().order_by('title'): yield (suite.id, suite.title) class StartSuiteForm(Form): suite = ChoiceField(choices=get_suite_choices()) username = CharField('username',widget

How do I get to select multiple options in the admin without resorting to another model? (Django 0.96)

2007-04-17 Thread Ryan Alexander
Here's the code: (it's in models.py) from django.db import models from django.newforms import forms, widgets from datetime import datetime # Create your models here. WEEKDAY_CHOICES = ( (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5,

Doctest isn't running (0.96)

2007-04-19 Thread Ryan Alexander
Here's the code at the top of my models.py file: from django.db import models from django.newforms import forms, widgets from datetime import datetime # Create your models here. WEEKDAY_CHOICES = ( (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'

Re: Doctest isn't running (0.96)

2007-04-19 Thread Ryan Alexander
thing be not recognized. I'm a dork. On 19/04/07, Ryan Alexander <[EMAIL PROTECTED]> wrote: > Here's the code at the top of my models.py file: > > from django.db import models > from django.newforms import forms, widgets > from datetime import datetime > # Creat

Re: Doctest isn't running (0.96)

2007-04-19 Thread Ryan Alexander
here """ failed. On 19/04/07, Michael K <[EMAIL PROTECTED]> wrote: > > > > On Apr 19, 10:17 am, Michael K <[EMAIL PROTECTED]> wrote: > > On Apr 19, 9:03 am, "Ryan Alexander" <[EMAIL PROTECTED]> wrote: >

Newforms edit with custom form

2007-04-23 Thread Ryan Kanno
s, retrieve the instance object the form refers to, and overwrite data from the form into the instance, then update. I'm just wondering if this what others have been doing? Seems cludgy to me. :) Thanks, Ryan --~--~-~--~~~---~--~~ You received this message be

Named URL patterns to use prefix?

2007-04-24 Thread Ryan Kanno
I'm just curious if named URL patterns will be able to use the prefix given (or if there's any reason not to) ie, urlpatterns += patterns('my_pattern', url(r'^(?P[\d]+)/$', 'details', name="my-details"), Right now, I have to pass into url the following: url

Re: Named URL patterns to use prefix?

2007-04-25 Thread Ryan Kanno
Already a ticket? Shoot, I swore I searched, but I couldn't find one. Sorry about that - my apologies. (http://code.djangoproject.net/ticket/4129) _RK On Apr 24, 6:32 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-04-24 at 15:21 +, Ryan Kanno wrote: > &

User and generic views

2007-04-28 Thread Ryan K
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: User and generic views

2007-04-29 Thread Ryan K
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

Re: SOMETIMES mod_python error

2007-09-11 Thread Ryan K
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

404 Page Help

2007-09-11 Thread Ryan K
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

Only Simplified Chinese translation not working?

2007-09-11 Thread Ryan K
27;, ugettext('Italian')), ('ru', ugettext('Russian')), ('zh-cn', ugettext('Simplified Chinese')), ) And the .po and .mo files are under the zh-cn directory (in locale). The user can set his or her language setting by using the

Ordering of admin form fields when using edit_line?

2007-09-11 Thread Ryan Shaw
Hello, I have an admin form with two edit_inline sections. I would like to be able to specify the order in which they appear. How can I do this? Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: 404 Page Help

2007-09-11 Thread Ryan K
HttpResponseNotFound(t.render(RequestContext(request, custom_dict))) That code works but it seems ugly. I have a feeling I am managing my static media incorrectly. On Sep 11, 7:17 pm, jake elliott <[EMAIL PROTECTED]> wrote: > hi ryan, > > how about a context processor? > > h

Re: 404 Page Help

2007-09-12 Thread Ryan K
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

Re: 404 Page Help

2007-09-12 Thread Ryan K
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

Re: Only Simplified Chinese translation not working?

2007-09-12 Thread Ryan K
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

Re: Only Simplified Chinese translation not working?

2007-09-13 Thread Ryan K
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

Re: Only Simplified Chinese translation not working?

2007-09-13 Thread Ryan K
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 &

Strange error from get_and_delete_messages?

2007-09-18 Thread Ryan K
rs.py", line 17, in auth return { AttributeError: 'tuple' object has no attribute 'get_and_delete_messages' I have Psyco enableddo you suspect this is what is causing the problem? Thanks, Ryan --~--~-~--~~~---~--~~ You received

View didn't return an HttpResponse object?

2007-09-25 Thread Ryan K
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[

Re: View didn't return an HttpResponse object?

2007-09-25 Thread Ryan K
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']

Re: Check if user is a member of group in template

2007-10-09 Thread Ryan Kanno
I think you're looking for something like this: http://www.djangosnippets.org/snippets/282/ On Oct 9, 3:22 am, äL <[EMAIL PROTECTED]> wrote: > Inhttp://code.djangoproject.com/wiki/CookBookRequiredGroupLoginI > found how > to show a template only if the user is in a specific group (admin). > > No

Help understanding the DB API

2007-10-25 Thread Ryan K
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 objec

Help understanding the DB API

2007-10-25 Thread Ryan K
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 objec

Re: Help understanding the DB API

2007-10-25 Thread Ryan K
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

Server error/Template Context processors

2007-11-06 Thread Ryan K
ango.core.context_processors.media', ) 'static_prefix' is where my media is. But when a 500 error occurs, the 'static_prefix' (as well as 'link_prefix') settings aren't making it to the template and style sheets are applied. 404 errors are fine. Any reason for this? T

Server error/Template Context processors

2007-11-06 Thread Ryan K
ango.core.context_processors.media', ) 'static_prefix' is where my media is. But when a 500 error occurs, the 'static_prefix' (as well as 'link_prefix') settings aren't making it to the template and style sheets are applied. 404 errors are fine. Any reason for this? T

Newforms error question

2007-11-28 Thread Ryan K
ors should clearly be marked and not something generic at the top. Thanks, Ryan Kaskel --~--~-~--~~~---~--~~ 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

Re: Newforms error question

2007-11-28 Thread Ryan K
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

Use dispatcher or override model's save method?

2007-11-29 Thread Ryan K
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 K

Re: create_object generic view exampe

2007-12-05 Thread Ryan K
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

FileField and form.save()

2007-12-18 Thread Ryan K
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

Re: FileField and form.save()

2007-12-18 Thread Ryan K
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

<    1   2   3   4   5   6   >