Re: How install django in windows

2013-11-15 Thread Swaroop Shankar V
Hello Anuradha,

If you do a google search there are lots of tutorials covering this
information all over net. Basically you first need to install python
version < 3. Install python pip.  Make sure that the windows environment is
properly configured.  Then from your cmd type pip install django. Django
should be installed.

The above steps are just an overview of the installation. If you require
more details i would suggest you checking out:
https://code.djangoproject.com/wiki/WindowsInstall

If you have an option to install Linux,  then I would suggest you to use
linux for django development. Its very easy to setup and configure django
on a linux than on a windows machine.

Thanks and Regards,
Swaroop Shankar V
On Nov 16, 2013 9:53 AM, "Anuradha Nair" <anuradha.n...@gmail.com> wrote:

> Hi,
>
> I am new to django and i want to install it in my windows system.
> Can any one give step by step instructions?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bc7fc27a-5429-42fd-8415-707bcd97831f%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGG6gSMuRtBTs0mDshaLgeJNhUAT6GEe%2BDk%2B0rzdgkv-7gyE8A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-Classifieds image upload issue

2012-11-26 Thread Swaroop Shankar V
Any help please..thanks

On Nov 25, 2012 3:34 PM, "Swaroop Shankar V" <swaroo...@gmail.com> wrote:
>
> Hello All,
> I am trying to create a classifieds for my sites using django
calssifieds. When ever I try to upload files from the user side, am getting
the error
>
> OSError at /classifieds/create/edit/5/
>
> [Errno 2] No such file or directory
>
> Request Method:
> POST
> Request URL:
> http://localhost:8000/classifieds/create/edit/5/
> Django Version:
> 1.3.4
> Exception Type:
> OSError
> Exception Value:
>
> [Errno 2] No such file or directory
>
> Exception Location:
> /usr/lib/python2.7/subprocess.py in _execute_child, line 1259
> Python Executable:
> /usr/bin/python2.7
> Python Version:
> 2.7.3
>
> I have been pulling my hairs for the past few days due to this issue. I
am not able to understand what causes this issue. Could someone help .
Traceback link is http://dpaste.com/836288/
>
> Thanks and Regards,
> Swaroop Shankar V
>
>
>

-- 
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: Ecommerce Solution

2012-10-03 Thread Swaroop Shankar V
Hi All,
I was checking out different option and found django-oscar interesting and
it is frequently updated too. Have anyone tried it out? What is your take
on that project? Is it worth a try?

Thanks and Regards,
Swaroop Shankar V



On Thu, Aug 30, 2012 at 5:06 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> Mario, is it possible to integrate LFS with an existing django project?
> Also is there any method to import the data from my existing satchmo
> installation to LFS?
>
> Swaroop Shankar V
>
>
>
>
> On Mon, Aug 27, 2012 at 10:31 PM, Mario Menezes <mo.mene...@gmail.com>wrote:
>
>> LFS is another option. Lightning Fast Shop is the promise in the name :-)
>>
>> www.getlfs.com
>>
>> Disclaimer: I'm not affiliate with LFS; we've used it for a project (
>> www.qmaterial.com.br) that is not a ecommerce, but has a significant
>> number of similar features (except ecommerce) that using a ecommerce
>> solution was the obvious solution.
>>
>> Best regards,
>>
>> Mário Menezes
>>
>>
>> Em domingo, 26 de agosto de 2012 17h03min25s UTC-3, Swaroop Shankar
>> escreveu:
>>
>>> Hi All,
>>> Previously I had asked similar question on this group and decided to go
>>> with Satchmo. After the implementation it turned out to be bit difficult to
>>> maintain since the system do not provide much plugin or customization
>>> support. So am thinking of implementing another ecommerce solution. The
>>> system am looking for is an app which I can use with my existing site. Also
>>> It would be better if the system would support a mechanism to migrate the
>>> existing data from satchmo. I checked few but almost every project lacks
>>> proper documentation. So is there any django ecommerce project that have
>>> good documentation and easy to integrate?
>>>
>>> Thanks and Regards,
>>>
>>> Swaroop Shankar V
>>>
>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/_GQrKjmFzTYJ.
>>
>> 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.
>>
>
>

-- 
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: Ecommerce Solution

2012-08-30 Thread Swaroop Shankar V
Mario, is it possible to integrate LFS with an existing django project?
Also is there any method to import the data from my existing satchmo
installation to LFS?

Swaroop Shankar V



On Mon, Aug 27, 2012 at 10:31 PM, Mario Menezes <mo.mene...@gmail.com>wrote:

> LFS is another option. Lightning Fast Shop is the promise in the name :-)
>
> www.getlfs.com
>
> Disclaimer: I'm not affiliate with LFS; we've used it for a project (
> www.qmaterial.com.br) that is not a ecommerce, but has a significant
> number of similar features (except ecommerce) that using a ecommerce
> solution was the obvious solution.
>
> Best regards,
>
> Mário Menezes
>
>
> Em domingo, 26 de agosto de 2012 17h03min25s UTC-3, Swaroop Shankar
> escreveu:
>
>> Hi All,
>> Previously I had asked similar question on this group and decided to go
>> with Satchmo. After the implementation it turned out to be bit difficult to
>> maintain since the system do not provide much plugin or customization
>> support. So am thinking of implementing another ecommerce solution. The
>> system am looking for is an app which I can use with my existing site. Also
>> It would be better if the system would support a mechanism to migrate the
>> existing data from satchmo. I checked few but almost every project lacks
>> proper documentation. So is there any django ecommerce project that have
>> good documentation and easy to integrate?
>>
>> Thanks and Regards,
>>
>> Swaroop Shankar V
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/_GQrKjmFzTYJ.
>
> 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.
>

-- 
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: Ecommerce Solution

2012-08-30 Thread Swaroop Shankar V
Thanks Alex for your suggestion. I went through the documents for
django-shop and i could see that they are not directly supporting some
features like variation, payment gateway etc. Even if i plan to write the
plugins for that myself, I would like to know if there is any method to
import data from my existing satchmo installation.

Swaroop Shankar V



On Mon, Aug 27, 2012 at 4:39 PM, Alec Taylor <alec.tayl...@gmail.com> wrote:

> Well there's Django-Shop
>
> On Mon, Aug 27, 2012 at 8:38 PM, Swaroop Shankar V <swaroo...@gmail.com>
> wrote:
> > Hi Alec,
> > Cartridge is the one you mean I guess, but after going through the
> document
> > it seems i will require to install Mezzanine too. I was looking for an
> app
> > which i can use with my existing project and also with some good
> > documentation.
> >
> > Thanks and Regards,
> > Swaroop Shankar V
> >
> >
> >
> > On Mon, Aug 27, 2012 at 2:37 AM, Alec Taylor <alec.tayl...@gmail.com>
> wrote:
> >>
> >> Mezzanine?
> >>
> >> On Mon, Aug 27, 2012 at 6:03 AM, Swaroop Shankar V <swaroo...@gmail.com
> >
> >> wrote:
> >> > Hi All,
> >> > Previously I had asked similar question on this group and decided to
> go
> >> > with
> >> > Satchmo. After the implementation it turned out to be bit difficult to
> >> > maintain since the system do not provide much plugin or customization
> >> > support. So am thinking of implementing another ecommerce solution.
> The
> >> > system am looking for is an app which I can use with my existing site.
> >> > Also
> >> > It would be better if the system would support a mechanism to migrate
> >> > the
> >> > existing data from satchmo. I checked few but almost every project
> lacks
> >> > proper documentation. So is there any django ecommerce project that
> have
> >> > good documentation and easy to integrate?
> >> >
> >> > Thanks and Regards,
> >> >
> >> > Swaroop Shankar V
> >> >
> >> > --
> >> > 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.
> >>
> >> --
> >> 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.
> >>
> >
> > --
> > 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.
>
> --
> 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.
>
>

-- 
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: Ecommerce Solution

2012-08-27 Thread Swaroop Shankar V
Hi Alec,
Cartridge is the one you mean I guess, but after going through the document
it seems i will require to install Mezzanine too. I was looking for an app
which i can use with my existing project and also with some good
documentation.

Thanks and Regards,
Swaroop Shankar V



On Mon, Aug 27, 2012 at 2:37 AM, Alec Taylor <alec.tayl...@gmail.com> wrote:

> Mezzanine?
>
> On Mon, Aug 27, 2012 at 6:03 AM, Swaroop Shankar V <swaroo...@gmail.com>
> wrote:
> > Hi All,
> > Previously I had asked similar question on this group and decided to go
> with
> > Satchmo. After the implementation it turned out to be bit difficult to
> > maintain since the system do not provide much plugin or customization
> > support. So am thinking of implementing another ecommerce solution. The
> > system am looking for is an app which I can use with my existing site.
> Also
> > It would be better if the system would support a mechanism to migrate the
> > existing data from satchmo. I checked few but almost every project lacks
> > proper documentation. So is there any django ecommerce project that have
> > good documentation and easy to integrate?
> >
> > Thanks and Regards,
> >
> > Swaroop Shankar V
> >
> > --
> > 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.
>
> --
> 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.
>
>

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



Ecommerce Solution

2012-08-26 Thread Swaroop Shankar V
Hi All,
Previously I had asked similar question on this group and decided to go
with Satchmo. After the implementation it turned out to be bit difficult to
maintain since the system do not provide much plugin or customization
support. So am thinking of implementing another ecommerce solution. The
system am looking for is an app which I can use with my existing site. Also
It would be better if the system would support a mechanism to migrate the
existing data from satchmo. I checked few but almost every project lacks
proper documentation. So is there any django ecommerce project that have
good documentation and easy to integrate?

Thanks and Regards,

Swaroop Shankar V

-- 
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: Accessing current URI from template tag

2012-06-08 Thread Swaroop Shankar V
Thanks Bruno, will check that.

Thanks and Regards,
Swaroop Shankar V



On Wed, Jun 6, 2012 at 2:59 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

> On Jun 6, 10:27 am, Swaroop Shankar V <swaroo...@gmail.com> wrote:
> > Hello All,
> >
> > Well my question is on how to get the current URI in a template tag.
>
> You'll have to use a RequestContext in the views rendering the
> templates where you use this templatetag, and activate the
> django.core.context_processors.request context processor. Then it's
> just a matter of passing either the whole context or just the request
> (or even just the request URI) to you template tag.
>
>
>
> --
> 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.
>
>

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



Accessing current URI from template tag

2012-06-06 Thread Swaroop Shankar V
Hello All,

I would like to create a template tag which when called from the template
will automatically get the current URI and do the necessary logical stuffs.
Well my question is on how to get the current URI in a template tag. Hope
someone got a solution to it.

Thanks and Regards,

Swaroop Shankar V

-- 
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: Storing Sorl-thumbnail created images in separate folder

2012-04-30 Thread Swaroop Shankar V
Okay in the latest version every images generated is getting saved to
cache. My issue is resolved. Thanks all for your kind help :)

Thanks and Regards,
Swaroop Shankar V



