Re: Post url incorrect on syndication

2012-03-14 Thread cubells

> cubells :
>


Hi all:

In order to show my feeds blog I have a class:

class BlogFeed(Feed):
title = "MySite"
description = "Some ramblings of mine"
link = "/blog/feed/"

def items(self):
return Post.objects.all().order_by("-created")[:2]
def item_title(self, item):
return item.title
def item_description(self, item):
return item.body
def item_link(self, item):
return u"/blog/%d" % item.id

And the url for the feed is:

url(r'^feed/$', BlogFeed()),

All works fine but the post url.

The post url that is shown in feeds is
http://example.com/blog/4

when It should be
http://vcubells.net/blog/4

What's the problem? I don't see what I'm doing wrong.



Solved!

I had the table django_site of my project database incorrect.


--

cubells

web: vcubells.net
microblogging: identi.ca/cubells
xmpp: cube...@jabber.org

--

--
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 deployment practices -- do people use setup.py?

2012-03-14 Thread Thomas Guettler

Hey,

I read your post some days ago and waited what other people say. But
nobody answered.

I posted a related question some time ago: Staging (dev,test,prod) in django. I 
explain
my setup there.
http://markmail.org/thread/wqwvordnlhyizwyp

A related thread on django-dev:
http://groups.google.com/group/django-developers/browse_thread/thread/d919da361273dbc0/8de3c5cf9369eca3?#8de3c5cf9369eca3

I think it would be very good to have the fundamental parts in django:
 * stages: DEV, TEST, PROD
 * get next system: user, host, install-prefix

Several deployment implementation could use these methods and variables. 
Switching
between a deployment implementation would be easier.

  Thomas


Am 12.03.2012 23:55, schrieb Tom Eastman:

Hey guys,

I'm looking for deployment best practices for Django projects. Google
searches seem to show countless numbers of them, many of them somewhat
contradictory :-)

So as a simple discussion point: I'm curious to know if lots of people
use setup.py to deploy a django project? That'd mean setup.py would
install your python packages to somewhere on sys.path, maybe in your
python site-packages or maybe in a virtualenv.

Is this considered a common/recommended practice? If so -- where do you
put your settings files?

Maybe you want settings files in /etc/myproject? and add that to
sys.path? Do people do this?

Or do people skip the setup.py thing, and just check out their source to
some directory and add that directory to sys.path?

What I'm doing at the moment:

  - Fabric command sets up apache and directories
  - Another one uses setup.py to create an archive, delivers the archive
and runs setup.py install etc.

Is this silly?

What are your thoughts?




--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

--
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: sending django email via gmail

2012-03-14 Thread infinitylX
Guys when i try to use smtplib directly with next code every things works.

#!/usr/bin/env python
import smtplib

def main():
   print "sending throut gmail"
   username = "infinit...@gmail.com"
   password = "password"
   fromaddr = "infinit...@gmail.com"
   toaddr = "s...@other.email.com"
   msg = "join the quark"

   server = smtplib.SMTP_SSL('smtp.googlemail.com:465')
   server.login(username, password)
   server.sendmail(fromaddr, [toaddr], msg)
   server.quit()
   print "sended"

if __name__ == '__main__':
main()

Середа, 14 березня 2012 р., 00:09:36 UTC+2 користувач infinitylX написав:
>
> I have same problem. 
>
> Telnet works, if i turn off tls and set 25 as port and every thing 
> works fine. But i want secure connection with tls... 
> By the way i have same situation with other smtp server (yandex for 
> example.) 
>
> Here is my settings: 
> EMAIL_USE_TLS = True 
> EMAIL_HOST = "smtp.googlemail.com" 
> EMAIL_PORT = 465 
> EMAIL_HOST_USER = "infinit...@gmail.com" 
> EMAIL_HOST_PASSWORD = "password" 
>
>
> On Mar 6, 11:52 pm, CLIFFORD ILKAY  wrote: 
> > On 03/06/2012 04:05 PM, Scott Macri wrote: 
> > 
> > > I can run thunderbird on the same machine and don't have any issues. 
> > > No, I am not running tbird at the same time as the django app.  Thus, 
> > > I know it's not a port conflict. 
> > 
> > It wouldn't make any difference if you were running your Django app and 
> > T'bird at the same time. The port that the Django dev server uses has 
> > nothing to do with the port the Gmail SMTP server uses. Even if your 
> > Django app were to send email at precisely the same time as T'bird, it 
> > wouldn't make any difference. SMTP servers are designed to handle 
> > multiple simultaneous connections. 
> > -- 
> > Regards, 
> > 
> > Clifford Ilkay 
> > Dinamis 
> > 1419-3266 Yonge St. 
> > Toronto, ON 
> > Canada  M4N 3P6 
> > 
> >  
> > +1 416-410-3326

-- 
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/-/TPp5S9Ds4zQJ.
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: Displaying Updates

2012-03-14 Thread Babatunde Akinyanmi
What's your algorithm?

On 3/13/12, coded kid  wrote:
> Hi Guys, how can I make users who are following each other view their
> status update on their walls? In my project, users can follow and
> unfollow each other but the problem I’m facing is that, both of them
> can’t see each other statuses on their wall.
>
> I’m using a caffinehit/django follow package that handles following of
> users.
>
> I would be glad if you can try and answer this question!
>
> --
> 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.
>
>

