Re: How to disable security hash in django comments

2011-06-06 Thread Ján Vorčák
Thank you for your response,

I didn't want to disable crsf token. I wanted to disable django
comment's security_hash
I managed to do that overriding comment's forms.py

:)

On Jun 6, 4:38 pm, Ivo Brodien <i...@brodien.de> wrote:
> search for csfr excempt decorator.
>
> On Jun 6, 2011, at 4:35 PM, Ján Vorčák wrote:
>
> > Hi,
>
> > I'd like to ask you about one problem.
> > I need to remove security hash django comments module. I need to allow
> > posting to my app from external application just by posting the post
> > request.
> > How can I do that? Is there any way to disable this "security hash"
> > protection?
>
> > Thank you
>
> > --
> > 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 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
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.



How to disable security hash in django comments

2011-06-06 Thread Ján Vorčák
Hi,

I'd like to ask you about one problem.
I need to remove security hash django comments module. I need to allow
posting to my app from external application just by posting the post
request.
How can I do that? Is there any way to disable this "security hash"
protection?



Thank you

-- 
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.



Django foreign key attribute in the model

2011-05-04 Thread Ján Vorčák
Hi,

I'd like to ask you for some help :)

I have a model with one foreign key


from django.contrib.auth.models import User



class Task(models.Model):
...
submitter = models.ForeignKey(User, related_name='submitter')
...

def get_user_link(self):
return "%(name)s" %
{ 'id' : ???, 'name' : self.submitter }

get_user_link.allow_tags = True

And I user get_user_link to display link to user profile from
administration,
I just don't know how can I access attribute of the ForeignKey value,
for instance id of user (submitter) in order to display it's url

Thank you for your time

-- 
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: website path

2011-04-20 Thread Ján Vorčák
Hi,

Thank you for your answer

Here's my httpd.conf


SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
PythonOption django.root /django-application
PythonDebug On
PythonPath "['/root/xvorcak_dir/django/mysite/'] + sys.path"


and here's part of my urls.py

   (r'^$', 'tasks.views.index'),
# task CRUD
(r'^tasks/new', 'tasks.views.new'),
(r'^tasks/add', 'tasks.views.add'),



(r'^submittions$', 'tasks.views.submittions'),
(r'^mytasks', 'tasks.views.mytasks'),

(r'^accounts/login/$', 'django.contrib.auth.views.login',
{'template_name': 'login.html'}),

Thank you so much

On Apr 20, 4:26 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote:
> 2011/4/19 Ján Vorčák <vorcak@gmail.com>:
>
> > I've installed a django on my server (running on apache), but I've
> > configured it to run using url like
> >www.mydomain.com/django-application/
>
> > Now when I access some url from django using absolute url it
> > automatically redirects me to
> >www.mydomain.com/someapplication
> > instead of
> >www.mydomain.com/django-application/someapplication
>
> This sounds like a problem I've seen when using Django under
> mod_python -- are you using mod_python?
>
> Either way, can you share your Apache config and the relevent
> URLconfs? It's hard to figure out what's wrong without all the
> details.
>
> Jacob

-- 
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: website path

2011-04-19 Thread Ján Vorčák
Hi
Thank you for your response

Yeah I've already read that,
But in urls.py I have to explicitly say that my url is like django-
application/someaplication
My point is that I want to avoid writing django-application inside
each url (+ in the template Link


On Apr 19, 11:03 pm, Jeff Blaine  wrote:
> I imagine you need to configure your urls.py
>
> I suggest going through the whole tutorial, starting at the following page.
>  This is all
> explained there.
>
> http://docs.djangoproject.com/en/1.3/intro/tutorial01/

-- 
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.



website path

2011-04-19 Thread Ján Vorčák
Hi,

I've installed a django on my server (running on apache), but I've
configured it to run using url like
www.mydomain.com/django-application/

Now when I access some url from django using absolute url it
automatically redirects me to
www.mydomain.com/someapplication
instead of
www.mydomain.com/django-application/someapplication

Sorry for such a stupid question, but I really can't figure out what's
wrong and where should I configure this behaviour. (settings.py?
apache?)

Thank you

-- 
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.