On Tue, May 1, 2012 at 1:24 AM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> It looks like i was using an old version which came with satchmo. Am
> currently testing my project with new version.
>
> Thanks and Regards,
> Swaroop Shankar V
>
>
>
> On Tue, May 1, 2012 at 12:59 AM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>> It looks like the latest version of solr-thumnails or the version that i
>> have currently installed supports THUMBNAIL_STORAGE. When i checked i
>> could see a file under the path solr/thumbnail called defaults.py. In this
>> file there are following options
>>
>> DEBUG = False
>> BASEDIR = ''
>> SUBDIR = ''
>> PREFIX = ''
>> QUALITY = 85
>> CONVERT = '/usr/bin/convert'
>> WVPS = '/usr/bin/wvPS'
>> EXTENSION = 'jpg'
>> PROCESSORS = (
>> 'sorl.thumbnail.processors.colorspace',
>> 'sorl.thumbnail.processors.autocrop',
>> 'sorl.thumbnail.processors.scale_and_crop',
>> 'sorl.thumbnail.processors.filters',
>> )
>> IMAGEMAGICK_FILE_TYPES = ('eps', 'pdf', 'psd')
>>
>> which i guess can be overridden from the django settings file. Here there
>> is BASEDIR and SUBDIR and i guess those are the settings to be used but not
>> sure. When i tried to override the default i could see no change. So anyone
>> having experience in setting the same please let me know.
>>
>> Thanks and Regards,
>>
>> Swaroop Shankar V
>>
>>
>>
>>
>> On Mon, Apr 30, 2012 at 7:27 PM, Tiago Almeida <tiago.b.alme...@gmail.com
>> > wrote:
>>
>>> Have you tried changing the THUMBNAIL_STORAGE setting? I haven't done
>>> what you ask for but you should give it a try.
>>>
>>> http://thumbnail.sorl.net/reference/settings.html#thumbnail-storage
>>>
>>>
>>> Domingo, 29 de Abril de 2012 17:27:56 UTC+1, Swaroop Shankar escreveu:
>>>
>>>> Thanks Kelly, could you tell me what all settings you had provided for
>>>> it to cache into a separate directory?
>>>>
>>>> Thanks and Regards,
>>>> Swaroop Shankar V
>>>>
>>>>
>>>>
>>>> On Sun, Apr 29, 2012 at 8:09 PM, Kelly Nicholes <kelbolici...@gmail.com
>>>> > wrote:
>>>>
>>>>> It always just caches the files for me in a completely different
>>>>> directory.
>>>>>
>>>>> On Saturday, April 28, 2012 1:06:12 PM UTC-6, Swaroop Shankar wrote:
>>>>>>
>>>>>> Hello All,
>>>>>> I am using sorl-thumbnail extensively in my project. It works
>>>>>> perfectly fine except for one issue which is regarding the storage. The
>>>>>> default behaviour of sorl-thumbnail is to create the images in the same
>>>>>> folder where the original image is stored. Is it possible to provide
>>>>>> a separate location for storage of generated file rather than the source
>>>>>> folder? I could find a setting called THUMBNAIL_STORAGE, is it the one to
>>>>>> be used? I am not able to figure it out from the documentation. If yes 
>>>>>> then
>>>>>> should i provide the absolute or relative path?
>>>>>>
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Swaroop Shankar V
>>>>>>
>>>>>>   --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To view this discussion on the web visit https://groups.google.com/d/*
>>>>> *msg/django-users/-/Tfl7B7Xir_**gJ<https://groups.google.com/d/msg/django-users/-/Tfl7B7Xir_gJ>
>>>>> .
>>>>> 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<django-users%2bunsubscr...@googlegroups.com>
>>>>> .
>>>>> For more options, visit this group at http://groups.google.com/**
>>>>> group/django-users?hl=en<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 view this discussion on the web visit
>>> https://groups.google.com/d/msg/django-users/-/bh_2yiDPjF0J.
>>>
>>> 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.
>>>
>>
>>
>

-- 
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: Storing Sorl-thumbnail created images in separate folder

2012-04-30 Thread Swaroop Shankar V
It looks like i was using an old version which came with satchmo. Am
currently testing my project with new version.

Thanks and Regards,
Swaroop Shankar V



On Tue, May 1, 2012 at 12:59 AM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> It looks like the latest version of solr-thumnails or the version that i
> have currently installed supports THUMBNAIL_STORAGE. When i checked i
> could see a file under the path solr/thumbnail called defaults.py. In this
> file there are following options
>
> DEBUG = False
> BASEDIR = ''
> SUBDIR = ''
> PREFIX = ''
> QUALITY = 85
> CONVERT = '/usr/bin/convert'
> WVPS = '/usr/bin/wvPS'
> EXTENSION = 'jpg'
> PROCESSORS = (
> 'sorl.thumbnail.processors.colorspace',
> 'sorl.thumbnail.processors.autocrop',
> 'sorl.thumbnail.processors.scale_and_crop',
> 'sorl.thumbnail.processors.filters',
> )
> IMAGEMAGICK_FILE_TYPES = ('eps', 'pdf', 'psd')
>
> which i guess can be overridden from the django settings file. Here there
> is BASEDIR and SUBDIR and i guess those are the settings to be used but not
> sure. When i tried to override the default i could see no change. So anyone
> having experience in setting the same please let me know.
>
> Thanks and Regards,
>
> Swaroop Shankar V
>
>
>
>
> On Mon, Apr 30, 2012 at 7:27 PM, Tiago Almeida 
> <tiago.b.alme...@gmail.com>wrote:
>
>> Have you tried changing the THUMBNAIL_STORAGE setting? I haven't done
>> what you ask for but you should give it a try.
>>
>> http://thumbnail.sorl.net/reference/settings.html#thumbnail-storage
>>
>>
>> Domingo, 29 de Abril de 2012 17:27:56 UTC+1, Swaroop Shankar escreveu:
>>
>>> Thanks Kelly, could you tell me what all settings you had provided for
>>> it to cache into a separate directory?
>>>
>>> Thanks and Regards,
>>> Swaroop Shankar V
>>>
>>>
>>>
>>> On Sun, Apr 29, 2012 at 8:09 PM, Kelly Nicholes 
>>> <kelbolici...@gmail.com>wrote:
>>>
>>>> It always just caches the files for me in a completely different
>>>> directory.
>>>>
>>>> On Saturday, April 28, 2012 1:06:12 PM UTC-6, Swaroop Shankar wrote:
>>>>>
>>>>> Hello All,
>>>>> I am using sorl-thumbnail extensively in my project. It works
>>>>> perfectly fine except for one issue which is regarding the storage. The
>>>>> default behaviour of sorl-thumbnail is to create the images in the same
>>>>> folder where the original image is stored. Is it possible to provide
>>>>> a separate location for storage of generated file rather than the source
>>>>> folder? I could find a setting called THUMBNAIL_STORAGE, is it the one to
>>>>> be used? I am not able to figure it out from the documentation. If yes 
>>>>> then
>>>>> should i provide the absolute or relative path?
>>>>>
>>>>> Thanks and Regards,
>>>>>
>>>>> Swaroop Shankar V
>>>>>
>>>>>   --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To view this discussion on the web visit https://groups.google.com/d/**
>>>> msg/django-users/-/Tfl7B7Xir_**gJ<https://groups.google.com/d/msg/django-users/-/Tfl7B7Xir_gJ>
>>>> .
>>>> 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 <django-users%2bunsubscr...@googlegroups.com>.
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/django-users?hl=en<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 view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/bh_2yiDPjF0J.
>>
>> 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.
>>
>
>

-- 
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: Storing Sorl-thumbnail created images in separate folder

2012-04-30 Thread Swaroop Shankar V
It looks like the latest version of solr-thumnails or the version that i
have currently installed supports THUMBNAIL_STORAGE. When i checked i could
see a file under the path solr/thumbnail called defaults.py. In this file
there are following options

DEBUG = False
BASEDIR = ''
SUBDIR = ''
PREFIX = ''
QUALITY = 85
CONVERT = '/usr/bin/convert'
WVPS = '/usr/bin/wvPS'
EXTENSION = 'jpg'
PROCESSORS = (
'sorl.thumbnail.processors.colorspace',
'sorl.thumbnail.processors.autocrop',
'sorl.thumbnail.processors.scale_and_crop',
'sorl.thumbnail.processors.filters',
)
IMAGEMAGICK_FILE_TYPES = ('eps', 'pdf', 'psd')

which i guess can be overridden from the django settings file. Here there
is BASEDIR and SUBDIR and i guess those are the settings to be used but not
sure. When i tried to override the default i could see no change. So anyone
having experience in setting the same please let me know.

Thanks and Regards,

Swaroop Shankar V



On Mon, Apr 30, 2012 at 7:27 PM, Tiago Almeida <tiago.b.alme...@gmail.com>wrote:

> Have you tried changing the THUMBNAIL_STORAGE setting? I haven't done what
> you ask for but you should give it a try.
>
> http://thumbnail.sorl.net/reference/settings.html#thumbnail-storage
>
>
> Domingo, 29 de Abril de 2012 17:27:56 UTC+1, Swaroop Shankar escreveu:
>
>> Thanks Kelly, could you tell me what all settings you had provided for it
>> to cache into a separate directory?
>>
>> Thanks and Regards,
>> Swaroop Shankar V
>>
>>
>>
>> On Sun, Apr 29, 2012 at 8:09 PM, Kelly Nicholes 
>> <kelbolici...@gmail.com>wrote:
>>
>>> It always just caches the files for me in a completely different
>>> directory.
>>>
>>> On Saturday, April 28, 2012 1:06:12 PM UTC-6, Swaroop Shankar wrote:
>>>>
>>>> Hello All,
>>>> I am using sorl-thumbnail extensively in my project. It works perfectly
>>>> fine except for one issue which is regarding the storage. The default
>>>> behaviour of sorl-thumbnail is to create the images in the same folder
>>>> where the original image is stored. Is it possible to provide
>>>> a separate location for storage of generated file rather than the source
>>>> folder? I could find a setting called THUMBNAIL_STORAGE, is it the one to
>>>> be used? I am not able to figure it out from the documentation. If yes then
>>>> should i provide the absolute or relative path?
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Swaroop Shankar V
>>>>
>>>>   --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/Tfl7B7Xir_**gJ<https://groups.google.com/d/msg/django-users/-/Tfl7B7Xir_gJ>
>>> .
>>> 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 <django-users%2bunsubscr...@googlegroups.com>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<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 view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/bh_2yiDPjF0J.
>
> 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.
>

-- 
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: Storing Sorl-thumbnail created images in separate folder

2012-04-29 Thread Swaroop Shankar V
Thanks Kelly, could you tell me what all settings you had provided for it
to cache into a separate directory?

Thanks and Regards,
Swaroop Shankar V



On Sun, Apr 29, 2012 at 8:09 PM, Kelly Nicholes <kelbolici...@gmail.com>wrote:

