Re: template error in html forms

2012-02-01 Thread yati sagade
in settings.py, in the TEMPLATE_DIRS setting, add the absolute path to your
templates directory - something like "/path/to/project/dir/template". This
MUST be an absolute path. And if your modifying this setting for the first
time, be sure to leave a comma (,) in the end of that path (Sorry if you
knew that already :))

On Wed, Feb 1, 2012 at 7:59 PM, TANYA  wrote:

> the installed apps has 'mysite.books', in the path and the html files
> are in a directory under mysite project directory. Is that correct?
>
>
>
> On Wed, Feb 1, 2012 at 12:06 PM, Ankit Rai  wrote:
>
>> Please check your template path in settings.py.
>>
>>
>>
>>
>> On Wed, Feb 1, 2012 at 5:29 PM, TANYA  wrote:
>>
>>> In views.py, when I add this code gives template error.
>>>
>>> def search(request):
>>> error = False
>>> if 'q' in request.GET:
>>> q = request.GET['q']
>>> if not q:
>>> error = True
>>> else:
>>> books = Book.objects.filter(title__icontains=q)
>>> return render_to_response('search_results.html',
>>> {'books': books, 'query': q})
>>> return render_to_response('search_form.html',
>>> {'error': error})
>>>
>>> I have created search_form.html and search.html and put it in "template"
>>> directory but get this error ,
>>>
>>> TemplateDoesNotExist at /search/
>>>
>>> search_form.html
>>>
>>>  Request Method: GET  Request URL: http://127.0.0.1:8000/search/  Django
>>> Version: 1.3.1  Exception Type: TemplateDoesNotExist  Exception Value:
>>>
>>> search_form.html
>>>
>>>  Exception Location: 
>>> /usr/local/lib/python2.6/dist-packages/django/template/loader.py
>>> in find_template, line 138  Python Executable: /usr/bin/python
>>> --
>>> TANYA
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>>
>> *Ankit Rai*
>>
>> *
>> *
>>
>> --
>> 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.
>>
>
>
>
> --
> TANYA
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: template error in html forms

2012-02-01 Thread yati sagade
I've never run in to a TemplateError for anything other than what I pointed
out - maybe in the settings module it is ".../templates" and the name of
the directory is "template" (note the 's' in the end) or the other way
round. Anyway, check for any misspelling in the template name itself - or
whether the template 'search_results.html' is directly under the template
directory and not under any subdirectory therein.

If you could post the entire debug info (Also the one at the far bottom of
the error page), it might be helpful for us.

On Wed, Feb 1, 2012 at 8:22 PM, TANYA  wrote:

> yes, the path is already there. Maybe the problem is either in views.py or
> url.py file if changed it gives different error, but i dont know what to
> look for in those two files.
>
>
> On Wed, Feb 1, 2012 at 2:40 PM, yati sagade  wrote:
>
>> in settings.py, in the TEMPLATE_DIRS setting, add the absolute path to
>> your templates directory - something like "/path/to/project/dir/template".
>> This MUST be an absolute path. And if your modifying this setting for the
>> first time, be sure to leave a comma (,) in the end of that path (Sorry if
>> you knew that already :))
>>
>>
>> On Wed, Feb 1, 2012 at 7:59 PM, TANYA  wrote:
>>
>>> the installed apps has 'mysite.books', in the path and the html
>>> files are in a directory under mysite project directory. Is that correct?
>>>
>>>
>>>
>>> On Wed, Feb 1, 2012 at 12:06 PM, Ankit Rai wrote:
>>>
>>>> Please check your template path in settings.py.
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Feb 1, 2012 at 5:29 PM, TANYA  wrote:
>>>>
>>>>> In views.py, when I add this code gives template error.
>>>>>
>>>>> def search(request):
>>>>> error = False
>>>>> if 'q' in request.GET:
>>>>> q = request.GET['q']
>>>>> if not q:
>>>>> error = True
>>>>> else:
>>>>> books = Book.objects.filter(title__icontains=q)
>>>>> return render_to_response('search_results.html',
>>>>> {'books': books, 'query': q})
>>>>> return render_to_response('search_form.html',
>>>>> {'error': error})
>>>>>
>>>>> I have created search_form.html and search.html and put it in
>>>>> "template" directory but get this error ,
>>>>>
>>>>> TemplateDoesNotExist at /search/
>>>>>
>>>>> search_form.html
>>>>>
>>>>>  Request Method: GET  Request URL: http://127.0.0.1:8000/search/  Django
>>>>> Version: 1.3.1  Exception Type: TemplateDoesNotExist  Exception Value:
>>>>>
>>>>> search_form.html
>>>>>
>>>>>  Exception Location: 
>>>>> /usr/local/lib/python2.6/dist-packages/django/template/loader.py
>>>>> in find_template, line 138  Python Executable: /usr/bin/python
>>>>> --
>>>>> TANYA
>>>>>
>>>>> --
>>>>> 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.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Ankit Rai*
>>>>
>>>> *
>>>> *
>>>>
>>>> --
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> TANYA
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Gr

Re: FREE Full Django Tutorial

2012-02-03 Thread yati sagade
Hi
Looks really good. Appreciate the hard work man :) Already favourited it.
Keep up the good work!

Cheers!
Yati Sagade

On Fri, Feb 3, 2012 at 10:29 PM, programmersbook.com <
webmas...@programmersbook.com> wrote:

> Thank you for your email. I'm not quite sure what you mean, could you
> please elaborate?
>
> On Feb 3, 4:45 pm, Aaron Cannon 
> wrote:
> > Any plans to release a video podcast?
> >
> > Aaron
> >
> > On 2/3/12, programmersbook.com  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi All,
> >
> > > I created a full django turtorial screencast, so far 25, every week
> > > I'm adding one more.
> >
> > >
> http://www.youtube.com/playlist?list=PL385A53B00B8B158E&feature=view_all
> >
> > > Let me know what you think.
> >
> > > Best,
> >
> > > --
> > > 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: VIM as Modern Python/Dajngo IDE

2012-02-04 Thread yati sagade
Hi Vikash
Appreciate the heads up! Why don't you share this link on G+ and other
social media - Even I'll share with my friends - I haven't tried all of it
yet, but it looks good. kudos man, Good Job! Keep it up :)

Yati Sagade

On Sat, Feb 4, 2012 at 5:33 PM, Vikas Ruhil  wrote:

> I write a Blog about VIM as a Python/Dajngo Modern IDE .There are about 15
> Plugin and config of there is on post . I am looking for plugin suggestion
> for more .
>
> Also for newbie and Non-vim user's there is request  to checkout the
> post.Those Guys who ask what IDE should they need use or Which is Best IDE
> for Python/Django.
>
> http://learnhackstuff.blogspot.in/2012/02/vim-as-universal-idepart-1.html
>
> Regards
> Vikash Ruhil
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: VIM as Modern Python/Dajngo IDE

2012-02-04 Thread yati sagade
Seriously dude, I think you should go about making a video of this.

On Sun, Feb 5, 2012 at 12:56 AM, Vikas Ruhil  wrote:

>
> Now working on graphics and how use all this content efficiently ,try to
> make graphics those can give basic to advance understanding to the
> Python/Django users.Really Good response this post is breaking records for
> m .Keep Switch there More are coming
>
> On Sun, Feb 5, 2012 at 12:29 AM, yati sagade wrote:
>
>> Hi Vikash
>> Appreciate the heads up! Why don't you share this link on G+ and other
>> social media - Even I'll share with my friends - I haven't tried all of it
>> yet, but it looks good. kudos man, Good Job! Keep it up :)
>>
>> Yati Sagade
>>
>> On Sat, Feb 4, 2012 at 5:33 PM, Vikas Ruhil wrote:
>>
>>> I write a Blog about VIM as a Python/Dajngo Modern IDE .There are about
>>> 15 Plugin and config of there is on post . I am looking for plugin
>>> suggestion for more .
>>>
>>> Also for newbie and Non-vim user's there is request  to checkout the
>>> post.Those Guys who ask what IDE should they need use or Which is Best IDE
>>> for Python/Django.
>>>
>>> http://learnhackstuff.blogspot.in/2012/02/vim-as-universal-idepart-1.html
>>>
>>> Regards
>>> Vikash Ruhil
>>>
>>> --
>>> 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>
>>
>> (@yati_itay <http://twitter.com/yati_itay>)
>>
>>
>>  --
>> 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
> Vikash Ruhil
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: [Session] [Bangalore - India] Python & Django – Introduction & Demo

2012-02-08 Thread yati sagade
Great news! would love to be there - Do you plans for something similar in
Kolkata?

On Wed, Feb 8, 2012 at 8:31 PM, Sivasubramaniam Arunachalam <
sivasubramania...@gmail.com> wrote:

> Hi All,
>
> There is a Django introduction session with demo scheduled in Bar Camp
> 2012.
>
> *Venue : SAP Labs India , Bangalore, India*
> *Date : 11-Feb-2012*
>
> More details @
> http://barcampbangalore.org/bcb/bcb11/python-django-introduction-demo
>
> Thanks & Regards,
> Sivasubramaniam Arunachalam
>
>
>  --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: [Session] [Bangalore - India] Python & Django – Introduction & Demo

2012-02-08 Thread yati sagade
Sorry, That is, do you guys *have* any similar plans for Kolkata?

On Wed, Feb 8, 2012 at 11:21 PM, yati sagade  wrote:

> Great news! would love to be there - Do you plans for something similar in
> Kolkata?
>
>
> On Wed, Feb 8, 2012 at 8:31 PM, Sivasubramaniam Arunachalam <
> sivasubramania...@gmail.com> wrote:
>
>> Hi All,
>>
>> There is a Django introduction session with demo scheduled in Bar Camp
>> 2012.
>>
>> *Venue : SAP Labs India , Bangalore, India*
>> *Date : 11-Feb-2012*
>>
>> More details @
>> http://barcampbangalore.org/bcb/bcb11/python-django-introduction-demo
>>
>> Thanks & Regards,
>> Sivasubramaniam Arunachalam
>>
>>
>>  --
>> 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>
>
> (@yati_itay <http://twitter.com/yati_itay>)
>
>
>


-- 
Yati Sagade <http://twitter.com/yati_itay>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: Foreign Key + Primary key

2012-02-08 Thread yati sagade
Even if there was provision for that(I don't know), it really wouldn't make
sense. A parent relation tuple can be referenced by multiple child relation
tuples - thereby breaking the uniqueness constraint that comes with a
primary key.

On Wed, Feb 8, 2012 at 10:31 PM, Sandeep kaur  wrote:

> Is there any way of having a field in table, declared both as foreign
> key as well as primary key?
> I want something like this in models:
> publisher = models.ForeignKey(Publisher,primary_key=True)
>
> --
> Sandeep Kaur
> E-Mail: mkaurkha...@gmail.com
> Blog: sandymadaan.wordpress.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Yati Sagade <http://twitter.com/yati_itay>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: Contribute to Django

2012-02-09 Thread yati sagade
Django docs explain this quite nicely :)

https://docs.djangoproject.com/en/dev/internals/contributing/?from=olddocs


On Fri, Feb 10, 2012 at 12:46 AM, Gath  wrote:

> Guys,
>
> What do i need to learn/know before i start contributing to django
> development?
>
> Thanks
>
> Gath
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: pysqlite installation

2012-02-12 Thread yati sagade
Actually, If you're using the the sqlite3 backend for Django, you DO NOT
have to use any `pysqlite'. The sqlite3 db-API has been a part of the
Python standard library for long, and even if we ignore that, if you stick
to Django's wonderful ORM, you shouldn't really have to work directly with
pysqlite. I can understand if the DB was something like MongoDB or Redis,
but SQLite3 should not bother  you much.

On Sun, Feb 12, 2012 at 10:17 PM, Dennis Lee Bieber
wrote:

> On Sun, 12 Feb 2012 06:17:23 -0800 (PST), Marcus Maximus
>  wrote:
>
>
> >My python version:
> >ActivePython 2.7.2.5 (ActiveState Software Inc.) based on Python 2.7.2
> >(default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on win 32
>
> SQLite3, and the Python DB-API for it have been a part of Python's
> standard library since, what, Python 2.5?
>
>There is nothing that needs to be installed to use it.
> >
> >and my db:
> >postgresql 1.14.1 also on win 7
> >
> >can sb help me to install the pysqlite database adapter?
> >
>
> I suspect you are confused about what you need to install. Pysqlite
> works with SQLite3 database engine.
>
>For use with PostgreSQL you need to install a PostgreSQL adapter:
> psycopg2 seems to be the common package, there are others which may or
> may not be as complete a match for the DB-API 2 specification.
> --
>Wulfraed Dennis Lee Bieber AF6VN
>wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Yati Sagade <http://twitter.com/yati_itay>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: Need a Django/Python Freelancer (Paid Project)

2012-02-15 Thread yati sagade
can you email me the details? I'm a student in kolkata - I think I'm
interested.



On Wed, Feb 15, 2012 at 7:15 PM, shahzeb kohari  wrote:

> Hi all,
>
> I work for a small company in Mumbai, India.
> We need an internal social networking site for our employees.
> If any of you would be interested in 'providing a working set of codes
> strictly built from Django/Python to setup a social networking site', I
> would be happy to collaborate with you.
>
> This will be a paid-project on a milestone-pay-as-you-go basis. For more
> information, please write to me directly at skoh...@gmail.com.
>
> If this email is in violation of this Group's policies, then I
> unconditionally apologise and would request all to ignore it.
>
> Thanks,
> Shahzeb
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: social networks

2012-02-22 Thread yati sagade
I have always used the FB API using core Python urllib and other
helpers(after reading the FB API docs, of course), but you may find this
this <https://github.com/sciyoshi/pyfacebook/> and
this<http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/>helpful.
On Wed, Feb 22, 2012 at 10:27 PM, dummyman dummyman wrote:

> hi,
>
> How to access facebook apis inside python script  ? I am using django
> framework
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: social networks

2012-02-23 Thread yati sagade
Hi dummyman,
Everyone starts out as a beginner :) As Martey pointed out, pyfacebook is
dated now(Thanks Martey!) - You can go through the docs on the links posted
by him. If you have a problem, try searching on
StackOverflow<http://stackoverflow.com/>;
they have a team of FB developers monitoring questions on FB app
development.

Also, if you are in for some serious learning, go through
this<http://developers.facebook.com/docs/appsonfacebook/tutorial/>tutorial.
Actually, the most difficult part is to get the oAuth part right
- once that is done, using the returned JSON data in Python is matter of
working on dicts. The FB docs are comprehensive, but may be daunting at
first. You can, and maybe should use libraries already developed, but
learning oAuth 2.0 authorization will be nice experience :) - Also, Google+
have launched their own API for developers which also uses oAuth 2.0 for
authorization.

On Thu, Feb 23, 2012 at 10:19 PM, dummyman dummyman wrote:

> Hi ,
> Hope u dont mind. I am very new to this . I want to use facebook apis to
> gather profile information and do some data mining on it using django.
> Please tell me the starting point for me so that i can proceed further.
> Hope u dont mind asking silly questions
>
>
> On Thu, Feb 23, 2012 at 5:35 PM, Martey Dodoo wrote:
>
>> On Wednesday, February 22, 2012 12:25:21 PM UTC-5, yati sagade wrote:
>>>
>>> I have always used the FB API using core Python urllib and other
>>> helpers(after reading the FB API docs, of course), but you may find this
>>> this <https://github.com/sciyoshi/pyfacebook/> and 
>>> this<http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/>helpful.
>>
>>
>> pyfacebook has not been updated in over 2 years and uses the deprecated
>> REST API, so it would be a bad place for a beginner to start. I would try
>> using either one of the various unofficial forks of the official Facebook
>> SDK (I prefer PythonForFacebook's [1], but I might be biased because I have
>> commit access), or one of the two "django-facebook" libraries
>> (PythonForFacebook's [2] or Thierry Schellenbach's [3]).
>>
>> [1]: https://github.com/pythonforfacebook/facebook-sdk
>> [2]: https://github.com/pythonforfacebook/django-facebook
>> [3]: https://github.com/tschellenbach/Django-facebook
>>
>> --
>> 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/-/SvmBG6s1YcIJ.
>>
>> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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 facebook api prob

2012-03-01 Thread yati sagade
I tried just now, and even I'm getting the same error. Perhaps you should
ask this question on http://stackoverflow.com under the "facebook" tag - a
team of FB engineers monitors this tag, and may offer more insight. Most
probably, it's some bug/maintenance glitch.

On Thu, Mar 1, 2012 at 9:01 PM, dummyman dummyman wrote:

> Hi guys,
>
> Sorry for troubling you. I am not able to make out how to use facebook
> social graph and other plugins in django. I am a newbie . I know the basics
> of django and i went thru facebook api key s in developers.facebook.com .
> It always points out " an error occured . please try again" . Can u please
> provide a link which provides a step by step guide as how to use these apis
> in django and get the results .?
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: totally a non responsive groups which answers complex questions but not simple ones :(

2012-03-11 Thread yati sagade
What do you mean?
On 11 Mar 2012 22:06, "suresh dokania"  wrote:
>
>
> --
> 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: Why '&' is breaking Django CharField(python strings) into parts?

2012-03-12 Thread yati sagade
In an HTTP request, the query parameters are separated by the ampersand. A
form that has the fields, say, name and email, when submitted via GET, the
query string will look like "name=myname&email=s...@email.com". Since your
html is using literal '&', Django(and any other request parser) will think
of it as the standard delimiter, and will typically split the query string
on '&'. That is why your code is breaking.

There are multiple solutions. The simplest I can think of is to use "&"
- without the quotes and WITH the semicolon - whenever you need an
ampersand (&) in your HTML. That should fix this. There are other ways,
like percentage encoding (
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm) you can use
when you need to generate URLs that contain a literal ampersand.

On Mon, Mar 12, 2012 at 1:48 PM, Nikhil Verma wrote:

> I have a function in views.py
>
> def get_interview_type(request):
> i = None
> title = request.GET['title'] #Here the title becomes different
> try:
> i = Interview.objects.get(title=title) #it looks for that
> dropdown value
> #Error according to pdb
> #-> i = Interview.objects.get(title=title)
> #(Pdb)
> #DoesNotExist: DoesNotE...exist.',)
>
> if i.interview_type == "Time Series":
> visit_ids = i.visit_set.all()
> reference_visit_list = []
> for visit in visit_ids:
> reference_visit_list.append(visit.reference_visit)
> reference_visit_list.extend(visit_ids)
> list(set(reference_visit_list))
> len_visits=filter(None,reference_visit_list)
> total_visits = len(len_visits)
> return render_to_response('export/get_details.html',
>
> {'visits':visit_ids,'count':visit_ids.count(),
>'total_visits':total_visits},
>
> context_instance=RequestContext(request)
>   )
> else:
> return
> render_to_response('export/get_interview_type.html',
>   {'visits':i.visit_set.all()},
>
> context_instance=RequestContext(request)
> )
> except Interview.DoesNotExist:
> pass
>
> When the user selects a title from the dropdown this function is called
> and does it tasks.
> Now i have entered a string which include '&' ampersand thinking that it
> can play a role of 'and' in normal english like this :-
>
> 'CI-2-UGI & Bowel Symptom Screening & Characterization'(It is one of that
> dropdown value)
> Now when user selects this value from dropdown the title does not remain
> the same, instead the title changes to  CI-2-UGI(in title =
> request.GET['title']) and  before the function executes i recieve a 500
> error page.
> This is what the error prints in runserver mode
> >
> /home/user/cpms/careprep/tags/4.0/careprep/export/views.py(66)get_interview_type()->None
> -> pass
> (Pdb) c
> [11/Mar/2012 22:05:20] "GET
> /export/get_interview_type/?title=CI-2-UGI%20&%20Bowel%20Symptom%20Screening%20&%20Characterization
> HTTP/1.1" 500 64490
>
> Also when i remove that '&'ampersand from the title there is no 500 page.
>
> Now & is breaks the quesrystring what i know then how to solve the
> problem. I try having a look to url -encode but no luck .
>
> I want whatever the drop value contains (&,@ etc) it should not break
> ? How to solve the problem ?
>
> Thanks in advance
>
> --
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>  --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: logs complaining about 404 url(css-files)

2012-03-17 Thread yati sagade
try using {{ STATIC_URL }} instead of {{MEDIA_URL}} - It has worked for me,
and where it doesn't, pass settings.STATIC_URL as a context variable from
the view.

On Sat, Mar 17, 2012 at 11:27 PM, ionic drive  wrote:

> **
>
> hello *django friends*,
>
> my log files do complain about strange 4*04 errors when serving static
> css files to IE*, because I do use special CSS files to please
> IE-versions via @import for CSS.
>
> *The css files are included as follows in the html code:*
>
> 
>
> @import url({{ media_url
> }}css/style_all_no_ie.css) all;
>
> 
>
> 
>
> 
>
> There is *NO* problem with IE8, but *IE7 gives this error on connect:*
>
> localhost - - [17/Mar/2012:15:30:37 +0100] "GET /url(/media/css/
> style_all_no_ie.css)%20all HTTP/1.0" 404 1128 "http://example.com/site/";
> "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"
>
> I guess it has to do something with the setup:
> +NGINX to serve static files
> +APACHE via mod_wsgi
>
> The GOOD news are:
> +everything works fine
> +the css files get served as the should for all browsers (for IE7 too).
>
> The BAD news:
> +I want django to email me 404 errors via the "SEND_BROKEN_LINK_EMAILS =
> True" parameter.
> +But now I do get a lot of emails with 404 errors which are no real 404
> errors.
>
> Did someone of you already had that issue and is able to come up with a
> solution to fix it?
>
> Thank you very much!
> ionic
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: Hosting tutorials

2012-03-28 Thread yati sagade
Hi
I you just want to share your apps with the world, you do not need to pay
for a complete server setup. I have been using OpenShift(
https://openshift.redhat.com/app/) for long now, and it's quite easy to get
up and running. Others are[not tried, but heard are great] Heroku(
http://www.heroku.com/), Google AppEngine(https://appengine.google.com/).
I've actually used GAE for Python, but using Django and it's ORM is a bit
tricky here, but nonetheless doable. Another one with great reviews is
CloudFoundry by VMWare (http://www.cloudfoundry.com/).

Cheers!

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



Re: Looking for Django IDE

2012-04-01 Thread yati sagade
Aptana Studio 3 <http://aptana.com/> is basically Eclipse beefed up with
PyDev and other useful plugins, targeted towards web devel. I use it
regularly, and besides the cool colour schemes, the thing is pretty stable
(I was really tired of scouring the web just to get my Eclipse builds
running properly).
If you can shell out some money,.PyCharm
<http://www.jetbrains.com/pycharm/>is an *excellent* IDE, with true
virtualenv support and all. It costs a
little, but it is worth it.

2012/4/2 Alexandros Karypidis 

> Oh, regarding your problem of the 'annoying switching of perspectives':
>
> 1) Start eclipse
> 2) Open your java project, switch to the Java perspective
> 3) From the menu: Window->New Window
> 4) In the new window, open your django project and switch to the PyDev
> perspective
> 5) Alt-tab between the two Eclipse windows (one will be in PyDev and the
> other in Java perspective)
>
> You can also create two different Eclipse work-spaces and run two
> instances of eclipse (if you have ample RAM on your system).
>
>
> On 1/4/2012 8:56 μμ, Alexandros Karypidis wrote:
>
>> Hi,
>>
>> I'm using PyDev in Eclipse and it seems quite nice: http://pydev.org/
>>
>> Have a look at the Django-specific stuff: http://pydev.org/manual_adv_**
>> django.html <http://pydev.org/manual_adv_django.html>
>>
>> Please note that you must use a nightly build for Django 1.4 due to this:
>> http://sourceforge.net/**projects/pydev/forums/forum/**
>> 293649/topic/5158643<http://sourceforge.net/projects/pydev/forums/forum/293649/topic/5158643>
>>
>> Cheers,
>> Alex
>>
>> On 1/4/2012 7:30 μμ, Mark Phillips wrote:
>>
>>> What IDE do you use/recommend for developing django web sites? Or, if
>>> not an IDE, what editor/setup is most useful? I am developing on Linux
>>> version 3.1.0-1-amd64 (Debian 3.1.8-2). I would rather use something open
>>> source. I use eclipse for developing android/java projects. Since I am
>>> using django in conjunction with an android project, I don't want to use
>>> the plugin for eclipse. Switching between python and java perspectives is a
>>> little annoying, so I thought I would find a separate ide for my django
>>> work and just alt-tab between them.
>>>
>>> I have tried gedit, but I cannot get the django plugin to work. I am
>>> looking at ninja, but there does not appear to be a django plugin.
>>>
>>> Thanks,
>>>
>>> Mark
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users+unsubscribe@*
>>> *googlegroups.com .
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<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.



Re: Audio Streaming from server

2012-04-20 Thread yati sagade
Hi,
You need to be much more specific. If the problem is related to Django,
someone will help you out. But if it is help with Icecast2 you're looking
for, you should probably try their mailing lists/forums/IRC channel.

Regards

On Fri, Apr 20, 2012 at 12:15 PM, atul khairnar wrote:

> Hi,
> I am writing an Internet Radio App. But when i start the app from the
> localhost, it does not stream the audio. Streaming just stops. I tried to
> use Icecast2 media streaming server, even it is not working. Or may be I am
> not using it properly.
> SO I wanted to ask how to stream audio from server to the client? Please
> Help
>
>
> --
> Atul Khairnar
> College of Engineering , Pune, India.
>
>
>
>
>  --
> 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.



Re: New to Jdango - What IDE to use?

2012-04-21 Thread yati sagade
You counted it wrong. Add one more zero ;-)

On Sat, Apr 21, 2012 at 11:48 PM, Shawn Milochik  wrote:

> There are eleventy bajillion discussions on this already.
>
> Please search the group history on Google Groups.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<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.



Re: Django Book

2012-04-21 Thread yati sagade
Jani, excellent idea :) The Django Book is a gem(blehh, an egg)  that we
can curate. I'm not a very good writer, but I'm sure there are some good
writers in the community. Should we start a separate thread for this?

On Sun, Apr 22, 2012 at 2:02 AM, Reinout van Rees wrote:

> On 12-04-12 09:44, Timothy Makobu wrote:
>
>> The Django book is the best source of understanding Django I have found
>> http://www.djangobook.com/en/**2.0/ <http://www.djangobook.com/en/2.0/>
>>
>> However, it's three years old now. Is the info on it still valid?
>>
>> Is there a plan to update it?
>>
>
> Well, I'm writing a book on Django for the pragmatic programmers:
> http://pragprog.com/book/**rvrdj/solid-django<http://pragprog.com/book/rvrdj/solid-django>:-)
>
> There's not much to see there now as I'm still writing it, but at least
> you can click on the "progress" link and get a visualization of the
> progress.
>
> See 
> http://reinout.vanrees.org/**weblog/tags/book.html<http://reinout.vanrees.org/weblog/tags/book.html>
>
>
> Most available books are quite old, so I'm doing my best to get this one
> out so that there's a current book. I'm targetting Django 1.4 so that's
> pretty current :-)
>
>
> Reinout
>
> --
> Reinout van Reeshttp://reinout.vanrees.org/
> rein...@vanrees.org 
> http://www.nelen-schuurmans.**nl/<http://www.nelen-schuurmans.nl/>
> "If you're not sure what to do, make something. -- Paul Graham"
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<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.



Re: URL regex not matching

2012-04-22 Thread yati sagade
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 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.



Re: URL regex not matching

2012-04-22 Thread yati sagade
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 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 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 
>> 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.



Re: @login_required do nothing

2012-04-28 Thread yati sagade
Hi
Have you set the LOGIN_URL setting in settings.py? That setting should be
assigned a location(e.g., "/login/") to redirect to when your view is
called without the user logged in. Also, you can do this if for some reason
you don't want to have that setting.

@login_required(login_url="/login/")
def index(request):
 


On Sun, Apr 29, 2012 at 10:15 AM, Jonathan Baker <
jonathandavidba...@gmail.com> wrote:

> Apologies, as I shouldn't have assumed that the import had not taken
> place. Would you mind posting the views.py to pastebin or codepad?
>
>
> On Sat, Apr 28, 2012 at 2:24 PM, marcelo nicolet <
> marcelo.nico...@gmail.com> wrote:
>
>> Thanks, but of course the views module does the import.
>> I'm a python newbie. Just to test it, I commented the import line, and
>> the page loads without trouble. I suppose that referencing a symbol not
>> imported would raise an exception!
>>
>>
>> On 04/28/2012 04:18 PM, Jonathan D. Baker wrote:
>>
>>> You have to be sure and import the module at the top of your script:
>>> from django.contrib.auth.decorators import login_required. Otherwise, it's
>>> never in scope and thus not available.
>>>
>>> Sent from my iPhone
>>>
>>> On Apr 28, 2012, at 1:00 PM, marcelo 
>>> nicolet>
>>>  wrote:
>>>
>>>  Hi
>>>> Following the on-line docs ( https://docs.djangoproject.**
>>>> com/en/1.4/topics/auth/<https://docs.djangoproject.com/en/1.4/topics/auth/>)
>>>>  I decorated my "index" view with @login_required, but nothing happens. In
>>>> other words, it'supossed I would be redirected to a login page, else an
>>>> exception migth raise. But the whole thing keeps doing as always.
>>>> What am I doing the wrong way?
>>>>
>>>> TIA
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> To unsubscribe from this group, send email to django-users+unsubscribe@
>>>> **googlegroups.com .
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>>> .
>>>>
>>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to django-users+unsubscribe@**
>> googlegroups.com .
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>> .
>>
>>
>
>
> --
> Jonathan D. Baker
> Developer
> http://jonathandbaker.com
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



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



Re: html5 + Django

2012-04-30 Thread yati sagade
I suggest Nginx to serve your static files, and possibly also as a reverse
proxy to point to your Django with Gunicorn/Apache setup (If you haven't
considered Gunicorn as a production server yet, please do. It is fantastic).

On Mon, Apr 30, 2012 at 11:21 PM, HarpB  wrote:

> It is much better to use Apache for static files than Django. You can
> still run DJango for data validation, but all static content is typically
> served via Apache. In your  virtualhost, you should proxy the /static/
> endpoint to the /static/ folder in Django app.
>
>
> On Sunday, April 29, 2012 5:39:15 AM UTC-7, collectiveSQL wrote:
>>
>> Hi Everyone,
>>
>> I'm working on a heavily animated web site using the html5 canvas tag.
>> Its mainly made of html, javascript and css static files and I'd like
>> to integrate the Google Identity Toolkit for an Oauth 2.0 account
>> chooser for signup and registration.
>>
>> The first question is Django a good candidate for serving up mainly
>> static files and using a small Django app for authentication?
>>
>> And secondly what performance impact would this have over straight
>> apache?
>>
>> More info:
>>
>> 1. Static web files such as html, javascript and css are stored on
>> Amazon AWS S3
>> 2. Data is loaded via oData using jsdata for animations
>> 3. Amazon AWS EC2 is used to scale apache web servers
>>
>> Thanks in advance.
>
>  --
> 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/-/p30N-x76AEgJ.
>
> 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.



Re: Port Django to Javascript

2012-05-02 Thread yati sagade
I am a Django user, but I don't see anything wrong in a JS framework
inspired by Django. Afterall, only great things can inspire. But I fail to
understand why JavaScript has to be only client side - It is a perfectly
valid choice as a server side language for not all, but certainly some use
cases. Besides, the server-side portion and the client-side portions can
share code. I recently wrapped up a project that involved using
Node.js<http://nodejs.org>in the backend, and man how I missed Django
there. The current sane choice
for a web framework on top of Node is Express.js
<http://expressjs.com/>(Node is itself very low level) - which is
inspired by
Sinatra <http://www.sinatrarb.com/>, a web development framework(they call
it a DSL) for Ruby. My point is when something inspired by a Ruby
server-side framework can become the de-facto standard choice for the
Node.js community, why not let them taste Django? I personally find the
idea compelling, but *only* if the server-side capabilities of the language
are respected. If we look solely at the client side, no-one would want to
ditch jQuery/Prototype ;)

Now for the motivation, I would always love to hack together a quick app
using the same language(and importantly, the same mindset) both on the
server and client sides ;) And yes, with the WebWorkers API ported to work
with Node.js <http://blog.std.in/2010/07/08/nodejs-webworker-design/>(never
tried) we are going to see some serious advancements.

I understand people's minds have been brutally injured by JavaScript in the
past(I'm one of them), but then it *is* a capable language, and it doesn't
harm if someone is willing enough to bring reusability and structure to
apps written in it by means of a framework.

Cheers!

On Wed, May 2, 2012 at 3:02 PM, N.Aleksandrenko wrote:

> Why do you want to port django to javascript, there are great js libs
> and frameworks. It will be better to make a js bundle for django
> making in ajax ready.
> Js Tools working out of the box. Such as:
> + ajax upload
> + ajax registration with error handeling
> + ajax pages
> + binding django and a js framework (as backbone)
> + bind django with ad ui library (as jquery ui)
>
> and much more basic stuff
>
> Building the apps with django is still not DRY. If you are a frontend
> developer you can make a bundle to make django better and many people
> may find it helpfull and use it.
> If you decide to start such project ... call :) me i can i will help
> with ideas and code.
>
>
>
> On Wed, May 2, 2012 at 11:51 AM, Gerald Klein  wrote:
> > Maybe I missed an earlier post but I am always looking for new projects
> > please explain your requirements.
> >
> > --jerry
> >
> >
> > On Wed, May 2, 2012 at 2:15 AM, DvD  wrote:
> >>
> >> Hey,
> >> is no one is really interested in helping in this project?
> >>
> >> --
> >> 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/-/kQ_GesNzV7wJ.
> >> 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.
> >
> >
> >
> >
> > --
> >
> > Gerald Klein DBA
> >
> > contac...@geraldklein.com
> >
> > www.geraldklein.com
> >
> > j...@zognet.com
> >
> > 708-599-0352
> >
> >
> > Linux registered user #548580
> >
> >
> >
> > --
> > 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.



Re: Port Django to Javascript

2012-05-02 Thread yati sagade
With ya. Let me get done with my exams, and hopefully I'll be able to
contribute(and use, obviously) :)
PS: Why the name Broke?? :O

On Wed, May 2, 2012 at 9:45 PM, DvD  wrote:

> Actually, I already put together some code that works on node.js inspired
> by Django, have a look https://github.com/brokenseal/broke
> My original intention was to create a framework that would work seamlessly
> on the server and on the client side but it was just too much for me that I
> left that project aside to concentrate on the client side only with
> https://github.com/brokenseal/broke-client
>
> I'm not asking help to start the project, I'm asking for help to make an
> already existing project a kick ass open source project with a community
> around it and I think that this is the right place since we all share
> Django love :)
>
>
> Il giorno mercoledì 2 maggio 2012 16:11:45 UTC+2, yati sagade ha scritto:
>
>> I am a Django user, but I don't see anything wrong in a JS framework
>> inspired by Django. Afterall, only great things can inspire. But I fail to
>> understand why JavaScript has to be only client side - It is a perfectly
>> valid choice as a server side language for not all, but certainly some use
>> cases. Besides, the server-side portion and the client-side portions can
>> share code. I recently wrapped up a project that involved using 
>> Node.js<http://nodejs.org>in the backend, and man how I missed Django there. 
>> The current sane choice
>> for a web framework on top of Node is Express.js 
>> <http://expressjs.com/>(Node is itself very low level) - which is inspired by
>> Sinatra <http://www.sinatrarb.com/>, a web development framework(they
>> call it a DSL) for Ruby. My point is when something inspired by a Ruby
>> server-side framework can become the de-facto standard choice for the
>> Node.js community, why not let them taste Django? I personally find the
>> idea compelling, but *only* if the server-side capabilities of the language
>> are respected. If we look solely at the client side, no-one would want to
>> ditch jQuery/Prototype ;)
>>
>> Now for the motivation, I would always love to hack together a quick app
>> using the same language(and importantly, the same mindset) both on the
>> server and client sides ;) And yes, with the WebWorkers API ported to
>> work with 
>> Node.js<http://blog.std.in/2010/07/08/nodejs-webworker-design/>(never tried) 
>> we are going to see some serious advancements.
>>
>> I understand people's minds have been brutally injured by JavaScript in
>> the past(I'm one of them), but then it *is* a capable language, and it
>> doesn't harm if someone is willing enough to bring reusability and
>> structure to apps written in it by means of a framework.
>>
>> Cheers!
>>
>> On Wed, May 2, 2012 at 3:02 PM, N.Aleksandrenko 
>> wrote:
>>
>>> Why do you want to port django to javascript, there are great js libs
>>> and frameworks. It will be better to make a js bundle for django
>>> making in ajax ready.
>>> Js Tools working out of the box. Such as:
>>> + ajax upload
>>> + ajax registration with error handeling
>>> + ajax pages
>>> + binding django and a js framework (as backbone)
>>> + bind django with ad ui library (as jquery ui)
>>>
>>> and much more basic stuff
>>>
>>> Building the apps with django is still not DRY. If you are a frontend
>>> developer you can make a bundle to make django better and many people
>>> may find it helpfull and use it.
>>> If you decide to start such project ... call :) me i can i will help
>>> with ideas and code.
>>>
>>>
>>>
>>> On Wed, May 2, 2012 at 11:51 AM, Gerald Klein  wrote:
>>> > Maybe I missed an earlier post but I am always looking for new projects
>>> > please explain your requirements.
>>> >
>>> > --jerry
>>> >
>>> >
>>> > On Wed, May 2, 2012 at 2:15 AM, DvD  wrote:
>>> >>
>>> >> Hey,
>>> >> is no one is really interested in helping in this project?
>>> >>
>>> >> --
>>> >> 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/-/kQ_**GesNzV7wJ<https://groups.google.com/d/msg/django-users/-/kQ_GesNzV7wJ>
>>> .
>>> >> To post to t

Re: Heroku.com experiences?

2012-05-11 Thread yati sagade
 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.



Re: Can't get a Chapter 7 example to work.

2012-05-12 Thread yati sagade
My wild guess is that you're returning an instance of ContactForm in one of
your views. A view should return an HttpResponse object. Check your view
that uses this form

On Sat, May 12, 2012 at 8:21 PM, django-user59 wrote:

> Hi,
>
> I could not get the Chapter 7 "contact" form example to work. The
> public copy-paste is here: http://dpaste.com/747112/copy/
>
> The message I get is:
>
> AttributeError at /contact/
> 'ContactForm' object has no attribute 'status_code'
>
> My ContactForm definition is as follows:
>
> from django import forms
>
> class ContactForm(forms.Form):
>subject = forms.CharField(max_length=100)
>email = forms.EmailField(required=False, label='Your e-mail
> address')
>message = forms.CharField(widget=forms.Textarea)
>def clean_message(self):
>message = self.cleaned_data['message']
>num_words = len(message.split())
>if num_words < 4:
>raise forms.ValidationError("Not enough words!")
>return message
>
> --
> 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.



Re: Can't get a Chapter 7 example to work.

2012-05-12 Thread yati sagade
Glad you solved it :)

Cheers

On Sun, May 13, 2012 at 4:07 AM, django-user59 wrote:

> Found the problem!
>
> The urls.py was set incorrectly -
>
> changed from:
>
> url(r'^contact/$', 'demoapp.contact.views.ContactForm'),
>
> to:
>
> url(r'^contact/$', 'demoapp.contact.views.contact'),
>
> and that makes it work.
>
> Thanks - your hint that the object was not a HttpResponse was important
> one to pursue.
>
>
> On Saturday, May 12, 2012 8:07:52 AM UTC-7, django-user59 wrote:
>>
>> Yati,
>>
>> Thanks so much for a fast response.
>>
>> Here is my views.py code - I thought I'm returning an instance of
>> HttpResponse.
>>
>> from django.http import HttpResponseRedirect
>> from django.core.mail import send_mail
>> from django.shortcuts import render_to_response
>> from demoapp.contact.forms import ContactForm
>>
>> def contact(request):
>> if request.method == 'POST':
>> form = ContactForm(request.POST)
>> if form.is_valid():
>> cd = form.cleaned_data
>> send_mail(
>> cd['subject'],
>> cd['message'],
>> cd.get('email', 'x...@example.com'),
>> ['x...@example.com'],
>> )
>> return HttpResponseRedirect('/**contact/thanks/')
>> else:
>> form = ContactForm(initial={'subject'**: 'I love your site'})
>> return render_to_response('contact_**form.html', {'form': form})
>>
>>
>>
>> On Saturday, May 12, 2012 8:01:57 AM UTC-7, yati sagade wrote:
>>>
>>> My wild guess is that you're returning an instance of ContactForm in one
>>> of your views. A view should return an HttpResponse object. Check your view
>>> that uses this form
>>>
>>> On Sat, May 12, 2012 at 8:21 PM, django-user59  wrote:
>>>
>>>> Hi,
>>>>
>>>> I could not get the Chapter 7 "contact" form example to work. The
>>>> public copy-paste is here: http://dpaste.com/747112/copy/
>>>>
>>>> The message I get is:
>>>>
>>>> AttributeError at /contact/
>>>> 'ContactForm' object has no attribute 'status_code'
>>>>
>>>> My ContactForm definition is as follows:
>>>>
>>>> from django import forms
>>>>
>>>> class ContactForm(forms.Form):
>>>>subject = forms.CharField(max_length=**100)
>>>>email = forms.EmailField(required=**False, label='Your e-mail
>>>> address')
>>>>message = forms.CharField(widget=forms.**Textarea)
>>>>def clean_message(self):
>>>>message = self.cleaned_data['message']
>>>>num_words = len(message.split())
>>>>if num_words < 4:
>>>>raise forms.ValidationError("Not enough words!")
>>>>return message
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> To unsubscribe from this group, send email to django-users+unsubscribe@
>>>> **googlegroups.com .
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/django-users?hl=en<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<http://www.ted.com/tedx/events/4933>
>>> https://www.facebook.com/**pages/TEDx-**EasternMetropolitanBypass/**
>>> 337763226244869<https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869>
>>>
>>>
>>>  --
> 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/-/IKBfOVtf7m0J.
>
> 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.



Re: Help.......!!

2012-05-15 Thread yati sagade
Hi
As mentioned earlier, please note that this list is meant to have Django
related discussions. And Django != Python unlike Ruby(on Rails). You may
want to ask your question in a place like stackoverflow.com.

Cheers :)
On Tue, May 15, 2012 at 11:40 PM, Tanveer Ali Sha wrote:

> Actually i wanna deploy front end user interface with django for network
> interface projectpls help me to get this
>
>
> On Tue, May 15, 2012 at 1:41 AM, Dennis Lee Bieber 
> wrote:
>
>> On Mon, 14 May 2012 20:30:33 +0530, Tanveer Ali Sha
>>  declaimed the following in
>> gmane.comp.python.django.user:
>>
>> >
>> > Am working on project which is based on Django n Sqlite3..Am new to
>> > Django but am strong in Python concept ...pls help me to build code
>> for
>> > those which I have mentioned in last mailPlease
>>
>> Nothing you asked for is specific to Django... You are asking
>> operating system utility questions...
>>
>>Let me put it this way.
>>
>>Without using Python/Django/SQLite/whatever -- how would you obtain
>> network interface information on whatever computer you need it for? When
>> you can answer that -- look in the Python standard library for some
>> package that supports that operation. (In the case of Windows, you may
>> need the Win32 extension package).
>> --
>>Wulfraed Dennis Lee Bieber AF6VN
>>wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> 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.



Re: Help - Which IDE is best to use.

2012-05-16 Thread yati sagade
Let  us take an oath not to answer any more of these IDE questions. I don't
mean to be rude, but PLEASE SEARCH BEFORE ASKING. PLEASE do. Every other
day someone asks.
 "Hi I'm new to Django, What IDE should I use?"

 and a steady stream of replies like "I use xxx", "I like yyy, but XXX
looks good.." start appearing. Enough, people.

Old members, PLEASE direct the OPs of such questions to an existing thread,
or ask them to search rather than answering. If one person answers, others
feel tempted to do so, I don't know why.

No offence meant to anyone, but this is just annoying.

On Wed, May 16, 2012 at 5:59 PM, Kejun He  wrote:

> Hi,
>   I using wingide
>
>  --
> 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.



Re: Is Django Right for Me?

2012-05-28 Thread yati sagade
 to
>> users. Django doesn't have any built-in PDF generation capability, but
>> there are a lot of Python libraries that can be used to generate PDFs,
>> and it's easy to use Django to extract data and feed it into a PDF
>> generator. Django's documentation contains some simple examples of how
>> this can be done. [1]
>>
>> [1] https://docs.djangoproject.com/en/1.4/howto/outputting-pdf/
>>
>> So - Django will be great on the server side. However, the bigger part
>> of your problem is the client side, and that's an area where Django
>> has deliberately avoided offering a solution, so you'll need to
>> combine Django with some client-side tools that are able to:
>>
>>  * Provide access to the camera and geolocation features of the device
>> you're on
>>  * Store data on the device while there is no live access to the server
>>  * Cache updates on the mobile device while offline for delivery when
>> it comes back online.
>>  * If necessary, synchronize updates made on the mobile device with
>> updates on the server
>>
>> Features like geolocation and offline access can be implemented in
>> native HTML5 without the need to build an app at all; see
>> http://html5demos.com for some examples of the cool things you can do
>> on webpages with a modern browser. You can also use a HTML5-based
>> development approach embedded in a native app container; for example,
>> tools like Phonegap [2] and Appcelerator [3] are designed to help out
>> here.
>>
>> [2] http://phonegap.com/
>> [3] http://www.appcelerator.com/
>>
>> I can't say I know of any libraries that can be used to address the
>> synchronisation problem -- but then, I haven't really been looking for
>> one either. It wouldn't surprise me if there is something out there
>> that you could use, but if it does, it's got very little to do with
>> the Django side of the fence -- all Django cares about is that you're
>> using HTTP to communicate with the server.
>>
>> So - in summary:
>>  * Yes, Django could be a useful part of your tech stack to do what
>> you're describing
>>  * However, it won't solve the problem on it's own -- you'll need to
>> pick a client side framework too.
>>
>> Yours,
>> Russ Magee %-)
>>
>> --
>> 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.
>>
>>
>
>
> --
> ketika anda mentok, anda bisa memutar atau maju terus, tapi tidak mundur
>
> Ivan Sugiarto Widodo, ST
> Commander In Chief
> PT Widodo Rekayasa Komputasi
> http://ivan-sugi.blogspot.com
> http://wirekom.co.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.
>



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



Re: Python IDLE

2012-05-28 Thread yati sagade
After you've fixed your file extension association problems as outlined in
the previous answer, PLEASE do not use IDLE to do anything remotely close
to editing. Go search for "Notepad++", download it and use it to always
edit your Python files. To get the contents of the file into IDLE for
testing, just import the module. The very thought of using IDLE to edit
files gave me goosebumps.

Cheers!

On Mon, May 28, 2012 at 7:08 PM, Andre Terra  wrote:

> For one thing, I don't know of anybody who uses IDLE as their editor for
> writing complex code like when developing a website with Django.
>
> You can always type 'python manage.py runserver' instead of just
> 'manage.py runserver' to make sure python is the program that's opening
> your .py file.
>
> It seems like you have a problem with your file associations. To fix this,
> go to the registry (Start Menu, Run, regedit) and browse to:
>
> *HKEY_CLASSES_ROOT\Python.File\shell\open\command*
>
> You should have a string there named '(Default') and its value should be
> exactly this (including quotes): *"C:\Python26\python.exe" "%1" %**
>
> You could have a different python path depending on your installation
> (say, C:\Program Files\Python27), but you get the gist. Don't forget the
> quotes and the trailing %*
>
>
> Cheers,
> AT
>
>
> On Mon, May 28, 2012 at 9:37 AM, coded kid  wrote:
>
>> I'm in a big mess now, I've lost my projects due to this errror. I'm
>> on windows, This is how I encounter the problem; I try to edit my
>> settings.py in IDLE. After right clicking on the files, I choose open
>> program with these default file. I choose idle window bat file, and I
>> clicked Ok. It didn't open, I try to run manage.py runserver on my
>> DOS. Not working, it will pop up the IDLE Shell and mange.py script by
>> displaying it in IDLE. It didn't run the server. The logo of my python
>> files have changed. How can I revert it back to open with IDLE? And
>> use it as default for my python script?
>>
>> --
>> 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.



Re: url_dir

2012-06-06 Thread yati sagade
it says that request to a path(after the project specific url parts are
stripped) starting with "pyrheology/plot/str/" followed by one or more
digits followed by ".png" (example: pyrheology/plot/str/123.png) will be
handled by the view 'pyrheology.views.str_tmc_plot_img' and the number(in
the example, 123) will b passed to that view as a keyword parameter called
`str_tmc_id`. The last part (name=...) is the name of the url pattern
itself.

On Wed, Jun 6, 2012 at 4:02 PM, Satvir Toor  wrote:

> I installed a application source code downloaded from Internet .
> Please explain me the following code that exists in urls.py file of
> the project.
> url(r'^pyrheology/plot/str/(?P\d+).png$',\
>'pyrheology.views.str_tmc_plot_img',\
>name='pyrheology-str-tmc-plot-img'),
>
> --
> Satvir Kaur
> satveerkaur.blogspot.in
>
> --
> 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.



Re: url_dir

2012-06-06 Thread yati sagade
it means 1 or more digits (0-9)

On Wed, Jun 6, 2012 at 4:20 PM, Satvir Toor  wrote:

> I read the link
> https://docs.djangoproject.com/en/1.3/topics/http/urls/
>
> above unable to understand what is regular expression in url pattern
> e.g r'^pyrheology/plot/tensile/(?P\d+).png$'
>
>
>
>
>
>  --
>  Satvir Kaur
>  satveerkaur.blogspot.in
>
> --
> 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.



Re: masking only a small part of a template

2012-07-08 Thread yati sagade
I'm not sure by what you mean; There has always been template inheritance
in Django :) Just specify the template you want to extend as the first
statement in the template and to override a block in the template, just
start a block with the same name as the block you want to override. For
example, to override a block called "main" in "some_3rd_party/base.html",
you'd do something like:

{% extends "some_3rd_party/base.html" %}
...
{% block main %}
   
{% endblock %}
...

All the blocks you don't override in the base template get included in the
resultant template as is. Sorry if you already knew all that :)

On Mon, Jul 9, 2012 at 7:36 AM, tWoolie  wrote:

> I have a template in a 3rd party app that i'm trying to override, but only
> a single block.
> Is there any way that I can do this without copy-pasting the entire
> template into the global templates dir just to change a few lines?
> Is there any way to create a template that "extends" itself from further
> down the search tree?
>
> --
> 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/-/snmqZSyfNlkJ.
> 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> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



Re: What is the easy way to install DJango?

2012-08-16 Thread yati sagade
While other answers have covered nicely how to install Django on your
system, you might want to take this opportunity to venture in to the
wonderful land of UNIX. It will make your life much, much easier :) If you
have the option, install Linux beside your Windows in a dual boot setting
and after that, Django and ALL Django app goodness is just one command away.

On Wed, Aug 15, 2012 at 8:23 PM, Vibhu Rishi  wrote:

> Hi,
>
> If you are new to Django and are just getting around to learn it, I
> recommend using BitNami Django stack for windows.
> http://bitnami.org/stack/djangostack
>
> So far, it has been the easiest to install on the windows machine.
>
> Vibhu
>
>
> On Wednesday, 15 August 2012 14:06:33 UTC+5:30, Thato wrote:
>>
>> Hi guys I want to install Django on my windows computer please help me
>> the easy way to install Django frame work.
>>
>> Regards
>> AbcThato
>>
>  --
> 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/-/70BcZ0yFvWMJ.
>
> 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

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



Re: Can I simply disable the CSRF? crazy

2012-09-23 Thread yati sagade
Remove {% csrf_token %} from the form AND leave the csrf_exempt decorator
as it is in the view. Everyone faces challenges while learning a new thing.
The key is to face it head on and not to move to somewhere you think there
will be no challenges :)

On Mon, Sep 24, 2012 at 1:14 AM, puneet loya  wrote:

> Hi
>
> I was trying to disable csrf . I am calling post using ajax.
>
> I have used the csrf token placed it below the form.
>
> In my views file i m using the csrf exempt.
>
> I am still getting the network forbidden error. :(
>
> If you require more information i will share it :)
>
> On Thursday, 19 August 2010 06:49:02 UTC+5:30, chenge wrote:
>>
>>
>>
>> On 8月18日, 上午4时29分, Rolando Espinoza La Fuente 
>> wrote:
>> > On Tue, Aug 17, 2010 at 8:01 AM, chenge  wrote:
>> > > I'm new to django. CSRF let me crazy!
>> >
>> > Can't use {% csrf_token %} tag inside your 's?
>> >
>> > See csrf_exempt decorator:http://docs.**djangoproject.com/en/dev/ref/**
>> contrib/csrf/#exceptions<http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions>
>> >
>> > Regards,
>> >
>> > Rolando Espinoza La fuentewww.insophia.com
>>
>> Thanks, I decide try flask first, that seems simple. Maybe I'll try
>> the exempt.
>
>  --
> 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/-/BQ5RpafQK3EJ.
> 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

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



(Re)Learning Django

2011-12-24 Thread yati sagade
Hi all,
I am familiar with Django (not the advanced stuff, though) and lately,
I had to be more into J2EE and completely away from Django. Now I want
to get back to Django. I was looking for a nice, fast paced resource
that could help me. I had first thought of The Django Book as a
fallback, but someone on #django pointed out that it is dated. Please
help.

Thanks
Yati Sagade

-- 
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: I can't start new project

2011-12-27 Thread yati sagade
AT,
and they say hackers belong only to Linux :P Good job!

On Tue, Dec 27, 2011 at 8:37 PM, Andre Terra  wrote:

> It's not just %, it's %* (notice the asterisk).
>
> I just tried changing the value back and forth here and it worked as
> expected.
>
>
> Cheers,
> AT
>
>
> On Tue, Dec 27, 2011 at 12:44 PM, Varrant wrote:
>
>> In registry % was missing, but nothing changed.
>>
>> "One time solution work's nice :D
>>
>> I'll lookfor virtualenv
>>
>> Thanks for help :)
>>
>> --
>> 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: {% elif %} error

2011-12-27 Thread yati sagade
There's no {% elif %}. You'll have to do:

{% if bookmark.hours %}
{{bookmark.hours}} hours ago
{% else %}
   {% if bookmark.days %}
   {{ bookmark.days }} days ago
   {% else %}
  {% if bookmark.months %}
  {{ bookmark.months }} months ago
  {% else %}
   {{ bookmark.years }} years ago
  {% endif %}
   {% endif %}
 {%endif}

(Sorry if I missed any closing {%endif%} - you'll have to balance those).
Also, I'd suggest you to do this logic part in the view itself.

On Wed, Dec 28, 2011 at 12:14 PM, Tsung-Hsien wrote:

> Hi,
> I want to use {% elif %}
> my template:
>{% if bookmark.hours %}
>{{ bookmark.hours }} hours ago
>{% elif bookmark.days %}
>{{ bookmark.days }} days ago
>{% elif bookmark.months %}
>{{ bookmark.months }} months ago
>{% else %}
> {{ bookmark.years }} years ago
>{% endif %}
>
>
> show error:
> Invalid block tag: 'elif', expected 'else' or 'endif'
>
> It can work without elif, if use if...else loop.
>
> my django version is 1.31
>
> how to solve this?
> 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.



Re: Django app for IP address lookup

2011-12-31 Thread yati sagade
Nice app :) can you share the sources? And happy new year to you, too!

On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow  wrote:

> Hi guys,
>
> Just sharing a simple Django app that allows you to do IP address lookup:
> http://dazzlepod.com/ip/
>
> Happy new year!
>
> --
> 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: Happy new year

2011-12-31 Thread yati sagade
Happy new year all :)

On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire  wrote:

> Happy new year dear folks !
>
> On Jan 1, 1:48 am, Sławomir Zborowski  wrote:
> > Happy new year, Django users :-) !
>
> --
> 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: Correct folder layout for a big Django application

2012-01-04 Thread yati sagade
Not that I have done "big" apps, but placing all the static content in
{{project_root}}/static/ under appropriate subdirs should do fine - e.g.,
/static/js, /static/css, /static/images etc. As for the other (dyanmic)
parts, the django project and app layouts should be enough. I think if you
hunt for Django apps on GitHub that suit your definition of "Big", you'll
can have what you want :)

On Thu, Jan 5, 2012 at 12:21 AM, IgorS  wrote:

> Can someone recommend a big existing Django application with the
> "right" folder layout?
>
> I would like to learn from some big application that has multiple
> model, test, view, template, .js, .css, image, utility, etc. files,
> which are nicely organized in different folders positioned below the
> application's main folder.
>
> Some people would recommend splitting the application into several
> application, but this is not what is needed here. I would like to
> learn how a big application should be properly structured (and see a
> good example if it odes exist).
>
> Sorry if the question is too demanding... :-)
>
> Thank you,
> -igor
>
> --
> 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: Automatic Client side validation for django forms

2012-01-07 Thread yati sagade
Why not use plain JS to validate at client side. And while dealing with
things like registration names(which may require the db) go for Dajax -
http://www.dajaxproject.com/

On Sat, Jan 7, 2012 at 11:48 PM, Karthik Abinav wrote:

> Hi,
>
>I was wondering if there exists some in-built AJAX validation on the
> form fields at the client side in django libraries. The form contains
> commonly used fields which are mostly alpha-numeric.
>
>
>
> Thanks,
>
> Karthik Abinav,
>
> 2nd year B.Tech
> Dept. of Computer Science and Engineering
> Indian Institute of Technology, Madras
>
>  --
> 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: I'm stuck on the first tutorial!! - Please HELP!!!!!!!!!!!!

2012-01-09 Thread yati sagade
just like __unicode__, was_published_today is also a method/function - so
do this:

def __unicode__(self):
return self.question

def was_published_today(self):
return self.pub_date.date() == datetime.date.today()

On Tue, Jan 10, 2012 at 2:11 AM, Nasir Rasul  wrote:

> check your indentation.
>def __unicode__(self):
>return self.question
>def was_published_today(self):
>return self.pub_date.date() == datetime.date.today()
> published_today should be at the same level as __unicode__.
>
> - Nasir
>
>
>
>
> On Mon, Jan 9, 2012 at 11:02 AM, Krondaj  wrote:
>
>>
>>
>> On page 19 of the Django documentation release 1.3.1 It tells you to
>> add
>>
>> import datetime
>> #...
>> class Poll(models.Model):
>>   def was_published_today(self):
>>return self.pub_date.date() == datetime.date.today()
>>
>> I have added this to the models.py code as including the other
>> __unicode__ additions as:
>> -
>> start
>>
>> code
>> from django.db import models
>>
>> # Create your models here.
>> import datetime
>>
>> class Poll(models.Model):
>>question = models.CharField(max_length=200)
>>pub_date = models.DateTimeField('date published')
>>def __unicode__(self):
>>return self.question
>>def was_published_today(self):
>>return self.pub_date.date() ==
>> datetime.date.today()
>>
>> class Choice(models.Model):
>>poll = models.ForeignKey(Poll)
>>choice = models.CharField(max_length=200)
>>votes = models.IntegerField()
>>def __unicode__(self):
>>return self.choice
>> -
>> start
>>
>> code
>>  when I type in the following python commands:
>>
>> >>> Poll.objects.get(id=3)
>> Traceback (most recent call last):
>>  File "", line 1, in 
>>  File "/usr/local/lib/python2.7/dist-packages/django/db/models/
>> manager.py", line 132, in get
>>return self.get_query_set().get(*args, **kwargs)
>>  File "/usr/local/lib/python2.7/dist-packages/django/db/models/
>> query.py", line 349, in get
>>% self.model._meta.object_name)
>> DoesNotExist: Poll matching query does not exist.
>> >>> Poll.objects.get(pk=1)
>> 
>>
>> It all works fine until:
>>
>> >>> p = Poll.objects.get(pk=1)
>> >>> p.was_published_today()
>> Traceback (most recent call last):
>>  File "", line 1, in 
>> AttributeError: 'Poll' object has no attribute 'was_published_today'
>>
>> I know I'm probably being a thicko (i haven't programmed anything
>> except a C-64 years ago as a kid), so i'm a n00b!
>>
>> What am i doing wrong??
>>
>> Thanks
>>
>> K
>>
>> --
>> 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: Database connection closed after each request?

2012-01-14 Thread yati sagade
I haven't used it,  but this might help
http://node.to/wordpress/2010/02/11/database-connection-pool-solution-for-django-mysql/Also,
have you tried using SQLAlchemy?

On Sun, Jan 15, 2012 at 8:06 AM, ydjango  wrote:

> Any updates on MySQL connection pool for django. Has anyone
> implemented it yet and willing to share?
> Graham Dumpleton also raised it in G+ today.
>
> On Nov 20 2011, 5:45 am, Jonathan  wrote:
> > Does anyone know if this progressed anywhere since '09?
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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: what is the best IDE to use for Python / Django

2012-01-23 Thread yati sagade
I think someone has already requested NOT to reply to this thread anymore.
Please STOP replying people.

On Mon, Jan 23, 2012 at 6:05 PM, Mario Gudelj wrote:

> I've used gedit, sublime text 2, emacs, vi, but the best Django IDE by far
> is PyCharm. I'm seriously amazed at how awesome it is. It's worth every
> cent.
>
>
> On 23 January 2012 22:20, Sandro Dutra  wrote:
>
>> The best IDE is that you fell comfortable using it.
>>
>> 2012/1/21 goosfancito :
>> > El 21/01/12 08:52, kenneth gonsalves escribió:
>> >
>> >> On Sat, 2012-01-21 at 03:34 -0800, John Yeukhon Wong wrote:
>> >>>
>> >>> While it has been asked a trillion times already, let me say TRY UT
>> >>> YOURSELF.
>> >>
>> >> you were requested not to feed this thread. If the OP cannot search,
>> >> here it is:
>> >>
>> >>
>> http://duckduckgo.com/?q=site%3Agroups.google.com%2Fgroup%2Fdjango-users
>> >> +python+IDE
>> >
>> > i used gedit only.
>> >
>> >
>> > --
>> > 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.
>



-- 
Yati Sagade <http://twitter.com/yati_itay>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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 Network settings from Python/Django

2012-01-23 Thread yati sagade
Hi Ganesh
Why do you want to do it with Django? You can go about building a light GUI
in python that accomplishes your task, but, again, since you say the
system's embedded, I don't know what libraries are you willing to put on
it. Also, it will require the Python runtime to be installed. That said,
this <http://code.google.com/p/ipaddr-py/> might help.

Cheers!


On Sun, Jan 22, 2012 at 2:50 PM, Ganesh Kumar  wrote:

> Hi guys
>
> I'm working on a simple web interface for an embedded computer. The
> computer will ship with a static default ip that will then need to be
> updated by the install tech who may not be tech/linux savvy.
>
> Basicly I need to change the following system settings from a Django app.
>
>1. IP Addres
>2. Subnet
>3. Default Gateway
>4. DNS Servers 1&2
>
> I realize that I can could just overwrite the config files in linux but I
> was wondering if there is a more "Python" way of doing it.
>
> I want any ready to use module is there, please guide me.
>
>
> -Ganesh.
> Did I learn something today? If not, I wasted it.
>
> --
> 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>

(@yati_itay <http://twitter.com/yati_itay>)

-- 
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 can I go about this?

2012-01-23 Thread yati sagade
Hi
You should probably start off by doing some homework and studying other
such systems which atleast partially implement what you want - I have done
a Twiiter clone with Django/MongoDB-Mongoengine
here<https://github.com/yati-sagade/django-mongo-twt>.
Then, read up on the Django comments framework and I'm sure you'll pull it
off.
And be sure not to re-invent the wheel - use what's already been done!

Cheers!
Yati Sagade

On Sun, Jan 22, 2012 at 2:14 PM, coded kid  wrote:

> Thanks for the reply. I don't really mean twitter clone, just want
> want users to post update, so their friends can comment, and reshare
> the post. And it will be build in django.
>
> Donald Casson wrote:
> > This is a very open ended question.  There are many different ways in
> which you could achieve the same thing.
> >
> >
> > Just offering a suggestion here:
> >
> > I would take a read through the retwis docs, although it is php and
> redis it should give you enough of an understanding on how to implement
> some of the ideas in django.
> >
> > http://redis.io/topics/twitter-clone
> >
> > Cheers
> > Don
> >
> >
> >
> > On 22/01/2012, at 6:11 PM, coded kid wrote:
> >
> > > Hey guys, please I want you to give me a brief on how I can go about
> > > making users post status update for their friends to see. Just like
> > > how its been done on twitter. Where you tweet whats happening and
> > > after tweeting its will display your status with reply, retweet and
> > > favourite button below. Hope you get my point?
> > >
> > > --
> > > 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>

(@yati_itay <http://twitter.com/yati_itay>)

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

2012-11-25 Thread yati sagade
Hi. I've used django-nonrel for interfacing with the Google datastore on
appengine and I use mongoengine for the rest. I guess mongoengine is the
recommended way to work with mongodb on django. I've set up a small
example, a Twitter clone that uses mongoengine. The app can be deployed on
OpenShift, but the source should give you a clear view of what's going on.
Check it out 
here<https://github.com/yati-sagade/django-mongo-twt/tree/master/wsgi/openshift>.
The app is called twtapp. Look into settings.py to see how the mongodb
connection is established there. Then take a took at twtapp/documents.py to
see how to define documents (these are the mongodb equivalents of
"models"). Then hack around to see how it all works. You can also deploy
this app on openshift <https://openshift.redhat.com/app/> to see it running
in the cloud.  It really is very simple :)

Regards


On Sun, Nov 25, 2012 at 10:14 PM, Carlos Aguilar wrote:

> You know which mongoengine and django-nonrel are 2 different libraries for
> mongodb???
>
> Please select one and use it, but not both.
>
> Best Regards
>
> --
> Carlos Aguilar
> Consultor Hardware y Software
> DWD&Solutions
> http://www.dwdandsolutions.com
> http://www.houseofsysadmin.com
> Cel: +50378735118
> USA: (301) 337-8541
>
>  --
> 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

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



Re: Django-MongoDb deployment at production servert

2012-12-11 Thread yati sagade
Hi
Whether your database should live on a separate server or not is a question
you can best answer by testing various configurations out depending on the
load your app expects. As for the webserver, you can (and probably should)
do away with Apache, and try GUnicorn, which is a great WSGI webserver that
supports Django out-of-the-box. We also use Nginx as a reverse proxy to
GUnicorn so that load balancing and static files seving happens at Nginx
level. Though this is not exactly for production, you can get an idea of
what I'm talking about by reading this post [DISCLAIMER: I'm the author!]
http://ydevel.tumblr.com/post/22850778860/configuring-an-https-site-with-django-on-nginx

We have a DB intensive operations going on anytime, so we typically host
MongoDB on a server by itself, which is the generally preferred way.


On Tue, Dec 11, 2012 at 11:08 PM, Sam Solomon  wrote:

> I'm guessing that the problem is there are many ways to deploy Django so
> it's hard for anyone to give a good one-size-fits-all answer and also hard
> to run down the complete list of possibilities, and I'm guessing that since
> this list is only viewed by a small percentage of Django users, that there
> are even fewer people who have used MongoDB on this list (example: I
> haven't used it). It might be a good idea to ask MongoDB questions on
> whatever support system is available for django-MongoDB.
>
> As for me, I've probably learned everything I know about deploying Django
> by googling stuff like "deploying Django with nginx" "deploying Django with
> mod_wsgi" etc (we use nginx for static files and reverse proxying to Apache
> with mod_wsgi (though if I were to start over today I'd give serious
> consideration to gunicorn))
>
> As for not using nginx/Apache, I believe that that is discouraged for
> anything other than local development (though you could technically do it,
> and actually, I think guinicorn can be run in a similar way to runserver
> without needing to configure nginx or Apache).
>
>
> On Monday, December 10, 2012 12:27:09 PM UTC-8, Chuck James wrote:
>>
>> Really no one  have Answer for this post, how people running big website
>> using django, if no body knows how to deploy it.
>>
>>
>> On Monday, December 10, 2012 12:32:29 PM UTC-5, Chuck James wrote:
>>>
>>> Hi,
>>>
>>> I am developing a website using Django and MongoDb (
>>> http://django-mongodb.org/). I have read lots of forums and posts but
>>> still not able to figure it out what is the best way or default way to
>>> deploy Django project on web. So I have couple of questions related to
>>> this, it will be great if some one can guide me.
>>>
>>> > Do I need a dedicated servers to implement Django with MongoDb if yes
>>> then what is the min/max requirement for them. What all controls and
>>> permissions I need for those servers.
>>> > What is the default way to deploy it (Django project with MongoDb),
>>> what is the best way to deploy it.
>>> > Can we deploy it without using apache or nginx. Like some kind of
>>> server in python best to deploy Django project and I don't need to install
>>> any other web server for it.
>>>
>>> Thanks in advance :)
>>>
>>  --
> 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/-/DKx6tJySMaIJ.
>
> 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

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



Re: Django-MongoDb deployment at production servert

2012-12-11 Thread yati sagade
A webserver written in Python is almost certainly something you don't want
for production as frankly, Python in its current form is just not suited
for that.  You can try Tornado, though, which is a pure Python non-blocking
webserver that seems to be very scalable. The "best" way - you can arrive
at that by reading how people are doing it, like on
http://instagram-engineering.tumblr.com/ or http://engineering.pinterest.com
Twitter's engineering blog is always a treat to read, as is Google's.
There's a very interesting article on YouTube's backend, which is written
in Python: http://highscalability.com/youtube-architecture
There are countless such resources, and the only thing you'll notice by
reading them is that over and above the widely accepted best practices, the
deployment needs of companies vary greatly and the solution that works for
them is a result of experience and experimentation. Likewise, there is not
"default" setup to suggest here as even a small company's "default" setup
is often tailored to its needs and is hence the "best" for itself! Cheers :)


On Wed, Dec 12, 2012 at 12:36 AM, Chuck James wrote:

> Thanks for the reply guys :).
>
> The reason, I am mentioning the DB here, is that MongoDb is not a
> relational database, so when one will tell me the Django deployment, he
> should keep non relational database in mind.
>
> Other point, deployment without any common web server (apache/nginx)
> because python it-self a nice language,  then why should we convert our
> project, so that apache/nginx will understand our code. There should be
> some good webserver in python. This will reduce the overhead on web server,
> I guess.
>
> The default way and the best way to deploy it means:
> Best way: What is the deployment process for the other best sites
> (firefox/pininterest/...), how are they deploying it.
> Default way: The easiest way for easiest configuration setting/ lease
> server end changes. And most people use it to deploy.
>
>
> Looking forward for your replies :).
>
>
>
>
> On Tuesday, December 11, 2012 12:53:49 PM UTC-5, yati sagade wrote:
>
>> Hi
>> Whether your database should live on a separate server or not is a
>> question you can best answer by testing various configurations out
>> depending on the load your app expects. As for the webserver, you can (and
>> probably should) do away with Apache, and try GUnicorn, which is a great
>> WSGI webserver that supports Django out-of-the-box. We also use Nginx as a
>> reverse proxy to GUnicorn so that load balancing and static files seving
>> happens at Nginx level. Though this is not exactly for production, you can
>> get an idea of what I'm talking about by reading this post [DISCLAIMER: I'm
>> the author!] http://ydevel.tumblr.com/post/**22850778860/configuring-an-*
>> *https-site-with-django-on-**nginx<http://ydevel.tumblr.com/post/22850778860/configuring-an-https-site-with-django-on-nginx>
>>
>> We have a DB intensive operations going on anytime, so we typically host
>> MongoDB on a server by itself, which is the generally preferred way.
>>
>>
>> On Tue, Dec 11, 2012 at 11:08 PM, Sam Solomon  wrote:
>>
>>> I'm guessing that the problem is there are many ways to deploy Django so
>>> it's hard for anyone to give a good one-size-fits-all answer and also hard
>>> to run down the complete list of possibilities, and I'm guessing that since
>>> this list is only viewed by a small percentage of Django users, that there
>>> are even fewer people who have used MongoDB on this list (example: I
>>> haven't used it). It might be a good idea to ask MongoDB questions on
>>> whatever support system is available for django-MongoDB.
>>>
>>> As for me, I've probably learned everything I know about deploying
>>> Django by googling stuff like "deploying Django with nginx" "deploying
>>> Django with mod_wsgi" etc (we use nginx for static files and reverse
>>> proxying to Apache with mod_wsgi (though if I were to start over today I'd
>>> give serious consideration to gunicorn))
>>>
>>> As for not using nginx/Apache, I believe that that is discouraged for
>>> anything other than local development (though you could technically do it,
>>> and actually, I think guinicorn can be run in a similar way to runserver
>>> without needing to configure nginx or Apache).
>>>
>>>
>>> On Monday, December 10, 2012 12:27:09 PM UTC-8, Chuck James wrote:
>>>>
>>>> Really no one  have Answer for this post, how people running big
>>>&

Re: manage.py collectstatic?

2012-12-28 Thread yati sagade
Hey Derek, this page will answer all your questions, hopfully:
https://docs.djangoproject.com/en/dev/howto/static-files/


On Sat, Dec 29, 2012 at 1:02 PM, Derek  wrote:

> When I run this command, I get:
>
> You have requested to collect static files at the destination
> location as specified in your settings.
>
> This will overwrite existing files!
> Are you sure you want to do this?
>
> Q1:  Where is this location specified in settings?
>
> Q2: Which files will be overwritten and why?
>
> Thanks
> Derek
>
> --
> 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

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



Re: Happy new year

2012-12-31 Thread yati sagade
Thanks all :) Here's India wishing a very happy, healthy and prosperous new
year to all Djangonauts around the world :)


On Tue, Jan 1, 2013 at 10:43 AM, JOSE LUIS FABREGA wrote:

> Feliz año nuevo, desde venezuela
>
> ¡Le deseamos lo mejor !
>
> --
> 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

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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.



Re: newbie confused about urls

2013-01-31 Thread yati sagade
Hi
You usually define get_absolute_urls() on a model to let Django know how to
derive a URL for that object. The docs for get_absolute_url can be found
here<https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#get-absolute-url>.
I advise you to understand how URL routing works in Django thoroughly,
especially how not to hardcode stuff into your models. In the linked page,
you'll also see how you can use `reverse` to reference formatted URLs from
the urlconf in question.

Regards


On Thu, Jan 31, 2013 at 11:26 PM, frocco  wrote:

> I am following the "Beginning Django e-commerce" book and he uses the
> get_absolute_url method in his models.
> The book is dated (2009) and being new, I am not sure what applies.
> He also creates urls.py in each module directory, but when I run it, it
> never finds it.
> it defaults to the main urls.py that was created when I created the
> project.
>
>
> On Thursday, January 31, 2013 11:54:37 AM UTC-5, Mike Doroshenko II wrote:
>
>>  You mean mappings urls to views(pages?). Because if get_absolue_url is
>> like request.get_full_path() then you would use that in the view itself
>> and use urls.py to map urls to pages/views. And templates are are called
>> from in views.
>>
>> frocco wrote:
>>
>> Hi All,
>>
>>  I am trouble understanding how to use urls.
>> I see tutorials that have get_absolue_url, url  mysite, ect.
>>
>>  I need to do:
>>
>>  1. load a page with no parameters
>> 2. load a page with 1 parameter
>> 3. load a page with more than 1 parameter
>>
>>  What should my templates look like?
>>
>>  Thank you
>>
>>
>>
>>  --
>> 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...@**googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>>
>> Visit this group at 
>> http://groups.google.com/**group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>> --
>> Mike Doroshenko, Junior Sys Admin
>> TecKnoQuest Inc.
>> mi...@tecknoquest.comwww.tecknoquest.com
>>
>>   --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: newbie confused about urls

2013-01-31 Thread yati sagade
Okay, please paste the full error page contents at http://dpaste.org
Also, show us your models.py which contains the Order model


On Fri, Feb 1, 2013 at 6:25 AM, frocco  wrote:

> I am getting this error:
> TypeError at /order_details/17/
>
> 'str' object is not callable
>
>
> urls.py
>  (r'^order_details/(?P[-\w]+)/$', 'order_details',
>  {'template_name': 'registration/order_details.html'},
> 'order_details'),
>
> template
> Order #{{ order.id }} - {{
> order.date|date }}  (view)
>
> views.py
> def order_details(request, order_id,
> template_name="registration/order_details.html"):
> """ displays the details of a past customer order; order details can
> only be loaded by the same
> user to whom the order instance belongs.
>
> """
> order = get_object_or_404(Order, id=order_id, user=request.user)
> page_title = 'Order Details for Order #' + order_id
> order_items = OrderItem.objects.filter(order=order)
> return render_to_response(template_name, locals(),
> context_instance=RequestContext(request))
>
>
> On Thursday, January 31, 2013 2:17:24 PM UTC-5, yati sagade wrote:
>
>> Hi
>> You usually define get_absolute_urls() on a model to let Django know how
>> to derive a URL for that object. The docs for get_absolute_url can be
>> found  
>> here<https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#get-absolute-url>.
>> I advise you to understand how URL routing works in Django thoroughly,
>> especially how not to hardcode stuff into your models. In the linked page,
>> you'll also see how you can use `reverse` to reference formatted URLs from
>> the urlconf in question.
>>
>> Regards
>>
>>
>> On Thu, Jan 31, 2013 at 11:26 PM, frocco  wrote:
>>
>>> I am following the "Beginning Django e-commerce" book and he uses the
>>> get_absolute_url method in his models.
>>> The book is dated (2009) and being new, I am not sure what applies.
>>> He also creates urls.py in each module directory, but when I run it, it
>>> never finds it.
>>> it defaults to the main urls.py that was created when I created the
>>> project.
>>>
>>>
>>> On Thursday, January 31, 2013 11:54:37 AM UTC-5, Mike Doroshenko II
>>> wrote:
>>>
>>>>  You mean mappings urls to views(pages?). Because if get_absolue_urlis like
>>>> request.get_full_path() then you would use that in the view itself and
>>>> use urls.py to map urls to pages/views. And templates are are called from
>>>> in views.
>>>>
>>>> frocco wrote:
>>>>
>>>> Hi All,
>>>>
>>>>  I am trouble understanding how to use urls.
>>>> I see tutorials that have get_absolue_url, url  mysite, ect.
>>>>
>>>>  I need to do:
>>>>
>>>>  1. load a page with no parameters
>>>> 2. load a page with 1 parameter
>>>> 3. load a page with more than 1 parameter
>>>>
>>>>  What should my templates look like?
>>>>
>>>>  Thank you
>>>>
>>>>
>>>>
>>>>  --
>>>> 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...@**googlegroups.**com.
>>>> To post to this group, send email to django...@googlegroups.com.
>>>>
>>>> Visit this group at http://groups.google.com/**group**
>>>> /django-users?hl=en <http://groups.google.com/group/django-users?hl=en>
>>>> .
>>>> For more options, visit 
>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>> --
>>>> Mike Doroshenko, Junior Sys Admin
>>>> TecKnoQuest Inc.
>>>> mi...@tecknoquest.comwww.tecknoquest.com
>>>>
>>>>   --
>>> 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...@**googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at 
>>> http://groups.google.com/**group/django

Re: Any good books for learning django?

2013-02-08 Thread yati sagade
You should read the Django tutorial and then maybe build an app that will
make you more comfortable with Django. It may be any app - a notes taking
app, for example. During the process, you'll pay a large number of visits
to the wonderful Django docs and will come to appreciate them. There is The
Django Book, which is dated, but if you carefully read it making sure you
what changed and what did not, there's a wealth of knowledge in there (I
was lucky as in when I picked up Django, The Django Book was not dated :))
Then, once you are really comfortable with Django, go for Two Scoops of
Django - really, buy it. It is worth it. The #django channel on Freenode is
an excellent way of asking help and learning new things by maybe helping
others in need.

Cheers

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Questions about vim

2013-02-14 Thread yati sagade
Check out this post <http://haridas.in/vim-as-your-ide.html> by @haridas_n


On Fri, Feb 15, 2013 at 12:02 AM, Trevor Joynson wrote:

> Jedi seems to work the best for me.
>
> My vim config is on my github if you're interested:
> http://github.com/akatrevorjay/dotfiles-vim.got
>  On Feb 12, 2013 6:23 AM, "Yussi"  wrote:
>
>> Hi,
>> I was wondering if there are any vim users here who managed to get a
>> productive working environment for django here.
>>
>> I looked at the manuals, and set myself up with tags, omni complete, and
>> syntax error check, but it's far from ideal. omni complete fails to guess
>> the context correctly most of the time, and is otherwise lacking what I
>> expect from an ide, namely I would like to be able to see function headers
>> when typing so I know what arguments to give it,I would like some short
>> cuts for local variables, I would like some easy vim templates for things
>> like CharField, DateField etc, I am still new to django, and i really don't
>> remember enough to free code everything.
>>
>> any other tip of using vim with django would be appreciated.
>>
>> thanks,
>> Yussi
>>
>> --
>> 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+unsubscribe@**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?hl=en<http://groups.google.com/group/django-users?hl=en>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: IRC freenode channel

2013-02-21 Thread yati sagade
Hi Ankit
It looks like #django requires your nick to be identified with freenode.
Type this command in your IRC client to get started: "/msg NickServ help
register" (without the quotes, of course)

Regards


On Thu, Feb 21, 2013 at 5:57 PM, ANKIT BAGARIA wrote:

> Why is it that when ever I am not able to open django's channel on
> irc.freenode.net.. Please help. Thankyou.
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: IDE to practice django template language

2013-04-20 Thread yati sagade
I would suggest the OP to gather from this thread that a reaching general
consensus about this topic is impossible, and would request others to stop
the thread here, as there's no point continuing except that the OP might
possibly come to know about stuff they previously did not, but the Web is
full of that(and I'm sure there have been threads here previously) - Don't
get me wrong here, we just won't agree on what is best, because what is
best for me might not be the best for others :)

 @OP, you really don't need a separate IDE/editor for the template language
- use whatever you are comfortable with, and keep trying various
editors/IDEs. I know how it is to be bogged down by so many choices when
you're starting out. Just use whatever you like :)


On Sat, Apr 20, 2013 at 9:52 PM, Michael Hernandez <
michael.hernandez1...@gmail.com> wrote:

> Emacs???. IM not being a smart ### . I just feel it has everything you
> need. Like terminal Shell. It is bad for multiethnic files like html with
> Javascript in it. Unless you customize it further
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: SQLite database module name???

2013-04-21 Thread yati sagade
Hi Kakar, I can't say what is the problem with your environment with the
little info you have provided, but I feel this question can help you:
http://stackoverflow.com/questions/3384576/problems-setting-up-django-valueerror-empty-module-name
If that does not solve your problem, post the detailed stack-trace and your
settings.py file(with any sensitive info deleted, of course) so we can have
a look.

Cheers


On Sun, Apr 21, 2013 at 7:28 PM, Kakar wrote:

> I am in settings.py and  using SQLite3, but when i run manage.py syncdb it
> tells me: " Value Error: Empty module name." Please help me with this, i
> didn't undesrtood this part.
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Need good image on the fly resizing

2013-04-21 Thread yati sagade
Check PIL out:
http://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio


On Mon, Apr 22, 2013 at 6:05 AM, frocco  wrote:

> Can someone point me to a good package?
>
> Thanks
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: forloop breaking

2013-06-26 Thread yati sagade
The best thing I can think of is to send from the view a set/list of
available attributes such that there is at least one item with a non empty
value for those attributes. This can be achieved by a single iteration on
the iterable `st'. Then in the template, you can just check if, for example
Description is there in that attribute list and write the heading for it
only then. Hope that helps.


On Wed, Jun 26, 2013 at 9:12 PM, Harjot Mann wrote:

> Actually I want to remove the heading of my table in templates if it
> is not filled. I have done this using this coding:
> {% for test in st|slice:":1" %}S.No
>   {% ifnotequal test.Description "" %}   Description{%
> endifnotequal %}
>   {% ifnotequal test.Thickness "" %}Thickness{% endifnotequal
> %}
>   {% ifnotequal test.Comp_Strength_MPa "" %}Compressive
> Strength(Mpa){% endifnotequal %}
> {% endfor  %}
>
> but the problem which I am facing that if I dont enter the value in
> first row and add that vale in second row then it does not show the
> heading but shows the value.
> I want that my headings should appear single time in table but it if
> there is some value in second row then it should display its heading.
>
>
>
> --
> Harjot Kaur Mann
> Blog: http://harjotmann.wordpress.com/
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: forloop breaking

2013-06-26 Thread yati sagade
I doubt she has a problem with the Python for-loop. She is trying to
achieve similar control flow in the Django templating language's for loop.


On Thu, Jun 27, 2013 at 10:33 AM, Gladson Simplício Brito <
gladsonbr...@gmail.com> wrote:

>
> http://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops
>
>
> 2013/6/27 vijay shanker 
>
>> You are looking for "break"
>>
>> On Wednesday, June 26, 2013 8:39:58 PM UTC+5:30, Harjot Mann wrote:
>>>
>>> What are the methods to break forloop?
>>>
>>  --
>> 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.
>> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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.
For more options, visit https://groups.google.com/groups/opt_out.




Re:

2013-08-21 Thread yati sagade
I think we all got it.


On Wed, Aug 21, 2013 at 11:52 PM, Roberto López López
wrote:

>  I got it as well.
>
>
>
>
> On 08/21/2013 07:50 PM, Mike Doroshenko II wrote:
>
> How/Why am I getting this? Has anyone else received this?
>
> To: django-users+unsubscr...@googlegroups.com
>
> On 08/21/2013 02:44 AM, Shahmi Junoh wrote:
>
>   Hi,
>
>  I would like to unsubscribe from getting the updates.
>
>  Thanks in advance.
>
>  Regards,
>  Shahmi
>  --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> Mike Doroshenko, Junior Sys Admin
> TecKnoQuest inc.mi...@tecknoquest.comwww.tecknoquest.com
>
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
>
> Roberto López López
> System Developer
> Parallab, Uni Computing+47 55584091
>
>  --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: deploy ?

2013-10-11 Thread yati sagade
I assume `site.test` is set to point to localhost in your /etc/hosts file
(or the HOSTS file on Windows). Then, try http://site.test/accueil/ (notice
the trailing slash). If that doesn't work, just try
`localhost:8000/accueil/` (replace 8000 with the port you're running on, of
course) to see if all is well.


On Fri, Oct 11, 2013 at 4:19 PM, Diogene Laerce  wrote:

> Hi,
>
> I'd like to deploy my first "hello world" app on localhost but I can't get
> through the first attribution url even after openclassrooms tuto :
>
> I've got :
>
> app/urls.py
> urlpatterns = patterns('',
> url(r'^accueil/$', 'portal.views.home'),
> )
>
> app/portal/views.py
> from django.http import HttpResponse
> def home(request):
> text = """Bienvenue sur mon blog !
> Les crêpes bretonnes ça tue des mouettes en plein vol !
> """
> return HttpResponse(text)
>
> settings.py
> DEBUG = True
> ALLOWED_HOSTS = ['127.0.1.1/site.test']
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (
> '/var/www/site.test/app/**static/',
> )
> ROOT_URLCONF = 'app.urls'
> WSGI_APPLICATION = 'app.wsgi.application'
> TEMPLATE_DIRS = (
> '/var/www/site.test/app/**templates'
> )
> INSTALLED_APPS = (
> .
> .
> .
> # 'django.contrib.admindocs',
> 'portal',
> )
>
>
> and then get this django error - which means that django is functional on
> the localhost I guess :
>
> Using the URLconf defined in |app.urls |, Django tried these URL patterns,
> in this order:
>
>   1. ^accueil/$
>   2. ^static\/(?P.*)$
>
> The current URL, |site.test/accueil <http://site.test/accueil>|, didn't
> match any of these.
>
>
> I don't get what I am doing wrong.
>
> Thanks to help.
>
> --
> “One original thought is worth a thousand mindless quotings.”
> “Le vrai n'est pas plus sûr que le probable.”
>
>   Diogene Laerce
>
> --
> 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+unsubscribe@**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<http://groups.google.com/group/django-users>
> .
> To view this discussion on the web visit https://groups.google.com/d/**
> msgid/django-users/5257D7A6.**8060202%40yahoo.fr<https://groups.google.com/d/msgid/django-users/5257D7A6.8060202%40yahoo.fr>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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/CANpY%2BHkFzkXa0qceLCjbpsQ6V%3D2Yqyk%2BWhz43yVDJW%3D1rZHfEg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Re : deploy ?

2013-10-11 Thread yati sagade
Ah my bad. Damn URL autocorrrect.


On Fri, Oct 11, 2013 at 4:29 PM, Diogene Laerce  wrote:

> > The current URL, |site.test/accueil <http://site.test/accueil>|, didn't
> match any of these.
>
> This url is an auto corrected url by thunderbird, I did this test on the
> right url
> of course : 
> http://127.0.1.1/site.test/**accueil/<http://127.0.1.1/site.test/accueil/>
>
> Thanks
>
>
> --
> “One original thought is worth a thousand mindless quotings.”
> “Le vrai n'est pas plus sûr que le probable.”
>
>   Diogene Laerce
>
> --
> 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+unsubscribe@**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<http://groups.google.com/group/django-users>
> .
> To view this discussion on the web visit https://groups.google.com/d/**
> msgid/django-users/5257D9FB.**5030208%40yahoo.fr<https://groups.google.com/d/msgid/django-users/5257D9FB.5030208%40yahoo.fr>
> .
>
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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/CANpY%2BHmwOAFy9vDx8bfO%3D0EPuh2GVpkBS6K6U2aZ88m2XAVGbg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Constants values and best practices

2014-08-28 Thread yati sagade
Hi Julian

Python 3 introduces enums, which should make this easy:
https://docs.python.org/3/library/enum.html
In my Python 2 projects, I define a class to club together related
constants. Something like,

class PurchaseState(object):
EGGS = 'eggs'
FOO = 'foo'
BAR = 'bar'

and then do

if  purchase.state == PurchaseState.EGGS:
# do stuff

Note that I prefer using string values for my constants over integer
values, as it makes debugging far more pleasant.

Cheers

On Thu, Aug 28, 2014 at 10:33 PM, Julo Waks  wrote:
> Good day!
> How are you?
> I have the following situation:
>
> In more than one django project I come across the situation where I need to
> define a model that has a State.
> So what I usually do is:
>
> # Pseudo code here
>
> def State (models.Model):
>  name = models.CharField ()
>
> def Purchase (models.Model):
>  # Fields various (name, descrption, etc)
>  State = models.ForgeinKey (State)
>  # More fields ...
>
> The problem arises when I want to do things like:
>
> if (Purchase.State_id == 1):
>
> # Do stuff
>
>
> my way to fix it so far was to define a const.py and do something like:
>
> if (== Purchase.State_id Const.STATE_EGGS):
>
> # Do stuff
>
> Because the state 1 is "eggs", but because I add in my local, but if another
> dev adds in staging, as that uniformity is maintained?
> It should create a process that creates the updates as new constants was
> defined?
> There are best practices for this?
>
> Ideas? Advice?
>
> Thank you very much for reading =)
>
> regards,
> Julian.
>
> --
> 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/CAKSEZ1EfdSiaNwd6ZxL0NUhfn3HM39zdbg1CVkRXNyObwLxjcA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

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 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/CANpY%2BHkT%2BwPAT6gh%2BDoDQ418x83BYvnV%2BQs3goY23LYCcSX5yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: First tutorial - 404