-- 
Sent from my mobile device

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



coping source code templates

2012-03-14 Thread Yasmine El_Badry
Hi,
Please , I need to know full details about coping the baseline
template from the source code to my own templates folder so that i can
change the site name instead of "Django administration".

i don't understand the meaning of not to forget the admin sub
directory.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



poll application

2012-03-14 Thread Yasmine El_Badry
Hi
I'm making a poll application using this tutorial
https://docs.djangoproject.com/en/1.3/intro/tutorial02/
but when i add this line "list_display = ('question', 'pub_date')"  to
the admin.py , it gives me an error
it worked once and when i continued the tutorial , it gave me error so
i have to remove it
Any 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.



poll application

2012-03-14 Thread Yasmine El_Badry

when i add this line in admin.py "list_display = ('question',
'pub_date')" , i get an error

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



Searching for Korean-Speaking Senior Django Developer for 3 months incl. free flight and accommodation in Seoul, Korea

2012-03-14 Thread Victor
**Requirements**

* It is mandatory for candidates to speak Korean as their first or
second language.
* At least 3-5 years experience with Django/Python.
* Python with Django, GeoDjango, South, pip, tddspry, webtests,
virtualenv, fabric
* UNIX; Fedora Linux, Ubuntu, SuSE, Solaris 10
* Experience with SCM, Redmine, Trac
* Able to really grasp complicated and sparsely documented legacy code
and adapt to new requrirements.
* Experience with e-commerce Web sites, Google Maps API and payment
gateway solutions.
* Candidates are expected to relocate to Seoul until mid-June.
* Accommodation and return ticket will be paid by us.
* We offer a competitive compensation package.


**About the company**

Yogyo is a small but highly ambitious and fast-growing company that
operates web sites in multiple countries around the World where
customers can order food delivery. Currently, we are building a team
to localize the homepage used in other countries and launch in the
Korean market in 2-3 months from now.


**What Python is used for**:

Yogyo's Web site is developed in Python/Django based on the code we
use for english-speaking countries.

**Contact Info:**

* **Contact**: Victor Ching, Chief Product Officer
* **E-mail contact**: vic...@foodbox.co.kr

-- 
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 print form errors from inside the test

2012-03-14 Thread Karen Tracey
The most common reason I have seen for is_valid() to return False but
errors to be empty is for the form to be unbound. Unbound forms are
never valid, but they also don't have any errors. Which goes to
Daniel's question: how exactly have you "preloaded" the form with
data?

Karen
-- 
http://tracey.org/kmt/

-- 
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: poll application

2012-03-14 Thread Karen Tracey
On Wed, Mar 14, 2012 at 5:42 AM, Yasmine El_Badry
 wrote:
> Hi
> I'm making a poll application using this tutorial
> https://docs.djangoproject.com/en/1.3/intro/tutorial02/
> but when i add this line "list_display = ('question', 'pub_date')"  to
> the admin.py , it gives me an error
> it worked once and when i continued the tutorial , it gave me error so
> i have to remove it
> Any help ??

What error? It's hard for people to help you when you omit key
information such as the error you were seeing.

Karen
-- 
http://tracey.org/kmt/

-- 
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: poll application

2012-03-14 Thread yasmine.elbadry

this is the error
IndentationError at /admin/polls/poll/
unexpected indent (admin.py, line 14)
Request Method:GET
Request URL:http://127.0.0.1:8000/admin/polls/poll/
Django Version:1.4c1
Exception Type:IndentationError
Exception Value:
unexpected indent (admin.py, line 14)
Exception Location: 
C:\Python27\lib\site-packages\django\utils\importlib.py in import_module, 
line 35