> It always just caches the files for me in a completely different directory.
>
> On Saturday, April 28, 2012 1:06:12 PM UTC-6, Swaroop Shankar wrote:
>>
>> Hello All,
>> I am using sorl-thumbnail extensively in my project. It works perfectly
>> fine except for one issue which is regarding the storage. The default
>> behaviour of sorl-thumbnail is to create the images in the same folder
>> where the original image is stored. Is it possible to provide
>> a separate location for storage of generated file rather than the source
>> folder? I could find a setting called THUMBNAIL_STORAGE, is it the one to
>> be used? I am not able to figure it out from the documentation. If yes then
>> should i provide the absolute or relative path?
>>
>> Thanks and Regards,
>>
>> Swaroop Shankar V
>>
>>   --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Tfl7B7Xir_gJ.
> 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.
>

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



Storing Sorl-thumbnail created images in separate folder

2012-04-28 Thread Swaroop Shankar V
Hello All,
I am using sorl-thumbnail extensively in my project. It works perfectly
fine except for one issue which is regarding the storage. The default
behaviour of sorl-thumbnail is to create the images in the same folder
where the original image is stored. Is it possible to provide
a separate location for storage of generated file rather than the source
folder? I could find a setting called THUMBNAIL_STORAGE, is it the one to
be used? I am not able to figure it out from the documentation. If yes then
should i provide the absolute or relative path?

Thanks and Regards,

Swaroop Shankar V

-- 
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: URL regex not matching

2012-04-24 Thread Swaroop Shankar V
I changed to your regex and it works fine. Thanks a lot :)

Thanks and Regards,
Swaroop Shankar V



On Sun, Apr 22, 2012 at 2:37 PM, yati sagade <yati.sag...@gmail.com> wrote:

> I think that one also matches upto one whitespace character(space, tab or
> newline) within the username(The \s).
>
>
> On Sun, Apr 22, 2012 at 2:12 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>> Thanks a lot for your reply. I just found an regex from some blog which
>> is as follows
>>
>> (r'^user/([\w\'\.\-]+\s?[\w\'\.\-]+)/$','accounts.views.userProfile'),
>>
>> and this seems to be working fine. Have not tested all the use cases for
>> this regex, but anyway username with . (dot) is working fine now.
>>
>> Swaroop Shankar V
>>
>>
>>
>>
>> On Sun, Apr 22, 2012 at 2:02 PM, yati sagade <yati.sag...@gmail.com>wrote:
>>
>>> I'm not sure, but I think this should work - try it out and let us know.
>>>
>>> r'^user/([\w\-+.@]+)/$'
>>>
>>> I'm not too good with regexes, either. No one is. Also, characters like
>>> "+" are encoded in URLs - so you might want to think of that.
>>>
>>>
>>> On Sun, Apr 22, 2012 at 1:42 PM, Swaroop Shankar V 
>>> <swaroo...@gmail.com>wrote:
>>>
>>>> Hello All,
>>>> I need some urgent help with this one. Am trying to show a user profile
>>>> when the user navigates to a url of this format
>>>>
>>>> http://example.com/user/
>>>>
>>>> I have provided the following expression in my urls.py file
>>>>
>>>> (r'^user/(\w+)/$','accounts.views.userProfile'),
>>>>
>>>> this working fine for normal usernames, but if the user add a . (dot)
>>>> in between his username the url do not match with the regex and throws Page
>>>> not found error.
>>>>
>>>> Since the django username supports  Letters, digits and @/./+/-/_  i
>>>> want all these to be supported in my url. Could someone please help me to
>>>> construct the url. Am pretty weak in regex and it will take me sometime to
>>>> build a proper regex for the above url. Thanks
>>>>
>>>> Regards,
>>>>
>>>> Swaroop Shankar V
>>>>
>>>>  --
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> Yati Sagade <http://twitter.com/yati_itay>
>>>
>>> Twitter: @yati_itay <http://twitter.com/yati_itay>
>>>
>>> Organizing member of TEDx EasternMetropolitanBypass
>>> http://www.ted.com/tedx/events/4933
>>>
>>> https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869
>>>
>>>
>>>  --
>>> 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.
>>>
>>
>>  --
>> 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.
>>
>
>
>
> --
> Yati Sagade <http://twitter.com/yati_itay>
>
> Twitter: @yati_itay <http://twitter.com/yati_itay>
>
> Organizing member of TEDx EasternMetropolitanBypass
> http://www.ted.com/tedx/events/4933
>
> https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869
>
>
>  --
> 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.
>

-- 
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: URL regex not matching

2012-04-22 Thread Swaroop Shankar V
Thanks a lot for your reply. I just found an regex from some blog which is
as follows

(r'^user/([\w\'\.\-]+\s?[\w\'\.\-]+)/$','accounts.views.userProfile'),

and this seems to be working fine. Have not tested all the use cases for
this regex, but anyway username with . (dot) is working fine now.

Swaroop Shankar V



On Sun, Apr 22, 2012 at 2:02 PM, yati sagade <yati.sag...@gmail.com> wrote:

> I'm not sure, but I think this should work - try it out and let us know.
>
> r'^user/([\w\-+.@]+)/$'
>
> I'm not too good with regexes, either. No one is. Also, characters like
> "+" are encoded in URLs - so you might want to think of that.
>
>
> On Sun, Apr 22, 2012 at 1:42 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>> Hello All,
>> I need some urgent help with this one. Am trying to show a user profile
>> when the user navigates to a url of this format
>>
>> http://example.com/user/
>>
>> I have provided the following expression in my urls.py file
>>
>> (r'^user/(\w+)/$','accounts.views.userProfile'),
>>
>> this working fine for normal usernames, but if the user add a . (dot) in
>> between his username the url do not match with the regex and throws Page
>> not found error.
>>
>> Since the django username supports  Letters, digits and @/./+/-/_  i
>> want all these to be supported in my url. Could someone please help me to
>> construct the url. Am pretty weak in regex and it will take me sometime to
>> build a proper regex for the above url. Thanks
>>
>> Regards,
>>
>> Swaroop Shankar V
>>
>>  --
>> 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.
>>
>
>
>
> --
> Yati Sagade <http://twitter.com/yati_itay>
>
> Twitter: @yati_itay <http://twitter.com/yati_itay>
>
> Organizing member of TEDx EasternMetropolitanBypass
> http://www.ted.com/tedx/events/4933
>
> https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869
>
>
>  --
> 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.
>

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



URL regex not matching

2012-04-22 Thread Swaroop Shankar V
Hello All,
I need some urgent help with this one. Am trying to show a user profile
when the user navigates to a url of this format

http://example.com/user/

I have provided the following expression in my urls.py file

(r'^user/(\w+)/$','accounts.views.userProfile'),

this working fine for normal usernames, but if the user add a . (dot) in
between his username the url do not match with the regex and throws Page
not found error.

Since the django username supports  Letters, digits and @/./+/-/_  i want
all these to be supported in my url. Could someone please help me to
construct the url. Am pretty weak in regex and it will take me sometime to
build a proper regex for the above url. Thanks

Regards,

Swaroop Shankar V

-- 
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: Admin area hyperlinks to sub categories

2012-04-14 Thread Swaroop Shankar V
Hi Sandro,
Thanks for the link. It looks like you had provided the link to show
additional options in the action drop down on the list page. This is not
what am exactly looking for. I guess my question was not clear. I will try
to explain it in much better way:
1) I have 2 models called Categories and Books. The book have a foreign key
to Categories model, which means more than one book can be marked under a
category.
2) The user is presented with a Category link on the admin dashboard
3) When the user clicks on to it he is taken to a page where all the
Categories will be listed
4) The categories listed will be an hyperlinks
5) When the user clicks on to any one of the category then he is redirected
to another listing page where all books under that category will be
displayed. So if the cartegory is fiction then all the books which are
assigned under fiction will be displayed.

So how can i link a category to book listing page. I know that there is a
filter method that i can use in books listing page but i want to implement
above said approach. How can it be done? I hope i have made myself clear.

Thanks and Regards,

Swaroop Shankar V



On Wed, Apr 11, 2012 at 7:39 PM, Sandro Dutra <hexo...@gmail.com> wrote:

> more:
> https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/
>
>
> 2012/4/11 Sandro Dutra <hexo...@gmail.com>
>
>> # File: admin.py
>> from django.contrib import admin
>> from distribute.models import Categories
>> (...)
>> class CategoriesAdmin(admin.ModelAdmin):
>> list_display = ['category']
>> (...)
>> (...)
>> admin.site.register(Categories, CategoriesAdmin)
>> (...)
>>
>>
>> 2012/4/11 Swaroop Shankar V <swaroo...@gmail.com>
>>
>>> Hi,
>>> Could anyone provide me a solution please? Thanks
>>>
>>> Regards,
>>> Swaroop Shankar V
>>>
>>>
>>>
>>>
>>> On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V 
>>> <swaroo...@gmail.com>wrote:
>>>
>>>> Hi all,
>>>> I have 2 models one is Category and another one is Book. Books will
>>>> be assigned to a category. So on the admin area i want to display a link on
>>>> the dashboard which will take the user to a page where all the categories
>>>> will be listed. On clicking on to any of the category user should be taken
>>>> to a page where the books assigned under that category is displayed. How
>>>> can i accomplish the same.
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Swaroop Shankar V
>>>>
>>>>
>>>  --
>>> 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.
>>>
>>
>>
>  --
> 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.
>

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



Passing additional variables to flatpage template

2012-04-14 Thread Swaroop Shankar V
Hi All,

Am using flatpage app in my application. I want to send
few additional variables that can be accessible from the flatpage
templates. So how can i accomplish the same?

Thanks and Regards,

Swaroop Shankar V

-- 
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: Admin area hyperlinks to sub categories

2012-04-11 Thread Swaroop Shankar V
Hi,
Could anyone provide me a solution please? Thanks

Regards,
Swaroop Shankar V



On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> Hi all,
> I have 2 models one is Category and another one is Book. Books will
> be assigned to a category. So on the admin area i want to display a link on
> the dashboard which will take the user to a page where all the categories
> will be listed. On clicking on to any of the category user should be taken
> to a page where the books assigned under that category is displayed. How
> can i accomplish the same.
>
> Thanks and Regards,
>
> Swaroop Shankar V
>
>

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



Admin area hyperlinks to sub categories

2012-04-09 Thread Swaroop Shankar V
Hi all,
I have 2 models one is Category and another one is Book. Books will
be assigned to a category. So on the admin area i want to display a link on
the dashboard which will take the user to a page where all the categories
will be listed. On clicking on to any of the category user should be taken
to a page where the books assigned under that category is displayed. How
can i accomplish the same.

Thanks and Regards,

Swaroop Shankar V

-- 
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: Improving Site Performance

2012-04-09 Thread Swaroop Shankar V
Thanks Phang, I have not yet checked into the query caching in django. Will
check and will see if it would improve the performance. Thanks a lot for
your reply :)

Thanks and Regards,
Swaroop Shankar V



On Sat, Apr 7, 2012 at 4:04 PM, Phang Mulianto <braveh...@gmail.com> wrote:

