Re: Why does Django think my browser doesn't except cookies?

2009-10-27 Thread Grant Livingston
I wouldn't be surprised if this is a bug in IE =/

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: If search string contains a number ... Do this ...

2009-10-23 Thread Grant Livingston
What about using pythons regular expression module (re) ? Example,
if re.search("\d", "Search query 2 search"):
# Do this.
else:
# Do this instead.

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: starting a project in windows xp

2009-10-20 Thread Grant Livingston
Python add's itself to your path by default right? If not, it would be much
more convenient just adding python to your path so you could just say
"python" instead of the full path to the exe...

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Use one project for a blog, forums, and custom application?

2009-10-17 Thread Grant Livingston
Try setting the SESSION_COOKIE_DOMAIN setting to something like ".mysite.com
"

So, in settings.py

SESSION_COOKIE_DOMAIN = ".mysite.com"

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Grant Livingston
This wouldn't work?

def view(request):
if request.user.theme = "blue":
   template = "app/blue/template.html"
elif request.user.theme = "yellow":
   template = "app/yellow/template.html"

return render_to_response(template)

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Apply decorator to view functions in third-party apps?

2009-10-13 Thread Grant Livingston
This wouldn't work?

def view(request):
if request.user.theme = "blue":

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: My Django powered website for web based learning

2009-09-27 Thread Grant Livingston
Same here..

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Design question: User vs. UserProfile

2009-09-18 Thread Grant Livingston
I'm still making my first site with django so I don't how much weight my
opinion has, but I used a seperate profile for ForeignKeys. I don't know
why, it just seemed logical at the time. It is easer as you can refer to
whats in a users profile easier. You can put things like {{
song.profile.user.username }} or {{ song.profile.song_set }} .

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---