Python Executable:C:\Python27\python.exe
Python Version:2.7.2
Python Path:
['G:\\Semester 6\\SE\\code 1\\mysite',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages']
Server time:Wed, 14 Mar 2012 14:51:48 +0200

-Original Message- 
From: Karen Tracey

Sent: Wednesday, March 14, 2012 2:23 PM
To: django-users@googlegroups.com
Subject: Re: poll application

On Wed, Mar 14, 2012 at 5:42 AM, Yasmine El_Badry
 wrote:

Hi
I'm making a poll application using this tutorial
https://docs.djangoproject.com/en/1.3/intro/tutorial02/
but when i add this line "list_display = ('question', 'pub_date')"  to
the admin.py , it gives me an error
it worked once and when i continued the tutorial , it gave me error so
i have to remove it
Any help ??


What error? It's hard for people to help you when you omit key
information such as the error you were seeing.

Karen
--
http://tracey.org/kmt/

--
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 is very slow on windows server 2003, mssql database

2012-03-14 Thread Phanounou
Hello Javier,

I did the verification to see what is taking so much time to  fetch and I
realise it is because my model "TmyObject" is related to another class
model driving his caracteristics. For example, it's like

   TmyObject can be any car

  I have another model called "TobjectType" who is a list
of car type (SUV, trucks,  etc.)
  I have a model called "TObjectAttribute" who is the
generic list of car caracteristics (how many doors, horse power, 4 weels
drive,  etc)
 I have a model called TrTypeAttributeList to generate a
list of attribute for a type (ex.: SUV has doors, horse power,  weel drive,
etc.)
 Finally, I have a model called TrObjectCaracteristic who
has 2 FK, one from TmyObject and one from TrTypeAttributeList and a value
field. I did not define a __unicode__ method for TrObjectCaracteristic.

This is what is taking the most of the time. the gattering of the list of
TObjectAttribute, 3 or 4  times each at a time because TmyObject has 3-4
attributes value. Because I called it as an admin.StackedInline object in
the admin page.

I don't know how to resolve this issue.

Regards,

VB

2012/3/13 Javier Guerra Giraldez 

> On Tue, Mar 13, 2012 at 2:14 PM, Phanounou 
> wrote:
> > Hello,
> >
> >  have tryed to use the  formfield_for_foreignkey() and
> > formfield_for_manytomany() in the admin.py file. In fact, I have reduced
> > the reponse time (around 10 sec. less then before) by replacing extra =
> 2 by
> > extra=0 in my admin.StackedInline objects. It still taking 20-24 seconds
> to
> > edit an object in the admin interface. The 2 methods mention on top did
> not
> > help to reduce the time. I don't know what else to try now I'm stuck. Any
> > one has a subjection?
>
>
> this is what did the trick for me:
>
>def formfield_for_foreignkey(self, db_field, request, **kwargs):
>if db_field.name == 'pagina':
>kwargs['queryset'] = Pagina.objects.select_related()
>return super(EventAdmin,
> self).formfield_for_foreignkey(db_field,
> request, **kwargs)
>
>
> in short, it adds the select_related() to the queryset used for the
> 'pagina' foreign key.  that was needed because the __unicode__()
> method of the Pagina model uses some related fields.
>
> but you still haven't verified what generates the thousands of
> queries.  take the tieme to read the SQL generated to see what is it
> fetching and why.
>
>
> --
> Javier
>
> --
> 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: poll application

2012-03-14 Thread vicent

A 2012-03-14 13:52, yasmine.elba...@gmail.com escrigué:

this is the error
IndentationError at /admin/polls/poll/
unexpected indent (admin.py, line 14)



You have an incorrect indent at line 14 of admin.py.


--
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 is very slow on windows server 2003, mssql database

2012-03-14 Thread Javier Guerra Giraldez
On Wed, Mar 14, 2012 at 7:55 AM, Phanounou  wrote:
> This is what is taking the most of the time. the gattering of the list of
> TObjectAttribute, 3 or 4  times each at a time because TmyObject has 3-4
> attributes value. Because I called it as an admin.StackedInline object in
> the admin page.
>
> I don't know how to resolve this issue.

find where is it loading the list of TmyObject objects (or rather, a
queryset of them) and add select_related() to it.   quite likely, it's
on formfield_for_foreignkey() or a similar method.

-- 
Javier

-- 
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 is very slow on windows server 2003, mssql database

2012-03-14 Thread Phanounou
I got itmany thanks  Javier for your patience and your help.I put
formfield_for_foreignkey method everywhere and now it's super fast. I'm
glad you help me find the solution. Again thanks a lot. You made my day :-)

Regards,
VB

2012/3/14 Javier Guerra Giraldez 

> On Wed, Mar 14, 2012 at 7:55 AM, Phanounou 
> wrote:
> > This is what is taking the most of the time. the gattering of the list of
> > TObjectAttribute, 3 or 4  times each at a time because TmyObject has 3-4
> > attributes value. Because I called it as an admin.StackedInline object in
> > the admin page.
> >
> > I don't know how to resolve this issue.
>
> find where is it loading the list of TmyObject objects (or rather, a
> queryset of them) and add select_related() to it.   quite likely, it's
> on formfield_for_foreignkey() or a similar method.
>
> --
> Javier
>
> --
> 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 is very slow on windows server 2003, mssql database

2012-03-14 Thread Javier Guerra Giraldez
On Wed, Mar 14, 2012 at 8:56 AM, Phanounou  wrote:
> I got itmany thanks  Javier for your patience and your help.I put
> formfield_for_foreignkey method everywhere and now it's super fast. I'm glad
> you help me find the solution. Again thanks a lot. You made my day :-)

great.  i'm glad i wasn't too far off the mark

-- 
Javier

-- 
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 django hosting question

2012-03-14 Thread Scott Macri
I decided to go with webfraction based on your recommendation.  I just
setup my account and will let you know how it goes.  Thanks. :)

On Tue, Mar 13, 2012 at 11:27 AM, NENAD CIKIC  wrote:
> OK, thanks.
>
> On 13 ožu, 16:11, Bill Freeman  wrote:
>> I'm not sure that "django hosting" nails anything down.  It could mean
>> whatever the provider wants it to mean, from "we won't kick you off
>> for using a non-Microsoft tool" to "we understand django and will help
>> you deploy, debug, and maintian it".
>>
>> One significant variation from VPS that you should know about is
>> shared hosting, which is what I call what Webfaction does (we use them
>> to host several client sites, both django and plone).  You get an
>> account on a machine, rather than a virtual machine, your choice of
>> pre-configured starting configurations of several different
>> frameworks, or the tools you need to roll your own, and a management
>> interface to get your domains virtual hosted by the host wide front
>> end to to ports they assign for your back end(s).  You also get a
>> database in their server.  They have the permissings figured out so
>> the various accounts don't leak to one another, but you can still have
>> slow downs if one of  your machine mates starts taking more than his
>> allotment of time or memory (they do detect and kill such back ends
>> reasonably promptly).  The benefit is that you don't have to do os
>> management, but you are also more restricted than you would be in a
>> VPS.
>>
>> Bill
>>
>> On 3/13/12, NENAD CIKIC  wrote:
>>
>>
>>
>>
>>
>>
>>
>> > I now need to put on web the small project i have developed. To test
>> > and to skill me on linux, I have created virtualbox ubuntu VM and
>> > deployed the project and used nginx to serve it (all from scratch).
>>
>> > May someone provide me clarification on the following:
>> > - what is the difference between "django hosting" and normal VPS?
>>
>> > What i get with more with django hosting?
>> > 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.
>