> Well.. i think the lazy query is on action.
>
> The query executed to get the data from database to be use in your view,
> if you said requestContext(..)
>
> if you remove it, of course the data will not available in your
> view/template.
>
> To reduce the query executed everytime you call the page, try use query
> caching..
> one quick way without change code is use some cache like johnny-cache..it
> will automaticly cache your query and unvalidate it if your data changes.
>
> i used it to.. and try load your page more than once, you will see in the
> debug toolbar, the query is reduced in the second and next load...that is
> the cache in action..
>
> hope help..
>
>  On Thu, Apr 5, 2012 at 3:41 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>>  Hi All,
>> Am developing a site using django and it is almost ready to be launched.
>> Right now am trying to optimize the performance of the site. I have
>> installed the django debug toolbar and when i checked the number of queries
>> being exicuted on the homepage i could see there are 74 queries
>> being executed. On debugging I could see that most of the queries  are
>> through the context_instance=RequestContext(request) that am passing to a
>> view. When I removed it I could see the queries where reduced to 24, which
>> improved the performance, but I end up in an error
>>
>> Caught KeyError while rendering: 'request'
>>
>> this is happening because the homepage is rendering a custom template tag 
>> which requires the request object available (to access the currently logged 
>> in user details). So is there any way to avoid using 
>> context_instance=RequestContext(request) and still make the request object 
>> accessible in the custom template tag?
>>
>>
>>
>> Thanks and Regards,
>> Swaroop Shankar V
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

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



Improving Site Performance

2012-04-05 Thread Swaroop Shankar V
Hi All,
Am developing a site using django and it is almost ready to be launched.
Right now am trying to optimize the performance of the site. I have
installed the django debug toolbar and when i checked the number of queries
being exicuted on the homepage i could see there are 74 queries
being executed. On debugging I could see that most of the queries  are
through the context_instance=RequestContext(request) that am passing to a
view. When I removed it I could see the queries where reduced to 24, which
improved the performance, but I end up in an error

Caught KeyError while rendering: 'request'

this is happening because the homepage is rendering a custom template
tag which requires the request object available (to access the
currently logged in user details). So is there any way to avoid using
context_instance=RequestContext(request) and still make the request
object accessible in the custom template tag?

Thanks and Regards,
Swaroop Shankar V

-- 
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: Doubt regarding endless pagination

2012-04-02 Thread Swaroop Shankar V
Thank You, i changed show_pages.html instead of page_link.html. It worked
fine. Anyway thanks for pointing out where to change.

Regards,
Swaroop Shankar V



On Mon, Apr 2, 2012 at 5:10 PM, Blackpearl <zubair.f...@gmail.com> wrote:

> You can edit page_link.html for displaying like:
> <>
>
> "{{ page.label|safe }} | "
>
> --
> 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.
>
>

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



Doubt regarding endless pagination

2012-04-02 Thread Swaroop Shankar V
Hi All,
This question is regarding a django app called endless pagination. I want
to add a '|' in between the pagination numbers so that it will look like
<>

I went through the documents but could not figure out how to do this. If
anyone have already implemented something like this please tell me know the
method to implement the same. Thank You

Regards,

Swaroop Shankar V

-- 
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: problem with admin settings

2012-03-20 Thread Swaroop Shankar V
Sophia,
I created a project, and tired your settings.py file on that project. Did a
syncdb and everything is working perfectly fine at my end. As i said before
it looks like due to some reason the django_session table is not getting
created at your end. Instead of running syncdb from pycharm environment try
to do that from the terminal and check if that table is being created or if
there are not much important code in your project just zip it and send
over. Will try at my end and will update you.

Thanks and Regards,
Swaroop Shankar V



On Mon, Mar 19, 2012 at 11:03 PM, Sophia <b.mirshafie...@gmail.com> wrote:

