I would like to use HTTP_REFERER in my Django project to find out from
where users came to my website. So, my first page is INDEX.HTML that
uses
def Index(request) procedure.
In this def Index(request) I use
request.META['REMOTE_ADDR']
but I found out that Referer does not work.
HTTP_REFERER is e
Hello everyone!
I've approached Django and Python from a few time and i love them
both.
As i am newbie i have a noobish question. My problem is: i have to
store a Resource object splitted in two tables as following:
class Resource(models.Model):
title = models.CharField(maxlength=100)
i've been checking out hosts for myself, and the already mentioned
www.webfaction.com seems to be very good.
i haven't chosen yet, but their team seems to be very friendly and I
have had some _weird_ requests myself and they were very helpfull.
but most hosting do have fastCGI, and that works.
O
I think you need some relations.
You can have a look at http://www.djangoproject.com/documentation/models/
and choose the best model for your problem
L.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
Pythoni napisał(a):
> I would like to use HTTP_REFERER in my Django project to find out from
> where users came to my website. So, my first page is INDEX.HTML that
> uses
> def Index(request) procedure.
> In this def Index(request) I use
> request.META['REMOTE_ADDR']
> but I found out that Refere
Hi,
i'm using the following template tag in my application:
@register.inclusion_tag('gallery/flv.html')
def flv(movie, width=320, height=160):
"""
"""
fl = FlashMovie()
return {
'flv_player': fl.get_flvplayer(),
'movie': '%s/%s' % (fl.get_upload_url(), movie),
hi,
i am creating a very simple board and wanted to add a method to my
models which would check if there are any new posts in a thread /
forum for a given user.. for this to work .. i obviously need the
currently logged in user in my models ..
but i didn't want to iterate through all my models i
Yes, most of the hostings have fastCGI, but not flup.
I know the best is to have VPS hosting, but they are very expensive,
and I think I can manage with a shared hosting.
I think Blouehost looks good.
On 17 feb, 11:32, "ashwoods" <[EMAIL PROTECTED]> wrote:
> i've been checking out hosts for mysel
for rendering you should use BoundField...
I use something like this...
for s in :
name = 'stay_' + str( s.id )
bf = BoundField( self, self.fields[name], name )
output.append( u'%s' % bf )
On 2/17/07, Rubic <[EMAIL PROTECTED]> wrote:
>
> Hi, I'm th
This doesn't seem very clean to me...
I also need to have logged-in user available in my models, so I have
written a custom middleware that stores the user in thread_locals:
import threading
_thread_locals = threading.local()
def get_current_user():
return getattr( _thread_locals, 'user', No
Hi Giuseppe,
On 2/17/07, Giuseppe Franchi <[EMAIL PROTECTED]> wrote:
>
> Hello everyone!
> I've approached Django and Python from a few time and i love them
> both.
> As i am newbie i have a noobish question. My problem is: i have to
> store a Resource object splitted in two tables as following:
>
On 2/17/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> hello,
>
> the tutorial on djangoproject.com explains how to set up views
> generating error pages for responses such as 404 or 500. is there a
> way to use mod_python functionality and make apache serve its own
> error pages? in case when it is run
altough i'm not sure if thread locals are that clean .. i guess it's a
better way ..
thanks .. i was searching for something like that .. i wonder why i
haven't found that site :(
it seems there are tons more documentation in the wiki as i've
thought ;)
cu,
herbert
On Feb 17, 3:22 pm, "Honza K
Now you can call anywhere in world for free
...hurry up...Its Globe 7..
you are paid to watch free videos(of your choice)...
Now its no. 1 VOIP service in the worldClick on the link
below...download the software, register for free and start calling
What are you waiting for now
Call any
www.prgmr.com seem to have affordable VPS hosting. but i agree, they
still offer less space and bandwidth than shared hosting.
konstantin
On Feb 17, 8:03 am, [EMAIL PROTECTED] wrote:
> Yes, most of the hostings have fastCGI, but not flup.
> I know the best is to have VPS hosting, but they are ve
I couldn't find any reference on passing parameters to a view method
from within a template. All I could find are some examples of passing
a single parameter to filter functions like:
{{ pub_date|date:"F j, Y" }}
Is there a way of doing this?
--~--~-~--~~~---~--~--
I feel the following should work:
class Myform(forms.Form):
...publ = forms.ChoiceField(label='Publisher', required=False)
and then in handler I should be able to set the choices dynamically
by:
def meth(request):
...frm=Myform(initial={'publ':((1,2),(2,3),(3,4)))}) #even if the
brackets are wro
On 2/17/07, paulh <[EMAIL PROTECTED]> wrote:
>
> I feel the following should work:
> class Myform(forms.Form):
> ...publ = forms.ChoiceField(label='Publisher', required=False)
>
> and then in handler I should be able to set the choices dynamically
> by:
>
> def meth(request):
> ...frm=Myform(initia
Ah-ha! I think I've found the issue.
The problem was coming from the template context loader I was using.
Or rather, how that was set in the settings.py file. I only had one
template context loader set, and forgot to include a trailing comma so
that it could be processed as a tuple instead of a s
On Feb 17, 7:05 pm, "paulh" <[EMAIL PROTECTED]> wrote:
> I feel the following should work:
> class Myform(forms.Form):
> ...publ = forms.ChoiceField(label='Publisher', required=False)
>
> and then in handler I should be able to set the choices dynamically
> by:
>
> def meth(request):
> ...frm=My
Hello,
i have set A that has many-to-many relationship with set B
currently admin interface (at least) forces me to select at least one
object from B if i add an object to A and the other way around. i do
not want that. i want to add an object to A which has no related
objects in B.
i need to h
On Sun, 2007-02-18 at 01:09 +, akonsu wrote:
> Hello,
>
> i have set A that has many-to-many relationship with set B
>
> currently admin interface (at least) forces me to select at least one
> object from B if i add an object to A and the other way around. i do
> not want that. i want to add
Jonathan Ballet wrote:
> I think, we might use the __str__() method, since it seems the
> simplest and cleanest way of doing this (a title is a sort of
> presentation in fact). Or maybe, we will stick with the get_title()
> method (or something like that ...)
Don't forget, either, that you can us
I have moved my folder from Windows to Linux. It works fine when I
try "python manage.py syncdb" on windows, exact same project code, in
linux is not working, when I do "python manage.py syncdb". This is
driving me crazy. I am getting following errors:
Error: Couldn't install apps, because the
It could be as simple as a PythonPath problem. Have you tried running
the offending code in the Python shell by using
python manage.py shell
to see if you can figure out what's going wrong?
On Sat, 2007-02-17 at 19:24 -0800, johnny wrote:
> I have moved my folder from Windows to Linux. It work
On Sat, Feb 17, 2007 at 04:41:46PM -, akonsu wrote:
>
> www.prgmr.com seem to have affordable VPS hosting. but i agree, they
> still offer less space and bandwidth than shared hosting.
>
www.slicehost.com has been treating me very well for VPS hosting.
$20/month for 256 MB RAM, 10 GB disk, 1
On a deployed django site, what url does Django use when scanning
urls.py when user browses to www.mysite.com ?
When I access my (non-django) site with
www.mysite.com
my host serves up the file that i see as html/index.html
If the polls tutorial is deployed to my host, does the mapping in
On 2/18/07, omat * gezgin.com <[EMAIL PROTECTED]> wrote:
>
> I couldn't find any reference on passing parameters to a view method
> from within a template. All I could find are some examples of passing
> a single parameter to filter functions like:
>
> {{ pub_date|date:"F j, Y" }}
>
>
> Is there a
On Sat, 2007-02-17 at 20:51 -0800, kbochert wrote:
> On a deployed django site, what url does Django use when scanning
> urls.py when user browses to www.mysite.com ?
>
>
> When I access my (non-django) site with
> www.mysite.com
> my host serves up the file that i see as html/index.html
On
Apparently is a random error, I use the svn version, and with one project it
works and with another don't, maybe is a PyDEV bug, but I don't know.
On 2/15/07, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote:
>
>
> Igor Guerrero wrote:
>
> > You must add the app dir and django dir to the PYTHON_PATH en
On Feb 17, 11:04 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-02-17 at 20:51 -0800, kbochert wrote:
> > On a deployed django site, what url does Django use when scanning
> > urls.py when user browses towww.mysite.com ?
>
> > When I access my (non-django) site with
> > www.my
Thanks for the clarification. I totally agree with your points on good
design. I was just curios...
mat
On Feb 18, 8:33 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 2/18/07, omat * gezgin.com <[EMAIL PROTECTED]> wrote:
>
>
>
> > I couldn't find any reference on passing parameters t
32 matches
Mail list logo