-- 
Scott A. Macri
www.ScottMacri.com
(571) 234-1581

-- 
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 deployment practices -- do people use setup.py?

2012-03-14 Thread bruno desthuilliers
On Mar 12, 11:55 pm, Tom Eastman  wrote:
> Hey guys,
>
> I'm looking for deployment best practices for Django projects. Google
> searches seem to show countless numbers of them, many of them somewhat
> contradictory :-)
>
> So as a simple discussion point: I'm curious to know if lots of people
> use setup.py to deploy a django project?

We dont - we use virtualenvs (no-site-packages), pip requirements, and
git.

-- 
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: templates couple apps to a site; how do you separate them?

2012-03-14 Thread bruno desthuilliers
On Mar 14, 2:31 am, Ken  wrote:
> I'm struggling with how I should go about writing "pluggable" apps.  I
> haven't found a satisfactory way of decoupling apps from a site and
> the primary sticking point is templates.  I've combed through some
> discussions but have not found any that have helped.
>
> A site's templates determine the look and feel.  If an app is to play
> nice, then it needs to know a site's templates.  If an app uses its
> own templates, then it can override the site's look and feel.

The simplest solution is to provide barebones templates within the app
and let the project team override them.

-- 
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: poll application

2012-03-14 Thread Nikolas Stevenson-Molnar
Could you provide a bit more information about the error? The error 
traceback would be useful in resolving the problem.


_Nik

On 3/14/2012 2:38 AM, Yasmine El_Badry wrote:

when i add this line in admin.py "list_display = ('question',
'pub_date')" , i get an error



--
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: poll application

2012-03-14 Thread Nikolas Stevenson-Molnar
Please ignore my last email. My email client was slow to load the other 
replies to this message.


_Nik

On 3/14/2012 8:50 AM, Nikolas Stevenson-Molnar wrote:
Could you provide a bit more information about the error? The error 
traceback would be useful in resolving the problem.


_Nik

On 3/14/2012 2:38 AM, Yasmine El_Badry wrote:

when i add this line in admin.py "list_display = ('question',
'pub_date')" , i get an error



--
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 deployment practices -- do people use setup.py?

2012-03-14 Thread Benedict Verheyen
On 14/03/2012 16:40, bruno desthuilliers wrote:
> On Mar 12, 11:55 pm, Tom Eastman  wrote:
>> Hey guys,
>>
>> I'm looking for deployment best practices for Django projects. Google
>> searches seem to show countless numbers of them, many of them somewhat
>> contradictory :-)
>>
>> So as a simple discussion point: I'm curious to know if lots of people
>> use setup.py to deploy a django project?
> 
> We dont - we use virtualenvs (no-site-packages), pip requirements, and
> git.
> 

Same setup here.
I only use setup.py for creating pure Python packages, not Django packages.

Cheers,
Benedict

-- 
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: Displaying Updates

2012-03-14 Thread coded kid

1. User will be able to find each other
2. follow each other if they feel like (it's not necessary the second user 
follow back)
3. followers will be able to see the users they are following updates on 
their own wall.


On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>
> What's your algorithm?
>
> On 3/13/12, coded kid  wrote:
> > Hi Guys, how can I make users who are following each other view their
> > status update on their walls? In my project, users can follow and
> > unfollow each other but the problem I’m facing is that, both of them
> > can’t see each other statuses on their wall.
> >
> > I’m using a caffinehit/django follow package that handles following of
> > users.
> >
> > I would be glad if you can try and answer this question!
> >
> > --
> > 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.
> >
> >
>
> -- 
> Sent from my mobile device
>
>
On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>
> What's your algorithm?
>
> On 3/13/12, coded kid  wrote:
> > Hi Guys, how can I make users who are following each other view their
> > status update on their walls? In my project, users can follow and
> > unfollow each other but the problem I’m facing is that, both of them
> > can’t see each other statuses on their wall.
> >
> > I’m using a caffinehit/django follow package that handles following of
> > users.
> >
> > I would be glad if you can try and answer this question!
> >
> > --
> > 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.
> >
> >
>
> -- 
> Sent from my mobile device
>
>
On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>
> What's your algorithm?
>
> On 3/13/12, coded kid  wrote:
> > Hi Guys, how can I make users who are following each other view their
> > status update on their walls? In my project, users can follow and
> > unfollow each other but the problem I’m facing is that, both of them
> > can’t see each other statuses on their wall.
> >
> > I’m using a caffinehit/django follow package that handles following of
> > users.
> >
> > I would be glad if you can try and answer this question!
> >
> > --
> > 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.
> >
> >
>
> -- 
> Sent from my mobile device
>
>
On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>
> What's your algorithm?
>
> On 3/13/12, coded kid  wrote:
> > Hi Guys, how can I make users who are following each other view their
> > status update on their walls? In my project, users can follow and
> > unfollow each other but the problem I’m facing is that, both of them
> > can’t see each other statuses on their wall.
> >
> > I’m using a caffinehit/django follow package that handles following of
> > users.
> >
> > I would be glad if you can try and answer this question!
> >
> > --
> > 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.
> >
> >
>
> -- 
> Sent from my mobile device
>
>
On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>
> What's your algorithm?
>
> On 3/13/12, coded kid  wrote:
> > Hi Guys, how can I make users who are following each other view their
> > status update on their walls? In my project, users can follow and
> > unfollow each other but the problem I’m facing is that, both of them
> > can’t see each other statuses on their wall.
> >
> > I’m using a caffinehit/django follow package that handles following of
> > users.
> >
> > I would be glad if you can try and answer this question!
> >
> > --
> > 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://