> Of course I attach it, Thanks for helping Swaroop.
>
>
> On Sunday, March 18, 2012 9:25:12 PM UTC-7, Swaroop Shankar wrote:
>>
>> Sophia,
>> Could you please provide me with your settings.py file?
>> On Mar 19, 2012 4:04 AM, "Sophia" <b.mirshafie...@gmail.com> wrote:
>>
>>> Swaroop,
>>>
>>> I run sync.db this is what it shows after running sync.db :
>>>
>>> Creating tables ...
>>> Installing custom SQL ...
>>> Installing indexes ...
>>> No fixtures found.
>>>
>>> Process finished with exit code 0
>>>
>>> without any error, but it still doesn't work, would you please help me
>>> with it, I really stuck :(
>>>
>>>
>>> On Saturday, March 17, 2012 2:46:25 PM UTC-7, Swaroop Shankar wrote:
>>>>
>>>> Did you run the syncdb after enabling it? While doing a syncdb did you
>>>> encounter any errors? From the error it looks like django_session
>>>> table is not created.
>>>>
>>>> Thanks and Regards,
>>>> Swaroop Shankar V
>>>>
>>>>
>>>>
>>>> On Sun, Mar 18, 2012 at 3:07 AM, Sophia <b.mirshafie...@gmail.com>wrote:
>>>>
>>>>> Thank you for helping, I had enabled it. But I don't know what's wrong
>>>>> with it!
>>>>>
>>>>>
>>>>> On Saturday, March 17, 2012 2:23:10 PM UTC-7, Swaroop Shankar wrote:
>>>>>>
>>>>>> Sophia,
>>>>>> Please check if you have enabled the app 'django.contrib.sessions' in
>>>>>> your INSTALLED_APPS, if not do that and then do a syncdb, this issue 
>>>>>> should
>>>>>> be resolved.
>>>>>>
>>>>>> Thanks and Regards,
>>>>>> Swaroop Shankar V
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sun, Mar 18, 2012 at 2:41 AM, Sophia <b.mirshafie...@gmail.com>wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I'm trying to set my admin settings so I will get the web page
>>>>>>> asking for user name and password, I did all the settings that is needed
>>>>>>> and mentioned in the online django book(chapter6), but the page keep 
>>>>>>> giving
>>>>>>> me this error :
>>>>>>>
>>>>>>> Exception Type: DatabaseError  Exception Value:
>>>>>>>
>>>>>>> no such table: django_session
>>>>>>>
>>>>>>>
>>>>>>> this my settings.py what could be wrong with my code?
>>>>>>>
>>>>>>> DATABASES = {
>>>>>>> 'default': {
>>>>>>> 'ENGINE': 'django.db.backends.sqlite3',
>>>>>>> 'NAME': 'test.db',**
>>>>>>> 'USER': '',
>>>>>>> 'PASSWORD': '',
>>>>>>> 'HOST': '',
>>>>>>> 'PORT': '',
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>> Sophia
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Django users" group.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/**msg/django-users/-/**huWdNc8xUycJ<https://groups.google.com/d/msg/django-users/-/huWdNc8xUycJ>
>>>>>>> .
>>>>>>> To post to this group, send email to django-users@googlegroups.com.
>>>>>>> To unsubscribe from this group, send email to
>>>

Re: Trouble setting up website with mysql as backend

2012-03-19 Thread Swaroop Shankar V
Hello Clifford,
It was really nice of you to provide an insight into the non strict mode. I
agree to what you said regarding the length of the field. I was developing
the project using sqlite and since it was ready to go live i wanted to test
it using mysql in my local system. When i ran syncdb i was getting the
above said error and just for the sake of testing i changed the mode to non
strict. Am not planning the same for my production server. Once again
thanks a lot for your input. Cheers.

Thanks and Regards,

Swaroop Shankar V



On Mon, Mar 19, 2012 at 2:22 AM, CLIFFORD ILKAY
<clifford_il...@dinamis.com>wrote:

> On 03/17/2012 04:49 PM, Swaroop Shankar V wrote:
>
>> Hello All,
>> I was developing a website and the development was all done using sqlite
>> database. Now the development is almost complete so i need to test the
>> site using mysql. When i did a syncdb on a fresh database i got the
>> following error:
>>
> [snip]
>
>  _mysql_exceptions.Warning: Data truncated for column 'name' at row 1
>>
>> As you can see its a mysql warning since i had changed mysql mode to non
>> strict.
>>
>
> Hello,
>
> Others have already explained why this happened. Let me add that you
> should not run MySQL in non-strict mode. Django is actually saving you from
> creating junk data in this case but that would not necessarily be the case
> if you were to do insert or update operations on that same database with
> something other than Django.
>
> MySQL used to have a "feature", which I considered a bug, whereby it would
> happily accept a string longer than the width of the column in which that
> data was to be stored and not even mention that it had truncated your
> string to fit into that particular column.
>
> Recent versions of MySQL allow you to set the database to non-strict mode
> whereby it will still allow you to insert a string longer than the width of
> a column but at least, it will generate a warning message. Older versions
> would just silently truncate. Either scenario is unacceptable in a
> database. Why would you want the database to tell you after-the-fact, "Oh,
> by the way, I just screwed up your data." after-the-fact? The first job of
> a database should be to protect data integrity so if you're attempting to
> insert 51 characters into a varchar(50) column, it should not accept it
> under any circumstances and throw an exception.
>
> The MySQL docs <http://dev.mysql.com/doc/**refman/5.0/en/server-sql-mode.*
> *html <http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html>>,
> which I've quoted below, explains this.
>
> ###
>TRADITIONAL
>
>Make MySQL behave like a “traditional” SQL database system. A simple
> description of this mode is “give an error instead of a warning” when
> inserting an incorrect value into a column.
>Note
>
>The INSERT/UPDATE aborts as soon as the error is noticed. This may not
> be what you want if you are using a nontransactional storage engine,
> because data changes made prior to the error may not be rolled back,
> resulting in a “partially done” update. (Added in MySQL 5.0.2)
>
> When this manual refers to “strict mode,” it means a mode where at least
> one of STRICT_TRANS_TABLES or STRICT_ALL_TABLES is enabled.
> ###
> --
> Regards,
>
> Clifford Ilkay
> Dinamis
> 1419-3266 Yonge St.
> Toronto, ON
> Canada  M4N 3P6
>
> <http://dinamis.com>
> +1 416-410-3326
>
>
> --
> 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 <django-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: problem with admin settings

2012-03-18 Thread Swaroop Shankar V
Sophia,
Could you please provide me with your settings.py file?
On Mar 19, 2012 4:04 AM, "Sophia" <b.mirshafie...@gmail.com> wrote:

> Swaroop,
>
> I run sync.db this is what it shows after running sync.db :
>
> Creating tables ...
> Installing custom SQL ...
> Installing indexes ...
> No fixtures found.
>
> Process finished with exit code 0
>
> without any error, but it still doesn't work, would you please help me
> with it, I really stuck :(
>
>
> On Saturday, March 17, 2012 2:46:25 PM UTC-7, Swaroop Shankar wrote:
>>
>> Did you run the syncdb after enabling it? While doing a syncdb did you
>> encounter any errors? From the error it looks like django_session table
>> is not created.
>>
>> Thanks and Regards,
>> Swaroop Shankar V
>>
>>
>>
>> On Sun, Mar 18, 2012 at 3:07 AM, Sophia <b.mirshafie...@gmail.com> wrote:
>>
>>> Thank you for helping, I had enabled it. But I don't know what's wrong
>>> with it!
>>>
>>>
>>> On Saturday, March 17, 2012 2:23:10 PM UTC-7, Swaroop Shankar wrote:
>>>>
>>>> Sophia,
>>>> Please check if you have enabled the app 'django.contrib.sessions' in
>>>> your INSTALLED_APPS, if not do that and then do a syncdb, this issue should
>>>> be resolved.
>>>>
>>>> Thanks and Regards,
>>>> Swaroop Shankar V
>>>>
>>>>
>>>>
>>>> On Sun, Mar 18, 2012 at 2:41 AM, Sophia <b.mirshafie...@gmail.com>wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm trying to set my admin settings so I will get the web page asking
>>>>> for user name and password, I did all the settings that is needed and
>>>>> mentioned in the online django book(chapter6), but the page keep giving me
>>>>> this error :
>>>>>
>>>>> Exception Type: DatabaseError  Exception Value:
>>>>>
>>>>> no such table: django_session
>>>>>
>>>>>
>>>>> this my settings.py what could be wrong with my code?
>>>>>
>>>>> DATABASES = {
>>>>> 'default': {
>>>>> 'ENGINE': 'django.db.backends.sqlite3',
>>>>> 'NAME': 'test.db',
>>>>> 'USER': '',
>>>>> 'PASSWORD': '',
>>>>> 'HOST': '',
>>>>> 'PORT': '',
>>>>> }
>>>>> }
>>>>>
>>>>> Thanks in advance
>>>>> Sophia
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To view this discussion on the web visit https://groups.google.com/d/*
>>>>> *ms**g/django-users/-/**huWdNc8xUycJ<https://groups.google.com/d/msg/django-users/-/huWdNc8xUycJ>
>>>>> .
>>>>> To post to this group, send email to django-users@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> django-users+unsubscribe@**googl**egroups.com<django-users%2bunsubscr...@googlegroups.com>
>>>>> .
>>>>> For more options, visit this group at http://groups.google.com/**group
>>>>> **/django-users?hl=en<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 view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/DkRv66Jz-**lYJ<https://groups.google.com/d/msg/django-users/-/DkRv66Jz-lYJ>
>>> .
>>>
>>> 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 <django-users%2bunsubscr...@googlegroups.com>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>>
>>
> On Saturday, March 17, 2012 2:46:25 PM UTC-7, Swaroop Shankar wrote:
>>
>> Did you run the syncdb after enabling it? While doing a syncdb did you
>> encounter any errors? From the error it looks like django_session table
>> is not created.
>>
>

Re: Trouble setting up website with mysql as backend

2012-03-18 Thread Swaroop Shankar V
As Alasdair pointed out, i had few custom permission which had pretty big
name. I reduce it and it got fixed. Thank you both for helping me out.

Thanks and Regards,
Swaroop Shankar V



On Sun, Mar 18, 2012 at 6:27 AM, Sithembewena Lloyd Dube
<zebr...@gmail.com>wrote:

> ^^ What Alasdair said. If you still cannot solve this after shortening
> your models' names, can we see your models?
>
>
> On Sat, Mar 17, 2012 at 11:54 PM, Alasdair Nicol <alasd...@memset.com>wrote:
>
>> On 17/03/12 20:49, Swaroop Shankar V wrote:
>>
>>> Hello All,
>>> I was developing a website and the development was all done using sqlite
>>> database. Now the development is almost complete so i need to test the site
>>> using mysql. When i did a syncdb on a fresh database i got the following
>>> error:
>>>
>>> Traceback (most recent call last):
>>>  File "./manage.py", line 19, in 
>>>execute_manager(settings)
>>>  File 
>>> "/usr/local/lib/python2.7/**site-packages/django/core/**management/__init__.py",
>>> line 438, in execute_manager
>>>utility.execute()
>>> 
>>>
>>>  File 
>>> "/usr/local/lib/python2.7/**site-packages/django/contrib/**auth/management/__init__.py",
>>> line 51, in create_permissions
>>>content_type=ctype
>>> 
>>>
>>>  File "/usr/lib64/python2.7/site-**packages/MySQLdb/cursors.py", line
>>> 92, in _warning_check
>>>warn(w[-1], self.Warning, 3)
>>> _mysql_exceptions.Warning: Data truncated for column 'name' at row 1
>>>
>>>  When you run syncdb for the django auth app, it creates permissions for
>> your models [1]. It looks like it's trying to insert a permission with a
>> name longer than 50 characters, so it's getting truncated. Perhaps you have:
>>
>>  * defined a custom permission with a really long name, or
>>  * defined a model with a really long name so that "Can view " is
>> longer than 50 characters.
>>
>> Regards,
>> Alasdair Nicol
>>
>> [1]: https://docs.djangoproject.**com/en/dev/topics/auth/#**
>> default-permissions<https://docs.djangoproject.com/en/dev/topics/auth/#default-permissions>
>>
>> --
>> Alasdair Nicol
>> Developer, MEMSET
>>
>> mail: alasd...@memset.com
>>  web: http://www.memset.com/
>>
>> Memset Ltd., registration number 4504980. 25 Frederick Sanger Road,
>> Guildford, Surrey, GU2 7YD, UK.
>>
>>
>> --
>> 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 <django-users%2bunsubscr...@googlegroups.com>.
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>> .
>>
>>
>
>
> --
> Regards,
> Sithembewena Lloyd Dube
>
> --
> 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.
>

-- 
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: problem with admin settings

2012-03-17 Thread Swaroop Shankar V
Did you run the syncdb after enabling it? While doing a syncdb did you
encounter any errors? From the error it looks like django_session table is
not created.

Thanks and Regards,
Swaroop Shankar V



On Sun, Mar 18, 2012 at 3:07 AM, Sophia <b.mirshafie...@gmail.com> wrote:

> Thank you for helping, I had enabled it. But I don't know what's wrong
> with it!
>
>
> On Saturday, March 17, 2012 2:23:10 PM UTC-7, Swaroop Shankar wrote:
>>
>> Sophia,
>> Please check if you have enabled the app 'django.contrib.sessions' in
>> your INSTALLED_APPS, if not do that and then do a syncdb, this issue should
>> be resolved.
>>
>> Thanks and Regards,
>> Swaroop Shankar V
>>
>>
>>
>> On Sun, Mar 18, 2012 at 2:41 AM, Sophia <b.mirshafie...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I'm trying to set my admin settings so I will get the web page asking
>>> for user name and password, I did all the settings that is needed and
>>> mentioned in the online django book(chapter6), but the page keep giving me
>>> this error :
>>>
>>> Exception Type: DatabaseError  Exception Value:
>>>
>>> no such table: django_session
>>>
>>>
>>> this my settings.py what could be wrong with my code?
>>>
>>> DATABASES = {
>>> 'default': {
>>> 'ENGINE': 'django.db.backends.sqlite3',
>>> 'NAME': 'test.db',**
>>> 'USER': '',
>>> 'PASSWORD': '',
>>> 'HOST': '',
>>> 'PORT': '',
>>> }
>>> }
>>>
>>> Thanks in advance
>>> Sophia
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/**huWdNc8xUycJ<https://groups.google.com/d/msg/django-users/-/huWdNc8xUycJ>
>>> .
>>> 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 <django-users%2bunsubscr...@googlegroups.com>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<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 view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/DkRv66Jz-lYJ.
>
> 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.
>

-- 
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: problem with admin settings

2012-03-17 Thread Swaroop Shankar V
Sophia,
Please check if you have enabled the app 'django.contrib.sessions' in
your INSTALLED_APPS, if not do that and then do a syncdb, this issue should
be resolved.

Thanks and Regards,
Swaroop Shankar V



On Sun, Mar 18, 2012 at 2:41 AM, Sophia <b.mirshafie...@gmail.com> wrote:

> Hi all,
>
> I'm trying to set my admin settings so I will get the web page asking for
> user name and password, I did all the settings that is needed and mentioned
> in the online django book(chapter6), but the page keep giving me this error
> :
>
> Exception Type: DatabaseError  Exception Value:
>
> no such table: django_session
>
>
> this my settings.py what could be wrong with my code?
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': 'test.db',
> 'USER': '',
> 'PASSWORD': '',
> 'HOST': '',
> 'PORT': '',
> }
> }
>
> Thanks in advance
> Sophia
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/huWdNc8xUycJ.
> 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.
>

-- 
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: Trouble setting up website with mysql as backend

2012-03-17 Thread Swaroop Shankar V
Swaroop Shankar V

Sithembewena,
Its not because i have not installed mysql module for python. syncdb worked
fine for many of the apps in my project and created the tables for those
apps. This issue arise when creating the table for few apps.

Thanks and Regards,
Swaroop Shankar

On Sun, Mar 18, 2012 at 2:36 AM, Sithembewena Lloyd Dube
<zebr...@gmail.com>wrote:

> Did you install mysql-python? If not, you can find it on Sourceforge.
>
> On Sat, Mar 17, 2012 at 10:49 PM, Swaroop Shankar V 
> <swaroo...@gmail.com>wrote:
>
>> Hello All,
>> I was developing a website and the development was all done using sqlite
>> database. Now the development is almost complete so i need to test the site
>> using mysql. When i did a syncdb on a fresh database i got the following
>> error:
>>
>> Traceback (most recent call last):
>>   File "./manage.py", line 19, in 
>> execute_manager(settings)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 438, in execute_manager
>> utility.execute()
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 379, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 191, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 220, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 351, in handle
>> return self.handle_noargs(**options)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>> line 109, in handle_noargs
>> emit_post_sync_signal(created_models, verbosity, interactive, db)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/core/management/sql.py",
>> line 190, in emit_post_sync_signal
>> interactive=interactive, db=db)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>> line 51, in create_permissions
>> content_type=ctype
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line
>> 138, in create
>> return self.get_query_set().create(**kwargs)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line
>> 360, in create
>> obj.save(force_insert=True, using=self.db)
>>   File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py",
>> line 460, in save
>> self.save_base(using=using, force_insert=force_insert,
>> force_update=force_update)
>>   File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py",
>> line 553, in save_base
>> result = manager._insert(values, return_id=update_pk, using=using)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line
>> 195, in _insert
>> return insert_query(self.model, values, **kwargs)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/models/query.py", line
>> 1436, in insert_query
>> return query.get_compiler(using=using).execute_sql(return_id)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
>> line 791, in execute_sql
>> cursor = super(SQLInsertCompiler, self).execute_sql(None)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
>> line 735, in execute_sql
>> cursor.execute(sql, params)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py", line
>> 34, in execute
>> return self.cursor.execute(sql, params)
>>   File
>> "/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py",
>> line 86, in execute
>> return self.cursor.execute(query, args)
>>   File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 176,
>> in execute
>> if not self._defer_warnings: self._warning_check()
>>   File "/usr/lib64/python

Trouble setting up website with mysql as backend

2012-03-17 Thread Swaroop Shankar V
Hello All,
I was developing a website and the development was all done using sqlite
database. Now the development is almost complete so i need to test the site
using mysql. When i did a syncdb on a fresh database i got the following
error:

Traceback (most recent call last):
  File "./manage.py", line 19, in 
execute_manager(settings)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 438, in execute_manager
utility.execute()
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
line 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
line 220, in execute
output = self.handle(*args, **options)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/base.py",
line 351, in handle
return self.handle_noargs(**options)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
line 109, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
  File
"/usr/local/lib/python2.7/site-packages/django/core/management/sql.py",
line 190, in emit_post_sync_signal
interactive=interactive, db=db)
  File
"/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
line 172, in send
response = receiver(signal=self, sender=sender, **named)
  File
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
line 51, in create_permissions
content_type=ctype
  File
"/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line
138, in create
return self.get_query_set().create(**kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py",
line 360, in create
obj.save(force_insert=True, using=self.db)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py",
line 460, in save
self.save_base(using=using, force_insert=force_insert,
force_update=force_update)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py",
line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
  File
"/usr/local/lib/python2.7/site-packages/django/db/models/manager.py", line
195, in _insert
return insert_query(self.model, values, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py",
line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
  File
"/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
  File
"/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
line 735, in execute_sql
cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/site-packages/django/db/backends/util.py",
line 34, in execute
return self.cursor.execute(sql, params)
  File
"/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py",
line 86, in execute
return self.cursor.execute(query, args)
  File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 176,
in execute
if not self._defer_warnings: self._warning_check()
  File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 92, in
_warning_check
warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: Data truncated for column 'name' at row 1


As you can see its a mysql warning since i had changed mysql mode to non
strict. The error from the traceback looks to be from the
file 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py"
which is django contrib application. What should i do to fix this issue. Am
using django version 1.3.1. Please help.

Thanks and Regards,

Swaroop Shankar V

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



Adding Highlights for a product

2012-01-28 Thread Swaroop Shankar V
Hi,

Am trying to create a shopping cart using satchmo project. While creating a
product, for certain types of products I want to add few highlights of a
product similar to the one seen in this link
http://www.flipkart.com/cameras/canon/itmczcrzgj3cysyx?pid=camcxq6nupdbxw56

As you could see the highlights of the products

   - 12.2 Megapixels
   - CMOS


   - with 2.7 inch LCD

So i want to add something like this. Please let me know how i can
configure a product as said above.

Thanks and Regards,

Swaroop Shankar V

-- 
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: Confused with django model Limit and Offset Implementation

2012-01-27 Thread Swaroop Shankar V
got it working thanks anyway :)

Thanks and Regards,
Swaroop Shankar V



On Mon, Jan 23, 2012 at 12:00 PM, Leandro Ostera Villalva <
leost...@gmail.com> wrote:

> AFAIK it is [offset:page]
>
> El 22 de enero de 2012 20:40, Swaroop Shankar V <swaroo...@gmail.com>escribió:
>
>> Hi,
>> Am trying to create a custom pagination for my project, but am seriously
>> struck with the django implementation of Limit and offset. I went through
>> the documents, instead of making me understand how it works, i ended up
>> more confused. So suppose I have a page limit of 3 records per page and if
>> i want to load the second set of records how should the following statement
>> be?
>>
>> Data = NewsFeedStory.objects.order_by('-updated_on')[?:?]
>>
>> and similarly if i want to load the 3rd set with same page limit, how
>> should the same statement be? I played with the django shell to figure out
>> how this works but am still confused. Please help.
>>
>> Thanks and Regards,
>>
>> Swaroop Shankar V
>>
>>  --
>> 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.
>>
>
>
>
> --
> Regards,
>
> Leandro Ostera,
> *BLOG - Check what I'm doing now <http://imakeapps.alwaysdata.net>
> EMAIL - Write me an email <leost...@gmail.com>
> SHOWCASE - Check my latest projects <http://ishowcase.alwaysdata.net>*
>
>  --
> 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.
>

-- 
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: Selecting an E-commerce Application

2012-01-24 Thread Swaroop Shankar V
Thanks all, I decided to use plata for my project, since I feel it can be
customized for my requirement much better than the other E-Commerce project
(i might be wrong but still after evaluating most of the django ecommerce
project this is what i felt). Matthias, thanks for developing Plata. Just
starting the integration of Plata in my project and I hope you would lend
some help if i get struck somewhere :) Thanks

Regards,

Swaroop Shankar V



On Mon, Jan 16, 2012 at 10:28 PM, Matthias Kestenholz <m...@feinheit.ch>wrote:

> On Mon, Jan 16, 2012 at 17:31, Lenz Hirsch <lenzhir...@googlemail.com>
> wrote:
> > Servus,
> >
> > i would give plata a try because its from the creators of feincms wich
> > is IMO the best django based CMS. As feincms is more a "cms framework"
> > which ships with a very good "default implementation" i assume the
> > same is true for plata. Plata is very new so maybe you are missing a
> > lot of features. A "out of the box feature rich ready to go" solution
> > is Kai´s LTFS. Maybe Kai can give us some insides if LTFS´s models
> > (not product properties - that sure can be done very easily) are
> > extendable in an easy way (no forking and under 10 lines of code) too.
> >
> > Depending on the requirements i would choose one of those two.
> >
>
> Thanks :-)
>
> There is no stable release of Plata yet, but it is in use in several
> shops right now, a few of them have been built by Feinheit, but I know
> of two other companies which use it for their webshops.
>
> The core hasn't changed much in months, and the basic ideas haven't
> changed for even longer. I'd say even though there is no version 1.0
> yet it is ready to build your shops on.
>
> The current development version (https://github.com/matthiask/plata
> branch master) comes without a product model -- the idea is that you
> write your own because only you know which fields and which behavior
> is needed. Models for contact information, discounts / vouchers,
> carts, orders and payment tracking are included as are payment modules
> for paypal, postfinance and cash-on-delivery. The checkout process is
> fully managed by Plata, multi-currency shops are supported etc.
>
> All of this means that yes, Plata isn't the best option if you want a
> solution which works fine out of the box. If you anticipate you'll
> have to customize the shop in several ways, choosing a lightweight
> option with a small LOC count which solves the hard problems in a
> reusable way (order tracking, payments, total calculation with taxes
> and discounts), Plata might be the right choice for you.
>
> Best regards
> Matthias
>
> --
> 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.
>
>

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



Confused with django model Limit and Offset Implementation

2012-01-22 Thread Swaroop Shankar V
Hi,
Am trying to create a custom pagination for my project, but am seriously
struck with the django implementation of Limit and offset. I went through
the documents, instead of making me understand how it works, i ended up
more confused. So suppose I have a page limit of 3 records per page and if
i want to load the second set of records how should the following statement
be?

Data = NewsFeedStory.objects.order_by('-updated_on')[?:?]

and similarly if i want to load the 3rd set with same page limit, how
should the same statement be? I played with the django shell to figure out
how this works but am still confused. Please help.

Thanks and Regards,

Swaroop Shankar V

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



Selecting an E-commerce Application

2012-01-14 Thread Swaroop Shankar V
Hello All,

I need to integrate an e-commerce application into my project and i was
checking few options and I rounded of to 2 options:
1) Satchless <http://satchless.com>
2) Plata <https://github.com/matthiask/plata>

Please note that I don't wish to use a framework, instead i wanted an app
which i can integrate into my existing django project. If anyone have used
these before, please recommend which one I should use. Or is there any
better e-commerce app?

Thanks and Regards

Swaroop Shankar V

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



Joining tables

2012-01-14 Thread Swaroop Shankar V
hello All,
I have a model of following structure

class ExtraInfomration():

user = models.OneToOneField(User)
total_likes = models.IntegerField(_('Total Likes'), null=True, blank=True,
default=0)
total_dislikes = models.IntegerField(_('Total Dislikes'), null=True,
blank=True, default=0)
popularity = models.FloatField(_('Popularity'), null=True, blank=True,
default=0.0)
created_on = models.DateTimeField(auto_now_add = True, null=True)
updated_on = models.DateTimeField(auto_now=True)

I have another model for profile. I need to retrieve users ordered by the
popularity from the User model. This is the code am using to retrieve the
users list
userObject = User.objects.filter(is_active=1,is_staff=0,is_superuser=0)

how can i order the data based on the popularity field in extrainformation?
Thanks

Regards,

Swaroop Shankar V

-- 
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: Removing Save functionality from Admin

2012-01-12 Thread Swaroop Shankar V
Thanks Denis, that fixed the issue. One more question, is it possible to
display an image in the edit form? I don't want the admin to upload any
image but i want to display whatever image is uploaded on the edit form, is
it possible? I googled but could not find any relevant results. Thanks

Regards,
Swaroop Shankar V



On Thu, Jan 12, 2012 at 10:34 PM, Denis Darii <denis.da...@gmail.com> wrote:

> You can rewrite the *has_add_permission* method of your admin class and
> return False.
> More info here:
> https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.contrib.admin.ModelAdmin.
> has_add_permission
>
> On Thu, Jan 12, 2012 at 5:51 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>> Hi All,
>> I guess the question was not clear and am sorry for that. I have a model
>> by the name Photos. I have enabled the admin section for this model.
>> I don't want the admin to create any entries for this models from the admin
>> area, so i need to remove the 'Add Photos' button on top of the Photos
>> listing page. How can it be done? Hope my question is much more clear now.
>> Thanks
>>
>> Regards,
>>
>> Swaroop Shankar V
>>
>>
>>
>>
>> On Thu, Jan 12, 2012 at 2:53 PM, Swaroop Shankar V 
>> <swaroo...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I have a model called Photos, I would like to remove the save button and
>>> functionality from the admin area for photos model. Is it possible?
>>>
>>> Thanks and Regards,
>>>
>>> Swaroop Shankar V
>>>
>>>
>>  --
>> 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.
>>
>
>
>
> --
> This e-mail and any file transmitted with it is intended only for the
> person or entity to which is addressed and may contain information that is
> privileged, confidential or otherwise protected from disclosure. Copying,
> dissemination or use of this e-mail or the information herein by anyone
> other than the intended recipient is prohibited. If you are not the
> intended recipient, please notify the sender immediately by return e-mail,
> delete this communication and destroy all copies.
>
> --
> 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.
>

-- 
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: Removing Save functionality from Admin

2012-01-12 Thread Swaroop Shankar V
Hi All,
I guess the question was not clear and am sorry for that. I have a model by
the name Photos. I have enabled the admin section for this model.
I don't want the admin to create any entries for this models from the admin
area, so i need to remove the 'Add Photos' button on top of the Photos
listing page. How can it be done? Hope my question is much more clear now.
Thanks

Regards,

Swaroop Shankar V



On Thu, Jan 12, 2012 at 2:53 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> Hi,
>
> I have a model called Photos, I would like to remove the save button and
> functionality from the admin area for photos model. Is it possible?
>
> Thanks and Regards,
>
> Swaroop Shankar V
>
>

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



Removing Save functionality from Admin

2012-01-12 Thread Swaroop Shankar V
Hi,

I have a model called Photos, I would like to remove the save button and
functionality from the admin area for photos model. Is it possible?

Thanks and Regards,

Swaroop Shankar V

-- 
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: Joining Tables

2012-01-08 Thread Swaroop Shankar V
Thanks a lot Anler, that's exactly what I want. I never knew that it was so
simple.

Thanks and Regards,
Swaroop Shankar V



On Sun, Jan 8, 2012 at 4:36 PM, Anler <anle...@gmail.com> wrote:

>  Oh sorry, it should be this:
>
> photos = Photos.objects.filter(user__groups__id=the_group_id)
>
> --
> Anler
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>
> On Sunday, January 8, 2012 at 12:04 PM, Anler wrote:
>
>  Swaroop I think this is what you're asking for:
>
> photos = Photos.objects.filter(user__groups__name='admin')
>
> --
> Anler
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>
> On Sunday, January 8, 2012 at 11:42 AM, Jonas Geiregat wrote:
>
>
>
> Thanks Jonas, the statements you had provided would give me a list of
> users who belong that group, but how can I retrieve the photos of those
> users? Actually I was looking for a single statement which would join all
> these tables and returns the data based on the Group ID.
>
>
> I would recommend reading through
> https://docs.djangoproject.com/en/dev/topics/db/queries/
>
> Getting a row by ID:
>
> Group.objects.get(pk=group_id)
>
> --
> 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.
>
>
>
>  --
> 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.
>

-- 
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: Joining Tables

2012-01-08 Thread Swaroop Shankar V
Thanks Jonas, the statements you had provided would give me a list of users
who belong that group, but how can I retrieve the photos of those users?
Actually I was looking for a single statement which would join all these
tables and returns the data based on the Group ID.

Thanks and Regards,
Swaroop Shankar V



On Sun, Jan 8, 2012 at 2:34 PM, Jonas Geiregat <jo...@geiregat.org> wrote:

>
>
> The user field is a foreign key to django auth User model. Each user is
> assigned to a group (django Auth Group model). I want to retrieve all the
> photos which belongs to users of a specific group. How can it be done?
>
>
> from django.contrib.auth.models import Group
>
> group = Group.objects.get(name='your_group')
> users = group.user_set.all()
>
> Haven't tested it, but I think that's what you want/need.
>
>
>  --
> 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.
>

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



Joining Tables

2012-01-07 Thread Swaroop Shankar V
Hi,
I got a models which is as follows:

class Photos(models.Model):
"""
This model will enable the users to upload photos
"""
user = models.ForeignKey(User)
title = models.CharField(_('Title'), max_length=250, null = True, blank
= True)
description = models.TextField(_('Description'), null = True, blank =
True)
image = models.ImageField(_('Image'), upload_to=get_image_path)
created_on = models.DateTimeField(auto_now_add = True)
updated_on = models.DateTimeField(auto_now = True)

The user field is a foreign key to django auth User model. Each user is
assigned to a group (django Auth Group model). I want to retrieve all the
photos which belongs to users of a specific group. How can it be done?

Thanks and Regards,

Swaroop Shankar V

-- 
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: Facebook like activity feed commenting using django comments framework

2012-01-07 Thread Swaroop Shankar V
Thanks Anoop for those links, but it is not exactly what I require and also
the overhead of xmpp server is also there. Well all i require is to know is
how i can create an entry in the tables created by the commenting framework
through an API if available.

Thanks and Regards,
Swaroop Shankar V



On Sat, Jan 7, 2012 at 7:38 PM, Anoop Thomas Mathew <atm...@gmail.com>wrote:

> Hi,
> Try this https://github.com/agiliq/django-pubsub/
> You can get a live demo here http://chat.agiliq.com/pubsub/.
> See if this suits your purpose.
> Thanks,
> Anoop Thomas Mathew
>
> atm
> ___
> Life is short, Live it hard.
>
>
>
>
> On 7 January 2012 19:34, Swaroop Shankar V <swaroo...@gmail.com> wrote:
>
>> hello All,
>> Am trying to build somewhat like an activity stream for my web
>> application. Since its not exactly similar to the normal activity streams
>> found in facebook I am not able to use any of the existing django activity
>> stream projects like django-activity-stream in my application. So I am
>> building it from scratch. I would like to make use of the django commenting
>> system for commenting on each post that show's up on the activity steam.
>> Since i would like to use ajax to post comments, I will require an API,
>> using which I can save the comment posted to the commenting system
>> framework table. I looked through the documentation but could not figure
>> out how i can do it. If someone have any experience in doing the same
>> please let me know the procedures.
>>
>> Thanks and Regards,
>> Swaroop Shankar V
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

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



Facebook like activity feed commenting using django comments framework

2012-01-07 Thread Swaroop Shankar V
hello All,
Am trying to build somewhat like an activity stream for my web application.
Since its not exactly similar to the normal activity streams found in
facebook I am not able to use any of the existing django activity stream
projects like django-activity-stream in my application. So I am building it
from scratch. I would like to make use of the django commenting system for
commenting on each post that show's up on the activity steam. Since i would
like to use ajax to post comments, I will require an API, using which I can
save the comment posted to the commenting system framework table. I looked
through the documentation but could not figure out how i can do it. If
someone have any experience in doing the same please let me know the
procedures.

Thanks and Regards,
Swaroop Shankar V

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



Copying and Writing EXIF information from one file to another

2012-01-07 Thread Swaroop Shankar V
Hi,
Am trying to copy the exif information to the resized image of the same
image using pyexiv2. Searching for a solution i stumbled upon a post in Stack
Overflow<http://stackoverflow.com/questions/400788/resize-image-in-python-without-losing-exif-data>.
It looks like the api's used in the function is outdated and is not
available in the latest version. Based on the latest document i created a
function like this

def write_exif(originFile, destinationFile, **kwargs):
exifInformation = get_exif(originFile)
metadata = pyexiv2.ImageMetadata(str(destinationFile))
for key, value in exifInformation.iteritems():
metadata[key] = value

metadata.write()

def get_exif(file):
"""
Retrieves EXIF information from a image
"""
ret = {}
metadata = pyexiv2.ImageMetadata(str(file))
metadata.read()
info = metadata.exif_keys
for key in info:
data = metadata[key]
ret[key] = data.raw_value
return ret

But this ends up in an error


Python argument types in
_ExifTag._setParentImage(_ExifTag, NoneType)
did not match C++ signature:
_setParentImage(exiv2wrapper::ExifTag {lvalue},
exiv2wrapper::Image {lvalue})


I am now clueless on what went wrong. Could someone please help me out?
Thanks

Swaroop Shankar V

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



Referring to same model records as a parent

2011-11-28 Thread Swaroop Shankar V
Hi,
I am trying to implement a menu system for my project which would enable
the admin to create menu's that will be displayed on the webpage. So i
should be able to create sub-menus which will have a parent menu. My table
structure will be as follows

id
name
url
parent_id

Here the parent_id will be the id of the menu of the same table. So on the
admin area i want a select box for the parent_id which will display the
already entered records. How can it be done?

Thanks and Regards,
Swaroop Shankar V

-- 
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: How to do some additional process while saving a django flatpage

2011-11-27 Thread Swaroop Shankar V
Well Daniel, I tried this but i am not able to see the function being
called while saving any flatpage page. Is it possible to give me a step by
step instruction on how to achieve the same? I read through the signals
documents but i am kind of confused on where to include the signal related
statements since the document do not give much details about it. I am still
not able to completely understand the signal's system in django. So I would
request for a step by step instruction, if its possible. Thanks

Regards,
Swaroop Shankar V



On Mon, Oct 3, 2011 at 9:22 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> Thanks a lot Daniel, I guess this is exactly what I require. Will check it
> and revert back.
>
> Thanks and Regards,
> Swaroop Shankar V
>
>
>
> On Mon, Oct 3, 2011 at 4:21 PM, Daniel Roseman <dan...@roseman.org.uk>wrote:
>
>> On Sunday, 2 October 2011 15:03:12 UTC+1, Swaroop Shankar wrote:
>>>
>>> Hi,
>>> I am trying to build a menu system which can be controlled at the admin
>>> area. For the content management purpose i am using django flatpage. So
>>> when a page is getting saved i need to insert the page title and url in the
>>> menu table i have created. So i guess a flatpage signal is the best way to
>>> go, but after searching a lot i could not find any such signals available
>>> for flatpage. So which is the best approach to implement whatever i had
>>> described above. Thanks
>>> Regards,
>>>
>>> Swaroop Shankar V
>>>
>>>
>> You don't need a specific flatpages signal. You can just use the normal
>> pre-save signal and attach the listener to flatpages only.
>>
>> from django.db.models.signals import pre_save
>> from django.dispatch import receiver
>> from django.contrib.flatpages.models import FlatPage
>>
>> @receiver(pre_save, sender=FlatPage)
>> def my_handler(sender, **kwargs):
>>...
>>
>>
>> https://docs.djangoproject.com/en/1.3/topics/signals/#connecting-to-signals-sent-by-specific-senders
>>
>> --
>> DR.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/-xs77MXmBh0J.
>>
>> 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.
>>
>
>

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



Help Required with Image Upload

2011-10-26 Thread Swaroop Shankar V
Hello All,
Am pretty new to Django. I am trying to create a form which will upload an
image and then enable the user to crop visually (using JCrop plugin). Am
not completely sure on how to implement this in Django. I am thinking of
first saving the uploaded image into the disk as a jpeg file and then load
and display the image as an overlay where the user can crop the image. I am
able to create a form with the image field and then am passing over
request.FILE to a function called handle_uploaded_image. Following is
my handle_uploaded_image function

def handle_uploaded_image(self, image):
"""
This function is to handle uploaded image file
"""
imageFile = Image.open(StringIO.StringIO(image.read()))
fileName = hashlib.md5(imageFile.getvalue()).hexdigest()+'.jpg'

Now i am kind of confused on how to convert the uploaded image into jpg
using PIL, and then saving into the disk. I had defined a field in my model
to save the image file name which is as follows:

class UserProfile(models.Model):

avatar = models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH,
null=True)

I did this based on the django documentation, but it tells something about
binding the form which am not able to correctly understand. Why do we need
to bind a form with image field. Also whats the use of giving upload_to in
model image field? Thanks in advance for any help.

Regards,

Swaroop Shankar V

-- 
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: Setting default values in a form from DB table

2011-10-24 Thread Swaroop Shankar V
Thank a lot Andre, this is my first project in Django so kind of confused at
many parts. The links will help me to fix my issue.

Thanks and Regards,

Swaroop Shankar V



On Mon, Oct 24, 2011 at 6:03 PM, Andre Terra <andrete...@gmail.com> wrote:

> You should always populate your form in forms.py. This is done using the
> 'initial' kwarg and is thoroughly explained in the docs! [1]
>
> Borrowing from the tutorial's Poll model [2]:
>
> Class PollsForm(forms.Form):
> def __init__ (self, *args, **kwargs):
> self.instance = kwargs.pop('instance', None)
>
> if self.instance.pk is not None:
> kwargs['initial'] = kwargs.get('initial', {})
> kwargs['initial'] = {'question': self.instance.question}
>
> super(PollsForm, self).__init__(*args, **kwargs)
>
> This way, you can edit a Poll object by calling
> PollsForm(instance=some_poll_object), and it will automatically populate
> 'question' with the instance's
> question attribute.
>
>
> Cheers,
> AT
>
> [1]
> https://docs.djangoproject.com/en/dev/ref/forms/api/#dynamic-initial-values
> [2]
> https://docs.djangoproject.com/en/dev/intro/tutorial01/#creating-models
>
>
>
>
> On Sun, Oct 23, 2011 at 4:08 PM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>> Hello All,
>>
>> I am trying to create a Edit form to edit user information. I would like
>> to display the default values in the form fields rendered and am getting the
>> values from the db table. I can take an approach by creating a dictionary
>> with the values that needs to be populated in the form fields in my view
>> file and then pass it to the html. Then in the html, i can manually set the
>> values using the django-widget_tweaks. But the problem here is that there
>> are few select box for which this approach wont work. So the next option is
>> to do it from the forms.py but there i need to get the currently logged in
>> user and since request object is not available i created an __init__
>> function with the following statements
>>
>> def __init__(self, *args, **kwargs):
>> self.request = kwargs.pop('request', None)
>> super(UserEditForm, self).__init__(*args, **kwargs)
>>
>> but now i am not sure on how to set up the form values. My form's class
>> code can be accessed via the url http://pastebin.com/1TuRmNhH . Please
>> help.
>>
>> Thanks and Regards,
>> Swaroop Shankar V
>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

-- 
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: Image Field Issue

2011-10-24 Thread Swaroop Shankar V
Thanks Kurtis, I figured out that was the issue. I downloaded a copy of PIL
from their official site. Installed the devel libraries for libjpeg and then
did a setup.py install and now its fixed :)

Regards,
Swaroop Shankar V



On Mon, Oct 24, 2011 at 11:32 AM, Kurtis Mullins
<kurtis.mull...@gmail.com>wrote:

> Django relies on Python Imagine Library to check if an image is valid or
> not. Make sure that PIL was compiled w/ the libjpeg. I'm not sure on exact
> directions on how to do that, but you can find them available online. When
> you compile PIL, it will tell you what extensions are supported or missing
> due to dependencies. Good luck!
>
> On Mon, Oct 24, 2011 at 1:33 AM, Swaroop Shankar V <swaroo...@gmail.com>wrote:
>
>> Hello All,
>> An update to my previous question. The error occurs only if I try to
>> upload jpeg images, other formats like gif, png do not have this issue.
>> Please let me know if there is any extension that i need to install to
>> support jpeg. Please note that mine is a linux machine (Opensuse 11.3).
>> Thanks
>>
>> Regards,
>>
>> Swaroop Shankar V
>>
>>
>>
>>
>> On Mon, Oct 24, 2011 at 7:07 AM, Swaroop Shankar V 
>> <swaroo...@gmail.com>wrote:
>>
>>> Hello All,
>>>
>>> I am having a trough time with the Image Field. I am trying to upload an
>>> image and even if i upload a valid image, the form validator throws an error
>>> "Upload a valid image. The file you uploaded was either not an image or a
>>> corrupted image.". I have verified that PIL is installed in my system, even
>>> then its showing this validation error. I have not done any processing as
>>> such. In my models.py i have the following statement:
>>> avatar =
>>> models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH,
>>> null=True)
>>>
>>> where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should
>>> be in my MEDIA_URL. Then in my forms.py i have the following statment:
>>> avatar = forms.ImageField(label=_('Avatar'))
>>>
>>> I am not sure if i have done something wrong. Please guide me. Thanks
>>>
>>> Regards,
>>>
>>> Swaroop Shankar V
>>>
>>>
>>  --
>> 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.
>>
>
>  --
> 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.
>

-- 
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: Image Field Issue

2011-10-23 Thread Swaroop Shankar V
Hello All,
An update to my previous question. The error occurs only if I try to upload
jpeg images, other formats like gif, png do not have this issue. Please let
me know if there is any extension that i need to install to support jpeg.
Please note that mine is a linux machine (Opensuse 11.3). Thanks

Regards,

Swaroop Shankar V



On Mon, Oct 24, 2011 at 7:07 AM, Swaroop Shankar V <swaroo...@gmail.com>wrote:

> Hello All,
>
> I am having a trough time with the Image Field. I am trying to upload an
> image and even if i upload a valid image, the form validator throws an error
> "Upload a valid image. The file you uploaded was either not an image or a
> corrupted image.". I have verified that PIL is installed in my system, even
> then its showing this validation error. I have not done any processing as
> such. In my models.py i have the following statement:
> avatar =
> models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH,
> null=True)
>
> where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should be
> in my MEDIA_URL. Then in my forms.py i have the following statment:
> avatar = forms.ImageField(label=_('Avatar'))
>
> I am not sure if i have done something wrong. Please guide me. Thanks
>
> Regards,
>
> Swaroop Shankar V
>
>

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



Image Field Issue

2011-10-23 Thread Swaroop Shankar V
Hello All,

I am having a trough time with the Image Field. I am trying to upload an
image and even if i upload a valid image, the form validator throws an error
"Upload a valid image. The file you uploaded was either not an image or a
corrupted image.". I have verified that PIL is installed in my system, even
then its showing this validation error. I have not done any processing as
such. In my models.py i have the following statement:
avatar = models.ImageField(_('Avatar'),upload_to=settings.IMAGE_UPLOAD_PATH,
null=True)

where IMAGE_UPLOAD_PATH is set to 'uploads/images' which i guess should be
in my MEDIA_URL. Then in my forms.py i have the following statment:
avatar = forms.ImageField(label=_('Avatar'))

I am not sure if i have done something wrong. Please guide me. Thanks

Regards,

Swaroop Shankar V

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



Setting default values in a form from DB table

2011-10-23 Thread Swaroop Shankar V
Hello All,

I am trying to create a Edit form to edit user information. I would like to
display the default values in the form fields rendered and am getting the
values from the db table. I can take an approach by creating a dictionary
with the values that needs to be populated in the form fields in my view
file and then pass it to the html. Then in the html, i can manually set the
values using the django-widget_tweaks. But the problem here is that there
are few select box for which this approach wont work. So the next option is
to do it from the forms.py but there i need to get the currently logged in
user and since request object is not available i created an __init__
function with the following statements

def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request', None)
super(UserEditForm, self).__init__(*args, **kwargs)

but now i am not sure on how to set up the form values. My form's class code
can be accessed via the url http://pastebin.com/1TuRmNhH . Please help.

Thanks and Regards,
Swaroop Shankar V

-- 
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: How to do some additional process while saving a django flatpage

2011-10-03 Thread Swaroop Shankar V
Thanks a lot Daniel, I guess this is exactly what I require. Will check it
and revert back.

Thanks and Regards,
Swaroop Shankar V



On Mon, Oct 3, 2011 at 4:21 PM, Daniel Roseman <dan...@roseman.org.uk>wrote:

> On Sunday, 2 October 2011 15:03:12 UTC+1, Swaroop Shankar wrote:
>>
>> Hi,
>> I am trying to build a menu system which can be controlled at the admin
>> area. For the content management purpose i am using django flatpage. So when
>> a page is getting saved i need to insert the page title and url in the menu
>> table i have created. So i guess a flatpage signal is the best way to go,
>> but after searching a lot i could not find any such signals available for
>> flatpage. So which is the best approach to implement whatever i had
>> described above. Thanks
>> Regards,
>>
>> Swaroop Shankar V
>>
>>
> You don't need a specific flatpages signal. You can just use the normal
> pre-save signal and attach the listener to flatpages only.
>
> from django.db.models.signals import pre_save
> from django.dispatch import receiver
> from django.contrib.flatpages.models import FlatPage
>
> @receiver(pre_save, sender=FlatPage)
> def my_handler(sender, **kwargs):
>...
>
>
> https://docs.djangoproject.com/en/1.3/topics/signals/#connecting-to-signals-sent-by-specific-senders
>
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/-xs77MXmBh0J.
>
> 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.
>

-- 
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: How to do some additional process while saving a django flatpage

2011-10-03 Thread Swaroop Shankar V
Hello Phang,

Thanks for your reply. Well the requirement is like when ever a page is
created i want to save an entry into the menu table to. This is to be an
automatic process. If i understand correctly, the method you suggested will
require a manual process or a cron running to fetch the data from the
flatpage table and then enter it into my menu table. So is there any way to
make it an automated process?

Thanks and Regards,

Swaroop Shankar V



On Mon, Oct 3, 2011 at 12:35 PM, Phang Mulianto <braveh...@gmail.com> wrote:

> why not query your flatpage db and use the field for the menu in ur table..
> flatpage have url and title.. get url n title and put in your menu
> template..no need signaling
> can add cache to as the flatpage not modified to often..
>  On Oct 2, 2011 10:03 PM, "Swaroop Shankar V" <swaroo...@gmail.com> wrote:
> > Hi,
> > I am trying to build a menu system which can be controlled at the admin
> > area. For the content management purpose i am using django flatpage. So
> when
> > a page is getting saved i need to insert the page title and url in the
> menu
> > table i have created. So i guess a flatpage signal is the best way to go,
> > but after searching a lot i could not find any such signals available for
> > flatpage. So which is the best approach to implement whatever i had
> > described above. Thanks
> > Regards,
> >
> > Swaroop Shankar V
> >
> > --
> > 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.
> >
>
> --
> 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.
>

-- 
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: Django Registration extra fields not getting saved

2011-10-03 Thread Swaroop Shankar V
Hello Sébastien,

Thanks for your response. I just figured out the issue. Actually signals was
not getting called. The reason was that the django-registration was not
installed properly. Actually i copied the django-registration folder to my
project folder instead of the normal installation. Once i went for a normal
installation signals worked just fine.

Thanks and Regards,

Swaroop Shankar V



On Mon, Oct 3, 2011 at 2:37 PM, BILLION Sébastien <
sebastien.bill...@gmail.com> wrote:

>  Hi,
>
> Can you send your signals.py? I think you have a problem with your signal
>
>
>  BILLION Sébastien
>
> the Answer to the ultimate question of life, the universe and everything is
> **42**
>
> http://www.sebastienbillion.com/
>
> Le 01/10/2011 10:59, Swaroop Shankar a écrit :
>
> Hello All,
> I had posted the same question in stackoverflow for which I didn't
> received much response, so trying my luck here. Hope someone will have
> a solution to my issue.
> I am trying to extend the django registration module with additional
> fields. I have created following files to extend the registration
> form:
> model.py: http://pastebin.com/U80C21Wy .
> forms.py: http://pastebin.com/5dYHiL6C.
> regbackend.py: http://pastebin.com/63WTzMQi
> urls.py: http://pastebin.com/ZzaAcLtp
> The username, password is getting saved, but the fields that i have
> listed in the regbackend.py is not getting saved. I am not even sure
> whether user_created model in that file is actually being called. I am
> not getting any errors either. I been struggling with registration
> form for the past few days. I hope someone here will again help me
> with this issue. 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to do some additional process while saving a django flatpage

2011-10-02 Thread Swaroop Shankar V
Hi,
I am trying to build a menu system which can be controlled at the admin
area. For the content management purpose i am using django flatpage. So when
a page is getting saved i need to insert the page title and url in the menu
table i have created. So i guess a flatpage signal is the best way to go,
but after searching a lot i could not find any such signals available for
flatpage. So which is the best approach to implement whatever i had
described above. Thanks
Regards,

Swaroop Shankar V

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