2014-02-15 Thread yati sagade
The tutorial for 1.4 can be found here:
https://docs.djangoproject.com/en/1.4/intro/tutorial01/ (For other
versions, just change the 1.4 in that URL to the version you'd like). I am
curious, is there a reason you want to continue learning with 1.4, like you
are stuck with it for some reason? If not, why not just upgrade? (I'm sure
you'd have thought about this, but as I said, I'm curious :))


On Sun, Feb 16, 2014 at 2:41 AM, Steve Booth  wrote:

> I've been Googling on this for several hours.  Time to ask.
>
> I'm just trying to run through the very first tutorial, and frankly, it's
> been a nightmare. Running under Fedora 18, Python 2.7, Django version is
> 1.4.5.
>
> So, I got the 1.4 tutorial up, created the site.. all works fine.  Fire up
> the server -- looks great.  Browse to http://127.0.0.1:800..
>
> And I do NOT get the nice, blue Django page, I get a Page Not Found 404
> error telling me the URLconf in mysite.urls does not match '^admin/'
>
> Well... YEA!  So either the 1.4 tutorial doc's are wrong, or the default
> site doesnt work, or I dont know what I'm doing.
>
> Any help would be greatly appreciated.
>
> I shouldn't have to be asking this ... it should just work.
>
> --
> 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/b8be3c8b-9c0a-4812-89b3-777ded918b65%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

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 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/CANpY%2BHmh3u%2B7Jfbdf11hk4eMEijkMU%3DAP6kG-XB%3DzdnzHF96tQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: i've screwed up my virtualenv