Re: sending django email via gmail

2012-03-14 Thread JJO
I think you want to use port 587 if you are using TLS. We are using
port 587 successfully with gmail. In any case, Django 1.3.1 does this,
not the code you showed.

self.connection = smtplib.SMTP(self.host, self.port,
 
local_hostname=DNS_NAME.get_fqdn())
if self.use_tls:
self.connection.ehlo()
self.connection.starttls()
self.connection.ehlo()

So this method will probably not work over port 465.


On Mar 14, 2:57 am, infinitylX  wrote:
> Guys when i try to use smtplib directly with next code every things works.
>
> #!/usr/bin/env python
> import smtplib
>
> def main():
>    print "sending throut gmail"
>    username = "infinit...@gmail.com"
>    password = "password"
>    fromaddr = "infinit...@gmail.com"
>    toaddr = "s...@other.email.com"
>    msg = "join the quark"
>
>    server = smtplib.SMTP_SSL('smtp.googlemail.com:465')
>    server.login(username, password)
>    server.sendmail(fromaddr, [toaddr], msg)
>    server.quit()
>    print "sended"
>
> if __name__ == '__main__':
>     main()
>
> Середа, 14 березня 2012 р., 00:09:36 UTC+2 користувач infinitylX написав:
>
>
>
>
>
>
>
>
>
> > I have same problem.
>
> > Telnet works, if i turn off tls and set 25 as port and every thing
> > works fine. But i want secure connection with tls...
> > By the way i have same situation with other smtp server (yandex for
> > example.)
>
> > Here is my settings:
> > EMAIL_USE_TLS = True
> > EMAIL_HOST = "smtp.googlemail.com"
> > EMAIL_PORT = 465
> > EMAIL_HOST_USER = "infinit...@gmail.com"
> > EMAIL_HOST_PASSWORD = "password"
>
> > On Mar 6, 11:52 pm, CLIFFORD ILKAY  wrote:
> > > On 03/06/2012 04:05 PM, Scott Macri wrote:
>
> > > > I can run thunderbird on the same machine and don't have any issues.
> > > > No, I am not running tbird at the same time as the django app.  Thus,
> > > > I know it's not a port conflict.
>
> > > It wouldn't make any difference if you were running your Django app and
> > > T'bird at the same time. The port that the Django dev server uses has
> > > nothing to do with the port the Gmail SMTP server uses. Even if your
> > > Django app were to send email at precisely the same time as T'bird, it
> > > wouldn't make any difference. SMTP servers are designed to handle
> > > multiple simultaneous connections.
> > > --
> > > Regards,
>
> > > Clifford Ilkay
> > > Dinamis
> > > 1419-3266 Yonge St.
> > > Toronto, ON
> > > Canada  M4N 3P6
>
> > > 
> > > +1 416-410-3326

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django and MS SQL

2012-03-14 Thread Adolphe Cher-Aime
Good morning all,
Can someone share with me its experience with Django application running on
MS SQL DB? I have a heavy application that i want to migrate to django.
Please can you  share your experience with me in term of  stability and
feasibility? How does  django  teamup with  MS SQL.

Regards.

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



Jquery .load() function not responding with django

2012-03-14 Thread Eli_West
I've ran into in issue where jquery .load() will load extra content by
directly opening html file in a browser but if served through Django
devel server the jquery load() is ignored. Have no idea what could be
happening but I've seen someone use a django url in the .load() call
instead of pointing .load() directly to a file:


$('.myClass').load('{% url update_dropdown %}',
{'kind': "Book" },
function(data){
alert(data);
 });



He said he saw issues with a jquery library Any thoughts would be
great. BTW not a static file serving issue. Here is the very simple
code that works w/o django, but same thing loaded through django
fails:


///code from apress jquery, thanks to Bintu Harwani

basic jquery load function

$(document).ready(function() {
$('.list').click(function () {
$('#message').load('namesinfo.htm li');
return false;
});
});


/basic html file

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
  

JQuery Examples


  

We are going to organize the Conference on IT on 2nd Feb 2010
Participants



//names info .htm with extra content to load
The list of the persons taking part in conference 

Jackub
Jenny
Jill
John

We wish them All the 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.



django admin login

2012-03-14 Thread dummyman dummyman
Hi,
I created a new project in django

