Sunday, January 1, 2012

Re: Expand FlatPage admin interface.

Thanks, 
I already seen that articles. The main problem I am having with trying to change the flatpage is that the flatpage is already registered. so I cant re-register with a new admin modal. I have an error :
 
All I want to do is that when I access the FlatPage I would like to have an aditional fields there.
 
Thanks,
Elad

On Sun, Jan 1, 2012 at 10:27 PM, Timothy Makobu <makobu.mwambiriro@gmail.com> wrote:
https://docs.djangoproject.com/en/1.3/releases/1.0-porting-guide/#the-admin

On Sun, Jan 1, 2012 at 9:59 PM, Elad Zucker <elad.zucker@gmail.com> wrote:
I am learning Django using the book "Practical Django Project". This isn't such an old book but seems to be very out-dated in terms of django. it Uses the old admin interface which I assume was replaced in version 1.0.
 
To make a long story short, one of the example of the book is to add a keyword items to a flatpage model. this is done by doing somthing like that :
page = models.ForeignKey(FlatPage, edit_inline=models.STACKED,....)
 
Now, I am trying to do the same using the new admin interface but with no luck. I can use admin.StackedInline but how do I associate it with the flatpage model ?
 
Hope I am clear here.
 
Thanks,
Elad

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

Sample Application for using Google Docs API

Hi ,

I'm working on a web application and want to integrate Google docs with that. Being new to Django and Web app, I'm finding it difficult to understand the documentation provided for using Google Docs API . Is there any sample application that I can refer to for the same.

~Kapil

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

Re: Need help in renaming template tags

Just bumping this up in case anyone can help. 

Thanks,
Harshil

On Mon, Dec 26, 2011 at 7:31 PM, CareerDhaba tech <tech@careerdhaba.com> wrote:
Hey everyone,

I am running into an issue where two third party apps easy_thumbnail and sorl_thumbnail are using the custom template tag called thumbnail. Hence, I am actually unable to use the tag at all. I would like to change it so that the template tag from sorl_thumbnail is renamed as sorl_thumbnail. A similar issue has cropped up before over on SO, but it hasn't been resolved. See here: http://bit.ly/sE64Tb

I have created a templatetags module within one of my apps, and have tried a simple way to rename a registered tag as such: 

from django import template
from sorl.thumbnail.templatetags import thumbnail 

register = template.Library()

def do_sorl_thumbnail(parser, token):
return thumbnail(parser, token)
register.tag('sorl_thumbnail', do_sorl_thumbnail)

Do I need to write a compile function and a render function for this? Any help on this would be great. 

Thanks,
Harshil


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

Re: Apache RewriteRule for django

Hi Bob Kline,

May be that this link help you:
http://teago.futuria.com.br/tip/4/

Tiago

On Mon, Jan 2, 2012 at 12:39 AM, Bob Kline <bkline@rksystems.com> wrote:
> I'm moving a django site to a shared hosting server, where I'll need
> to use fastcgi (the site on the original server is using mod_python,
> which isn't available on the shared hosting server).  I have found the
> instructions for setting this up, but it's not working.  I'm getting
> "The requested URL /appname/appname.fcgi/admin was not found on this
> server" (I'm using "appname" instead of the real name). The rewrite
> rule is:
>
> RewriteRule ^(.*)$ appname.fcgi/$1 [QSA,L]
>
> In light of this rule, which is taken straight from the Django Book,
> I'm not surprised by the error message.  All the other RewriteRules
> I've seen/used in the past put the requested resource in the query
> parameter; for example, Drupal uses
>
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
>
> which makes sense: Apache will load index.php and pass it "q=what-you-
> asked-for" but in the rule given above for django the forward slash in
> the replacement string is going to cause Apache to look for something
> that doesn't exist, instead of appname.fcgi, which does exist.
>
> Please tell me what I'm missing!
>
> Thanks!
>
> --
> 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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>

--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
Tiago de Souza Moraes                       Skype & Gtalk teagom
Enviroment Linux                                 Debian and Ubuntu
Public profile
http://www.linkedin.com/pub/tiago-souza-moraes/32/130/599

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

Apache RewriteRule for django

I'm moving a django site to a shared hosting server, where I'll need
to use fastcgi (the site on the original server is using mod_python,
which isn't available on the shared hosting server). I have found the
instructions for setting this up, but it's not working. I'm getting
"The requested URL /appname/appname.fcgi/admin was not found on this
server" (I'm using "appname" instead of the real name). The rewrite
rule is:

RewriteRule ^(.*)$ appname.fcgi/$1 [QSA,L]

In light of this rule, which is taken straight from the Django Book,
I'm not surprised by the error message. All the other RewriteRules
I've seen/used in the past put the requested resource in the query
parameter; for example, Drupal uses

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

which makes sense: Apache will load index.php and pass it "q=what-you-
asked-for" but in the rule given above for django the forward slash in
the replacement string is going to cause Apache to look for something
that doesn't exist, instead of appname.fcgi, which does exist.

Please tell me what I'm missing!

Thanks!

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

Re: django-admin.py startproject will NOT work.

At 2012-01-01 14:23:50 -0800, Chris Kavanagh wrote:
> On Jan 1, 4:44 am, Bart Nagel <b...@tremby.net> wrote:
> > At 2012-01-01 01:12:27 -0800, Chris Kavanagh wrote:
> >
> > > On Dec 31 2011, 7:13 pm, Bart Nagel <b...@tremby.net> wrote:
> > > > When I run that I get
> > > > 3 arguments: ['args.py', 'startproject', 'mysite']
> >
> > > > Paste your own output.
> >
> > > I get the same as you:
> >
> > > C:\Python27\Scripts>python args.py startproject mysite
> > > 3 arguements: ['args.py', 'startproject', 'mysite']
> >
> > What's with the spelling error?
>
> LOL, well apparently I don't know how to spell 'argument'.
>
> However, I still got the same output as you (except for correct
> spelling).
>
> What exactly were we (you) looking for in this test??

I explained that in a previous post. Afraid I can't help you any
further, though I'm glad you eventually got it working.

--bart

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

Re: Creating clean URLS

On 01/02/2012 07:53 AM, lankesh87 wrote:
> I want my url to be free from parameters being passed.
>
> I have handled the request in "twitter_after_auth" function of view
> and
>
> I am redirecting user to the new url "http://localhost/create_cr/"
>
> but instead the url shows some additional parameters that I have
> already handled.
>
> something like below:-
>
> "http://localhost/create_cr/?
> oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"
>
> I just want my url to be of something like below:-
>
> "http://localhost/create_cr/"
>
> please help..
>

What kind of redirect are you issuing (i.e. what is the HTTP status
code)? Some kinds of redirects will command the browser to pass GET/POST
parameters to the new URL since those redirect is meant to be issued
when the request failed to be processed here but can be processed in the
new URL.

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