2014-05-05 Thread yati sagade
Or probably just use the excellent virtualenv-wrapper :) You can then do
things like:

mkvirtualenv foo # to create a venv

workon foo # switch to venv foo
 On May 5, 2014 6:26 PM, "Malik Rumi"  wrote:

> THANKS!
> Yea, it's that 'activate' part that I kept forgetting that got me into
> this mess. Maybe I should paste it to my forehead? (-:
>
>
>
> On Mon, May 5, 2014 at 2:46 AM, Mike Dewhirst wrote:
>
>> On 5/05/2014 5:32 PM, Malik Rumi wrote:
>>
>>>
>>> I have several problems. They are:
>>>
>>
>> Try ...
>>
>> 1. Create a new virtualenv for your project
>>
>> 2. pip install all the dependencies again (if you don't have a
>> requirements file) including Django 1.6
>>
>> 3. Retrieve your project code from the repo or backup
>>
>> 4. Manually copy any changed source (from three levels down) over the
>> restored source
>>
>> 5. Repeat from 1 above except for Django 1.7 in step 2
>>
>> Don't forget to activate whichever virtualenv you want to work on.
>>
>> Good luck
>>
>> Mike
>>
>>
>>
>>> My Django project folder is 3 levels below my virtualenv.
>>>
>>> Pip freeze:
>>>
>>> a.on my virtualenv, in the parent folder or the Django project,
>>> only gives me the Django-trunk I got from github
>>>
>>> b.but in the Django project folder, and without the virtualenv,
>>> it gives me all 8 packages I’ve been using on my project thus far.
>>>
>>>
>>> c.Note this includes Django 1.6.1, not Django-trunk, which is
>>> the beta Django 1.7a2.
>>>
>>> So clearly I’ve screwed up. The question is, how bad is it, and
>>>
>>> what do I do about it?
>>>
>>> thx
>>>
>>> --
>>> 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/7c1fc205-
>>> eefe-45fb-9538-bddb1aaf321a%40googlegroups.com
>>>  >> eefe-45fb-9538-bddb1aaf321a%40googlegroups.com?utm_medium=
>>> email&utm_source=footer>.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/django-users/Jwp0yd5IXgU/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/536741C3.5020802%40dewhirst.com.au.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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/CAKd6oBxPDZYPTesbgR9bTmg_0On34EgKS9kNGsSKyDE7oZSoow%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANpY%2BHnF_rEqSH3OgTjeJTr8Q%2BMkcG5RRLYBYMZOCvpPMBHegA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.