1.I created a new database
2. I created a new user
3.python manage syncdb
4.python manae.py runserver

when i visit localhost:8080/admin -> it asks for username n passwd. but the
login fails inspite of entering correct one

But it works for a different project

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



TypeError

2012-03-14 Thread coded kid
Hi guys, I want this code to display list of friends of a user, list
of friends to add, after writing the codes and testing it out, I’m
getting this error:

TypeError at /userpage/
user_page() takes exactly 2 arguments (1 given)
Request Method: GET
Request URL:http://127.0.0.1:8000/userpage/
Django Version: 1.3.1
Exception Type: TypeError
Exception Value:user_page() takes exactly 2 arguments (1 given)
Exception Location: C:\Python27\lib\site-packages\django\core\handlers
\base.py in get_response, line 111
Python Executable:  C:\Python27\python.exe
Python Version: 2.7.2

Below are my codes:

Views:

def user_page(request, username):
user=get_object_or_404(User, username=username)
if request.user.is_authenticated():
is_friend=Friendship.objects.filter(
from_friend=request.user,
to_friend=user
)
else:
is_friend=False
return render_to_response('user_page.html',
context_instance=RequestContext(request))

Template:

{% extends "base.html" %}

{% block content %}
  {% ifequal user.username username %}
view your friends
  {% else %}
{% if is_friend %}
  
{{ username }} is a friend of yours
{% else %}
  
add {{ username }} to your friends
{% endif %}
- 
view {{username }}'s friends
  {% endifequal %}
  {% endblock %}
Please help me out!

-- 
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 admin login

2012-03-14 Thread vikalp sahni
You have to check your

SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if
not cookies will not properly set and hence login will not be allowed)

the best would be to use some host entry like example.com 127.0.0.1 and
then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.

Regards,
//Vikalp


On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman wrote:

>
> Hi,
> I created a new project in django
>
> 1.I created a new database
> 2. I created a new user
> 3.python manage syncdb
> 4.python manae.py runserver
>
> when i visit localhost:8080/admin -> it asks for username n passwd. but
> the login fails inspite of entering correct one
>
> But it works for a different project
>
> --
> 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 admin login

2012-03-14 Thread Denis Darii
Try to create your superuser again:

./manage.py createsuperuser


On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni  wrote:

> You have to check your
>
> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if
> not cookies will not properly set and hence login will not be allowed)
>
> the best would be to use some host entry like example.com 127.0.0.1 and
> then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman wrote:
>
>>
>> Hi,
>> I created a new project in django
>>
>> 1.I created a new database
>> 2. I created a new user
>> 3.python manage syncdb
>> 4.python manae.py runserver
>>
>> when i visit localhost:8080/admin -> it asks for username n passwd. but
>> the login fails inspite of entering correct one
>>
>> But it works for a different project
>>
>> --
>> 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.
>



-- 
This e-mail and any file transmitted with it is intended only for the
person or entity to which is addressed and may contain information that is
privileged, confidential or otherwise protected from disclosure. Copying,
dissemination or use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you are not the
intended recipient, please notify the sender immediately by return e-mail,
delete this communication and destroy all copies.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Displaying Updates

2012-03-14 Thread Babatunde Akinyanmi
Hi coded,
You just mentioned the features of your app not the algorithm you are
using for getting updates to a wall.
For example algorithm for authenticating a user could be:
*if user name submitted exists in database, hash submitted password
*compare hash with hash saved in database linked with user name. If
equal, authenticate


On 3/14/12, coded kid  wrote:
>
> 1. User will be able to find each other
> 2. follow each other if they feel like (it's not necessary the second user
> follow back)
> 3. followers will be able to see the users they are following updates on
> their own wall.
>
>
> On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>>
>> What's your algorithm?
>>
>> On 3/13/12, coded kid  wrote:
>> > Hi Guys, how can I make users who are following each other view their
>> > status update on their walls? In my project, users can follow and
>> > unfollow each other but the problem I’m facing is that, both of them
>> > can’t see each other statuses on their wall.
>> >
>> > I’m using a caffinehit/django follow package that handles following of
>> > users.
>> >
>> > I would be glad if you can try and answer this question!
>> >
>> > --
>> > 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.
>> >
>> >
>>
>> --
>> Sent from my mobile device
>>
>>
> On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>>
>> What's your algorithm?
>>
>> On 3/13/12, coded kid  wrote:
>> > Hi Guys, how can I make users who are following each other view their
>> > status update on their walls? In my project, users can follow and
>> > unfollow each other but the problem I’m facing is that, both of them
>> > can’t see each other statuses on their wall.
>> >
>> > I’m using a caffinehit/django follow package that handles following of
>> > users.
>> >
>> > I would be glad if you can try and answer this question!
>> >
>> > --
>> > 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.
>> >
>> >
>>
>> --
>> Sent from my mobile device
>>
>>
> On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>>
>> What's your algorithm?
>>
>> On 3/13/12, coded kid  wrote:
>> > Hi Guys, how can I make users who are following each other view their
>> > status update on their walls? In my project, users can follow and
>> > unfollow each other but the problem I’m facing is that, both of them
>> > can’t see each other statuses on their wall.
>> >
>> > I’m using a caffinehit/django follow package that handles following of
>> > users.
>> >
>> > I would be glad if you can try and answer this question!
>> >
>> > --
>> > 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.
>> >
>> >
>>
>> --
>> Sent from my mobile device
>>
>>
> On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>>
>> What's your algorithm?
>>
>> On 3/13/12, coded kid  wrote:
>> > Hi Guys, how can I make users who are following each other view their
>> > status update on their walls? In my project, users can follow and
>> > unfollow each other but the problem I’m facing is that, both of them
>> > can’t see each other statuses on their wall.
>> >
>> > I’m using a caffinehit/django follow package that handles following of
>> > users.
>> >
>> > I would be glad if you can try and answer this question!
>> >
>> > --
>> > 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.
>> >
>> >
>>
>> --
>> Sent from my mobile device
>>
>>
> On Wednesday, 14 March 2012 10:58:57 UTC+1, Tundebabzy wrote:
>>
>> What's your algorithm?
>>
>> On 3/13/12, coded kid  wrote:
>> > Hi Guys, how can I make users who are following each other view their
>> > status update on their walls? In my project, users can follow and
>> > unfollow each other but the problem I’m facing is that, both of them
>> > can’t see eac

Running manage.py commands in Windows Power Shell

2012-03-14 Thread orschiro
Hello,

I have a question which is based on the discussion here:

http://groups.google.com/group/django-users/browse_thread/thread/2333f5dc8d0674f0

I'm working on Windows 7 with the PowerShell. Python 2.7 and the path
to django-admin.py is stored in my PATH variable.

After creating a project I can make use of the various manage.py
commands in my PowerShell. However, only in the following way:

'python manage.py runserver'

If I only type '.\manage.py runserver' then a new CMD window is opened
running again 'python manage.py runserver'. That is, the command is
forwarded to the CMD shell which opens it with the Python
interpreter.

Is there any way to tell the PowerShell to interpret the command given
within the shell instead of launching a CMD window?

Regards,

Robert

-- 
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 admin login

2012-03-14 Thread dummyman dummyman
hi ..

I created a superuser but still getting the same error

@vikalp: But it works for other projects with the same superuser name and
password

On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii  wrote:

> Try to create your superuser again:
>
> ./manage.py createsuperuser
>
>
> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:
>
>> You have to check your
>>
>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost" (if
>> not cookies will not properly set and hence login will not be allowed)
>>
>> the best would be to use some host entry like example.com 127.0.0.1 and
>> then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.
>>
>> Regards,
>> //Vikalp
>>
>>
>> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman 
>> wrote:
>>
>>>
>>> Hi,
>>> I created a new project in django
>>>
>>> 1.I created a new database
>>> 2. I created a new user
>>> 3.python manage syncdb
>>> 4.python manae.py runserver
>>>
>>> when i visit localhost:8080/admin -> it asks for username n passwd. but
>>> the login fails inspite of entering correct one
>>>
>>> But it works for a different project
>>>
>>> --
>>> 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.
>>
>
>
>
> --
> This e-mail and any file transmitted with it is intended only for the
> person or entity to which is addressed and may contain information that is
> privileged, confidential or otherwise protected from disclosure. Copying,
> dissemination or use of this e-mail or the information herein by anyone
> other than the intended recipient is prohibited. If you are not the
> intended recipient, please notify the sender immediately by return e-mail,
> delete this communication and destroy all copies.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: TypeError

2012-03-14 Thread Tom Evans
On Wed, Mar 14, 2012 at 5:23 PM, coded kid  wrote:
> Hi guys, I want this code to display list of friends of a user, list
> of friends to add, after writing the codes and testing it out, I’m
> getting this error:
>
> TypeError at /userpage/
> user_page() takes exactly 2 arguments (1 given)

Your view function specifies 2 arguments, request and username, but
you are not capturing the username argument from the url you have
routed to it in urls.py.

You need to fix your urls.py so it collects the right argument:

https://docs.djangoproject.com/en/1.3/topics/http/urls/#named-groups

Alternatively, if the second argument is optional, mark it as such in
the view's function definition.

Cheers

Tom

-- 
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: Running manage.py commands in Windows Power Shell

2012-03-14 Thread Tom Evans
On Wed, Mar 14, 2012 at 5:35 PM, orschiro  wrote:
> Hello,
>
> I have a question which is based on the discussion here:
>
> http://groups.google.com/group/django-users/browse_thread/thread/2333f5dc8d0674f0
>
> I'm working on Windows 7 with the PowerShell. Python 2.7 and the path
> to django-admin.py is stored in my PATH variable.
>
> After creating a project I can make use of the various manage.py
> commands in my PowerShell. However, only in the following way:
>
> 'python manage.py runserver'
>
> If I only type '.\manage.py runserver' then a new CMD window is opened
> running again 'python manage.py runserver'. That is, the command is
> forwarded to the CMD shell which opens it with the Python
> interpreter.
>
> Is there any way to tell the PowerShell to interpret the command given
> within the shell instead of launching a CMD window?
>
> Regards,
>
> Robert
>

You might also want to ask on a powershell or windows forum.

Whilst you are trying to do stuff with django, you're looking for
python users who run windows (most don't) and use powershell instead
of python to write scripts. I'd imagine that is a very small subset,
particularly on this list.

Cheers

Tom

-- 
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 admin login

2012-03-14 Thread vikalp sahni
Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py file.

Also, is there any error message which is displayed on top of login form
when you try to login?

Regards,
//Vikalp

On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman wrote:

> hi ..
>
> I created a superuser but still getting the same error
>
> @vikalp: But it works for other projects with the same superuser name and
> password
>
>
> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii wrote:
>
>> Try to create your superuser again:
>>
>> ./manage.py createsuperuser
>>
>>
>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:
>>
>>> You have to check your
>>>
>>> SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost"
>>> (if not cookies will not properly set and hence login will not be allowed)
>>>
>>> the best would be to use some host entry like example.com 127.0.0.1 and
>>> then use that in SESSION_COOKIE_DOMAIN and for accessing project on browser.
>>>
>>> Regards,
>>> //Vikalp
>>>
>>>
>>> On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman 
>>> wrote:
>>>

 Hi,
 I created a new project in django

 1.I created a new database
 2. I created a new user
 3.python manage syncdb
 4.python manae.py runserver

 when i visit localhost:8080/admin -> it asks for username n passwd. but
 the login fails inspite of entering correct one

 But it works for a different project

 --
 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.
>>>
>>
>>
>>
>> --
>> This e-mail and any file transmitted with it is intended only for the
>> person or entity to which is addressed and may contain information that is
>> privileged, confidential or otherwise protected from disclosure. Copying,
>> dissemination or use of this e-mail or the information herein by anyone
>> other than the intended recipient is prohibited. If you are not the
>> intended recipient, please notify the sender immediately by return e-mail,
>> delete this communication and destroy all copies.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



What directory do I install Django on Linux server

2012-03-14 Thread Alex Glaros
Does it make any difference what directory I download and unzip Django
tarball on a Linux server?

Should it be nside the Python directory?

When I install, does it find its correct directory by itself?

thanks,

Alex Glaros

-- 
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 admin login

2012-03-14 Thread dummyman dummyman
hi

i got this error msg

Please enter a correct username and password. Note that both fields are
case-sensitive.

On Wed, Mar 14, 2012 at 11:21 PM, vikalp sahni wrote:

> Can you share your SESSION_COOKIE_DOMAIN setting. In your settings.py file.
>
> Also, is there any error message which is displayed on top of login form
> when you try to login?
>
> Regards,
> //Vikalp
>
>
> On Wed, Mar 14, 2012 at 11:06 PM, dummyman dummyman wrote:
>
>> hi ..
>>
>> I created a superuser but still getting the same error
>>
>> @vikalp: But it works for other projects with the same superuser name and
>> password
>>
>>
>> On Wed, Mar 14, 2012 at 10:57 PM, Denis Darii wrote:
>>
>>> Try to create your superuser again:
>>>
>>> ./manage.py createsuperuser
>>>
>>>
>>> On Wed, Mar 14, 2012 at 6:25 PM, vikalp sahni wrote:
>>>
 You have to check your

 SESSION_COOKIE_DOMAIN in settings file if i.e pointing to "localhost"
 (if not cookies will not properly set and hence login will not be allowed)

 the best would be to use some host entry like example.com 127.0.0.1
 and then use that in SESSION_COOKIE_DOMAIN and for accessing project on
 browser.

 Regards,
 //Vikalp


 On Wed, Mar 14, 2012 at 10:51 PM, dummyman dummyman >>> > wrote:

>
> Hi,
> I created a new project in django
>
> 1.I created a new database
> 2. I created a new user
> 3.python manage syncdb
> 4.python manae.py runserver
>
> when i visit localhost:8080/admin -> it asks for username n passwd.
> but the login fails inspite of entering correct one
>
> But it works for a different project
>
> --
> 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.

>>>
>>>
>>>
>>> --
>>> This e-mail and any file transmitted with it is intended only for the
>>> person or entity to which is addressed and may contain information that is
>>> privileged, confidential or otherwise protected from disclosure. Copying,
>>> dissemination or use of this e-mail or the information herein by anyone
>>> other than the intended recipient is prohibited. If you are not the
>>> intended recipient, please notify the sender immediately by return e-mail,
>>> delete this communication and destroy all copies.
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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: Jquery .load() function not responding with django

2012-03-14 Thread Daniel Roseman
On Wednesday, 14 March 2012 09:21:29 UTC-7, Eli_West wrote:
>
> I've ran into in issue where jquery .load() will load extra content by 
> directly opening html file in a browser but if served through Django 
> devel server the jquery load() is ignored. Have no idea what could be 
> happening but I've seen someone use a django url in the .load() call 
> instead of pointing .load() directly to a file: 
>
>  
> $('.myClass').load('{% url update_dropdown %}', 
> {'kind': "Book" }, 
> function(data){ 
> alert(data); 
>  }); 
>
>  
>
> He said he saw issues with a jquery library Any thoughts would be 
> great. BTW not a static file serving issue. Here is the very simple 
> code that works w/o django, but same thing loaded through django 
> fails: 
>
>
> ///code from apress jquery, thanks to Bintu Harwani 
>
> basic jquery load function 
>
> $(document).ready(function() { 
> $('.list').click(function () { 
> $('#message').load('namesinfo.htm li'); 
> return false; 
> }); 
> }); 
>
>
> /basic html file 
>
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> 
>
> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> 
>
>  
> JQuery Examples 
>  script> 
>