Three table Lookup Question

2009-01-29 Thread Kyle

Hello!

I am trying to get a list of "Projects" based on certain "Industry".
(My naming convention, not django's)

My models look like this:
http://dpaste.com/114308/

"Project" has a foreign key to "Campaign".

"Industry" also has a foreign key to "Campaign".

Does it matter if both relationships are pointing to the center model
in the data route I am trying to setup?  Like this:

Project -> Campaign <- Industry

If Industry = 3, and a handful of Campaigns are returned, I would like
a list of all the Projects contained in each of the Campaigns
returned.

How do I do this with django models?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, 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: Three table Lookup Question

2009-01-29 Thread Kyle
Yes, almost.  It got me to understand the correct syntax.

I noticed that my results were coming according to Industry's primary key,
rather than the Industry integer field, so I appended another __industry

Here is the solution:

Project.objects.filter(campaign__industry__industry=x)

Thank you for your guidance, Todd.

On Thu, Jan 29, 2009 at 12:33 PM, Todd O'Bryan  wrote:

>
> I'm not sure I understand what you're asking, but
>
> projs = Project.objects.filter(campaign__industry=x)
>
> where x is one of 1-6 should do what you want, I think.
>
> Is that what you were asking?
>
> On Thu, Jan 29, 2009 at 9:54 AM, Kyle  wrote:
> >
> > Hello!
> >
> > I am trying to get a list of "Projects" based on certain "Industry".
> > (My naming convention, not django's)
> >
> > My models look like this:
> > http://dpaste.com/114308/
> >
> > "Project" has a foreign key to "Campaign".
> >
> > "Industry" also has a foreign key to "Campaign".
> >
> > Does it matter if both relationships are pointing to the center model
> > in the data route I am trying to setup?  Like this:
> >
> > Project -> Campaign <- Industry
> >
> > If Industry = 3, and a handful of Campaigns are returned, I would like
> > a list of all the Projects contained in each of the Campaigns
> > returned.
> >
> > How do I do this with django models?
> >
> > >
> >
>
> >
>


-- 
Light Emitter
Think in 3D Studios
www.thinkin3d.net

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



Re: Three table Lookup Question

2009-02-01 Thread Kyle
Hello again.

I have one more question about the three table lookup I am trying to
complete.

The details of my situation are posted here: http://dpaste.com/115244/

Does anybody have any idea on how to use django's ORM to perform two INNER
JOINS, a WHERE, and an ORDER BY?

Thanks in advance for any help and further guidance!

On Thu, Jan 29, 2009 at 4:00 PM, Kyle  wrote:

> Yes, almost.  It got me to understand the correct syntax.
>
> I noticed that my results were coming according to Industry's primary key,
> rather than the Industry integer field, so I appended another __industry
>
> Here is the solution:
>
> Project.objects.filter(campaign__industry__industry=x)
>
> Thank you for your guidance, Todd.
>
>
> On Thu, Jan 29, 2009 at 12:33 PM, Todd O'Bryan wrote:
>
>>
>> I'm not sure I understand what you're asking, but
>>
>> projs = Project.objects.filter(campaign__industry=x)
>>
>> where x is one of 1-6 should do what you want, I think.
>>
>> Is that what you were asking?
>>
>> On Thu, Jan 29, 2009 at 9:54 AM, Kyle  wrote:
>> >
>> > Hello!
>> >
>> > I am trying to get a list of "Projects" based on certain "Industry".
>> > (My naming convention, not django's)
>> >
>> > My models look like this:
>> > http://dpaste.com/114308/
>> >
>> > "Project" has a foreign key to "Campaign".
>> >
>> > "Industry" also has a foreign key to "Campaign".
>> >
>> > Does it matter if both relationships are pointing to the center model
>> > in the data route I am trying to setup?  Like this:
>> >
>> > Project -> Campaign <- Industry
>> >
>> > If Industry = 3, and a handful of Campaigns are returned, I would like
>> > a list of all the Projects contained in each of the Campaigns
>> > returned.
>> >
>> > How do I do this with django models?
>> >
>> > >
>> >
>>
>> >>
>>
>
>
> --
> Light Emitter
> Think in 3D Studios
> www.thinkin3d.net
>



-- 
Light Emitter
Think in 3D Studios
www.thinkin3d.net

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



Re: Three table Lookup Question

2009-02-02 Thread Kyle
Yes, that does it.  Thank you.

On Sun, Feb 1, 2009 at 8:06 AM, Karen Tracey  wrote:

> On Sun, Feb 1, 2009 at 4:36 AM, Kyle  wrote:
>
>> Hello again.
>>
>> I have one more question about the three table lookup I am trying to
>> complete.
>>
>> The details of my situation are posted here: http://dpaste.com/115244/
>>
>> Does anybody have any idea on how to use django's ORM to perform two INNER
>> JOINS, a WHERE, and an ORDER BY?
>>
>> Thanks in advance for any help and further guidance!
>>
>>
> Try:
>
>
> Project.objects.filter(campaign__industry__industry=1).order_by('campaign__industry__gridorder')
>
> Karen
>
> >
>


-- 
Light Emitter
Think in 3D Studios
www.thinkin3d.net

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



How to pass a raw ORDER_BY command or function call to a results query object?

2010-06-17 Thread Kyle
Without any filtering, I can execute the following SQL query to get my
ordered data:
   SELECT * from EXECUTION_JOB ORDER BY GREATEST(startTime, queueTime)
DESC;

But in Django, it seems like the order_by only likes passing of field
names, not a function call.
Is there a way to have it bass a raw ORDER_BY value to the query?

I am getting my filtered query in a variable called "jobs"
I tried calling
jobs.order_by('GREATEST(startTime,queueTime)')
but this fails due to:
   FieldError: Invalid order_by arguments:
['GREATEST(startTime,queueTime)']

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



Recommended Django development companies

2010-11-28 Thread Kyle
I'm looking for companies on-par with PivitolLabs (which is Rails
focused) but that focus on python web stacks, particularly Django.
Can anybody offer recommendations?  I'd greatly appreciate it!

-Kyle

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, 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: Recommended Django development companies

2010-11-28 Thread Kyle
Venkat, I'm not quite in the market for consultants.  I'm looking for
a pre-existing team with enterprise client experience based in the US.

Sincerely, Kyle


On Nov 28, 7:09 am, Venkatraman S  wrote:
> Hi Kyle,
>
> I am a Django freelancer. Are you looking for consultants for any projects?
>
> regards,
> Venkat
>
>
>
> On Sun, Nov 28, 2010 at 5:15 PM, Kyle  wrote:
> > I'm looking for companies on-par with PivitolLabs (which is Rails
> > focused) but that focus on python web stacks, particularly Django.
> > Can anybody offer recommendations?  I'd greatly appreciate it!
>
> > -Kyle
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.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-us...@googlegroups.com.
To unsubscribe from this group, 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 Contract Work Available

2007-09-07 Thread kyle
Hello,

I'm responding to your post to the django-users list. I'll be available
for some contract work in the next week or so. I've attached my resume
in PDF format.

Thanks for your time.

Regards,

Kyle Ambroff <[EMAIL PROTECTED]>
Freelance Software Developer
Phone: +1 530.306.5134
Jabber/GTalk: [EMAIL PROTECTED]

On Fri, 2007-09-07 at 13:30 +, [EMAIL PROTECTED] wrote:
> Overview:
> Currently looking for a python/django developer for contract work on a
> web API and web-based account management system.
> 
> Project Details:
> The project will consist of two main parts: a web API responsible for
> account registration and web interface responsible for managing
> account data. The web API work will involve implementing a pre-defined
> set of protocols used by 3rd party sites to open and register a new
> account. The management system will be a secure web interface to allow
> clients to login and view/edit/delete account details. The work is to
> be done in python using the django framework and interface with a
> postgres database all in a FreeBSD environment.
> 
> Required Experience:
> The candidate must be higly proficient in the following:
> Web Technologies (HTML, JS, CSS)
> Python
> Django
> PostregSQL
> 
> Position immediately available independent of location. Further
> contract work possibly available upon successful completion of this
> project.
> 
> Please send CV to the following address if interested:
> [EMAIL PROTECTED]
> www.bluemetrix.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 [EMAIL PROTECTED]
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en
> -~--~~~~--~~--~--~---
> 


resume.pdf
Description: Adobe PDF document


signature.asc
Description: This is a digitally signed message part


New to Django, sheet music organization site

2011-01-02 Thread Kyle
I am wanting to create an app that helps me organize sheet music. I
want to be able to sort by the artist. Every piece of sheet music I
have I want to be scanned in and uploaded as an image file, then when
I want to open a particular file, it opens as a PDF.

This would be my long terms goals. For now since I am new to Django, I
just want to simply organize my music and be able to easily sort.

I know I will need:

from django.db import models

class Artist(models.Model):
name = models.CharField(max_length=30)
genre = models.CharField(max_length=30)

class Song(models.Model):
name = models.CharField(max_length=30)
artist = models.ForeignKey(Artist)

What else can I do to help me get a start with this? I've gone through
the tutorial and I understand how Django works, its just a matter of
getting some hands on experience.

Thanks for 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-us...@googlegroups.com.
To unsubscribe from this group, 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 Django, sheet music organization site

2011-01-02 Thread Kyle
Ok I have a good start. I have run into a problem though. In my
database, I have an artist field. Most artists have a space in there
name. When creating my URLs, how can I ignore white space?

For example, take the artist Chris Tomlin. In my database, it will
show as "Chris Tomlin", but I don't want to type "music/Chris Tomlin"
to access it, I want to type "music/christomlin" or "music/
chris_tomlin". How can I do 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-us...@googlegroups.com.
To unsubscribe from this group, 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 Django, sheet music organization site

2011-01-02 Thread Kyle
Thank you very much! You have been very helpful. I have, however, run
into another problem.

When I try to access my Object, I get an error "invalid literal for
int() with base 10". I know it has something to do with ForeignKeys,
but cannot find how to fix it.

**models.py**--

from django.db import models

# Create your models here.

class Artist(models.Model):
name = models.CharField(max_length=100)
slug = models.SlugField(unique=True)

def __unicode__(self):
return self.name

class Album(models.Model):
name = models.CharField(max_length=200)
artist = models.ForeignKey(Artist)

def __unicode__(self):
return self.name

class Song(models.Model):
name = models.CharField(max_length=100)
artist = models.ForeignKey(Artist)
album = models.ForeignKey(Album)
date_added = models.DateField('date added')

def __unicode__(self):
return self.name

**views.py**--

from music.models import Song
from django.shortcuts import render_to_response

# Create your views here.

def index(request):
artist = Song.objects.all().order_by('name')
return render_to_response('music/index.html', {'artist': artist})

def artist(request, myartist):
myArgs = Song.objects.all().filter(artist=myartist)
return render_to_response('music/index.html', {'artist': myArgs})

-

Thanks

On Jan 2, 6:08 pm, Mike Dewhirst  wrote:
> On 3/01/2011 9:56am, Kyle wrote:
>
> > Ok I have a good start. I have run into a problem though. In my
> > database, I have an artist field. Most artists have a space in there
> > name. When creating my URLs, how can I ignore white space?
>
> > For example, take the artist Chris Tomlin. In my database, it will
> > show as "Chris Tomlin", but I don't want to type "music/Chris Tomlin"
> > to access it, I want to type "music/christomlin" or "music/
> > chris_tomlin". How can I do this?
>
> Stick to Chris Tomlin everywhere in your database because that is the
> name you want. Most systems with people names split them into surname
> and given name columns but that doesn't seem to make sense in your case
> unless you think you will want to search millions of records by separate
> surname or given names.
>
> The URL however is a different matter. You need to decide how you want
> to refer to the artists in a consistent way and put a decorated method
> in your artist model something like ...
>
> @models.permalink
> def get_absolute_url(self):
>      return "/music/artist/%s/" % self.slug
>
> ... where self.slug is a field on the artist model where you store the
> representation of the artist's name in exactly the way you want to type
> it in as a URL.
>
> Note that I added /artist/ to your URL because you will probably want to
> do something similar for songs and the same principle applies.
>
> If you did something like this in your artist model ...
>
> slug = models.SlugField(unique=True)
>
> ... then the admin app would automatically create the slug for you with
> hyphens replacing spaces and everything lower-cased. But you need to
> specify in the admin app which field is the source for the slug.
>
> Otherwise, you could write a method of your own on the artist model to
> massage the name as you prefer and populate the slug field when saving a
> record.
>
> hth
>
>
>
>
>
>
>
>
>
> > 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-us...@googlegroups.com.
To unsubscribe from this group, 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 Django, sheet music organization site

2011-01-03 Thread Kyle
Thank you Tim! That was the problem! I will remember to post the full
error stack next time.

Thanks again,
Kyle

On Jan 3, 6:00 am, Tim Sawyer  wrote:
> On 03/01/11 03:53, Kyle wrote:
>
> > When I try to access my Object, I get an error "invalid literal for
> > int() with base 10". I know it has something to do with ForeignKeys,
> > but cannot find how to fix it.
>
> It helps if you post the full stack of the error - we can tell which
> line of code it came from then.  However,
>
> > def artist(request, myartist):
> >    myArgs = Song.objects.all().filter(artist=myartist)
> >    return render_to_response('music/index.html', {'artist': myArgs})
>
> I think this is your problem.  What are you passing in on the url for
> myartist?  Is it a slug?
>
> Song.objects.all().filter(artist=myartist)
>
> is expecting myartist to be an Artist instance. Try
>
> Song.objects.all().filter(artist__slug=myartist)
>
> (that's two underscores between artist and slug.)
>
> This says "Select me all the songs where the related Artist's slug is
> whatever was passed in on the url"
>
> Hope that helps,
>
> Tim.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, 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: Issue using django-admin

2017-03-03 Thread Kyle
I am running into the same situation as described above. How does 
symlinking solve my problem? That is, where do I symlink to, and how does 
that tell my computer where django-admin is?

On Monday, September 19, 2016 at 6:09:29 AM UTC-5, Bharathi Raja wrote:
>
> As said in docs 
> 
>  , 
> your django version may be different, check your system $PATH or try 
> symlinking
>
> On Monday, September 19, 2016 at 7:40:50 AM UTC+5:30, PARTH VERMA wrote:
>>
>> Hello everyone,
>>
>> I am new to Django and just cloned it. I am getting error running 
>> django-admin commands, the error says: "-bash: django-admin: command not 
>> found". 
>> However, 'python -m django --version' this commands works just fine, 
>> returning the current version of Django (1.11). Can someone please help me 
>> out...
>>
>> P.S. I am using OS X
>>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ec915025-0038-421d-9886-8c7e85f6a7de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


lighttpd and fcgi issues

2009-02-06 Thread Kyle Hayes

Ok, so after the recommendation of the folks on #slicehost, I moved my
two php sites from apache to lighttpd since I planned on also setting
up a new Django site in addition.

The move for the php blogs was very smooth and they are up and
running. However, I can't say the same for my django site and fear
that I must be missing something crucial.

Here is the excerpt from my lighttpd.conf where my Django site is
configured:

$HTTP["host"] =~ "breezyduck\.com" {
  server.document-root = "/home/breezyduck/http/BreezyDuck"
  server.errorlog = "/var/log/lighttpd/breezyduck/error.log"

fastcgi.server = (
"/admin.fcgi" => (
"admin" => (
"socket" => "/home/breezyduck/mysite.sock",
"check-local" => "disable",
)
),

)

alias.url = (
"/media/" => "/home/breezyduck/media/",
)

url.rewrite-once = (
  "^(/admin/.*)$" => "/admin.fcgi$1",
  "^(/media.*)$" => "$1",
  "^(/.*)$" => "/mysite.fcgi",
)
}

I started lighttpd using /etc/init.d/lighttpd start and it start
successfully (you can see this from one of the php sites www.semanticism.com).
I then started the fcgi process from manage.py using:

python manage.py runfcgi socket=/home/breezyduck/mysite.sock
pidfile=django.pid

and I checked in ps that it is indeed running.

However, when I attempt to go to http://breezyduck.com/admin/ it
returns:
500 - Internal Server Error

Please, any help is appreciated. Thank you!

-Kyle

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



JavaScript Frameworks...

2009-03-04 Thread Kyle Hayes

In an effort to better understand loosely what developer's think of
the JavaScript frameworks they use, I've created a short survey. It is
by no means a scientific representation of an overall census,
naturally. I hope to have a somewhat broad enough audience for this
short poll.

Please share your thoughts about your favorite JavaScript framework by
filling out the following survey:
http://bit.ly/jsfw

If you are interested in the compiled results, I will be posting it at
kylehayes.info/blog

Thanks in advance, I look forward to your feedback!
-Kyle

Link to Survey: http://bit.ly/jsfw

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



Port Number for Flatpages Sites

2009-03-05 Thread Kyle Hayes

Does it matter if I specify a port number for the site domain in Sites
from the Admin panel for my flatpages to work? I'm really having a
tough time getting these flatpages to display.

Thanks,
Kyle
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, 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 Number for Flatpages Sites

2009-03-05 Thread Kyle Hayes

Never mind. Things are working fine. There was something wrong with my
default.html template.

On Mar 5, 8:10 am, Kyle Hayes  wrote:
> Does it matter if I specify a port number for the site domain in Sites
> from the Admin panel for my flatpages to work? I'm really having a
> tough time getting these flatpages to display.
>
> Thanks,
> Kyle
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Management commands not detected in all packages under a namespace?

2009-09-18 Thread Kyle MacFarlane

I have a bunch of packages under a company namespace, and inside
"company.__init__.py" in every package I have only the following:

__import__('pkg_resources').declare_namespace(__name__)

Everything works fine except when detecting management commands. It
will only detect commands in the first package in sys.path underneath
"company.*". Once it has checked one package in the namespace it does
not look inside any others.

So "company.first_app.management.commands.my_command.py" will be
detected but
"company.second_app.management.commands.another_command.py" will not.

I can effect which commands are detected and which are not by changing
the order of paths in sys.path.

Am I doing something wrong or is this a bug in Django?

This setuptools link may be useful if you don't understand what I mean
by a namespace package: 
http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, 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: Management commands not detected in all packages under a namespace?

2009-09-19 Thread Kyle MacFarlane

On Sep 19, 6:41 am, James Bennett  wrote:
> On Fri, Sep 18, 2009 at 10:36 PM, Kyle MacFarlane
>
>  wrote:
> > Everything works fine except when detecting management commands. It
> > will only detect commands in the first package in sys.path underneath
> > "company.*". Once it has checked one package in the namespace it does
> > not look inside any others.
>
> Custom management commands and setuptools don't mix, period. There may
> be cases where they actually work, but the various things setuptools
> mangles in the process of supporting things like namespace packages
> and zipped eggs just don't really work at all with the way Django
> searches for management commands.
>
> My general advice, as always, is to avoid setuptools like the plague.
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Pip apparently installs namespace packages differently and may work,
but I can't get it to work with zc.buildout and the recommended
gp.recipe.pip.

I cut down my buildout.cfg to be very simple and is basically a copy
of the example at http://pypi.python.org/pypi/gp.recipe.pip:


[buildout]
parts =
test1

[test1]
recipe = gp.recipe.pip
install = project_site
interpreter = python


But when I run buildout I get the following error:


Installing test1.
pip install
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named pip
While:
  Installing test1.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "c:\users\kylemac\appdata\local\temp\tmpqnze0-
\zc.buildout-1.4.1-py2.5.eg
g\zc\buildout\buildout.py", line 1659, in main
  File "c:\users\kylemac\appdata\local\temp\tmpqnze0-
\zc.buildout-1.4.1-py2.5.eg
g\zc\buildout\buildout.py", line 532, in install
  File "c:\users\kylemac\appdata\local\temp\tmpqnze0-
\zc.buildout-1.4.1-py2.5.eg
g\zc\buildout\buildout.py", line 1203, in _call
  File "c:\users\kylemac\.buildout\eggs\gp.recipe.pip-0.4-py2.5.egg\gp
\recipe\pi
p\__init__.py", line 195, in install
return Scripts.install(self)
  File "c:\users\kylemac\.buildout\eggs\zc.recipe.egg-1.2.2-py2.5.egg
\zc\recipe\
egg\egg.py", line 132, in install
reqs, ws = self.working_set()
  File "c:\users\kylemac\.buildout\eggs\gp.recipe.pip-0.4-py2.5.egg\gp
\recipe\pi
p\__init__.py", line 131, in working_set
self.pip_install(part_dir, build_dir, src_dir, [])
  File "c:\users\kylemac\.buildout\eggs\gp.recipe.pip-0.4-py2.5.egg\gp
\recipe\pi
p\__init__.py", line 101, in pip_install
raise RuntimeError('An error occur during pip installation. See %s-
log.txt'
% self.name)
RuntimeError: An error occur during pip installation. See test1-log.txt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Testing feed generators doesn't load attribute templates?

2009-09-28 Thread Kyle MacFarlane

I extended django.utils.feedgenerator.Atom1Feed for my own needs and
am trying to write some tests for it. It works fine from rusnserver
and mod_wsgi.

Basically, when feeds are accessed from the testrunner I'm running
into these problems:

1) The item_title() and item_description() methods are never called,
but item_pubdate, item_link, etc are.

2) If I have no feed_title.html or feed_description.html templates
then both  and  will just be "Whatever object at
0xWHATEVER".

3) If I do have a feed_title.html and feed_description.html then
 will not even exist and  will be blank.

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



How can I apply ordering through a M2M join model?

2010-02-27 Thread Kyle Fox
I'm wondering if it's possible to apply ordering to a ManyToMany
relationship by using a `position` attribute on the join model.  A
classic example (photo gallery) is probably the best way to illustrate
this:

class Photo(models.Model):
image = models.ImageField(upload_to="photos")

class Gallery(models.Model):
name = models.CharField(max_length=100)
photos = models.ManyToManyField(Photo, through='GalleryPhoto')

class GalleryPhoto(models.Model):
gallery = models.ForeignKey(Gallery)
photo = models.ForeignKey(Photo)
position = models.IntegerField(default=0)

class Meta:
ordering = ('position',)

(Also at http://dpaste.com/hold/165618/)

I want to attach photos with a gallery, like this:

>>> GalleryPhoto.objects.create(photo=photo1, gallery=some_gallery, position=1)
>>> GalleryPhoto.objects.create(photo=photo2, gallery=some_gallery, position=2)

And then have the photos retrievable through the gallery *according to
the position attribute* on the GalleryPhoto, like so:

>>> gallery.photos.all()
[photo1, photo2]


The simplest fix would be to add create a `get_photos` method on the
Gallery which does a query for it's photos, but I'd rather stick to
straight Django models if at all possible.

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-us...@googlegroups.com.
To unsubscribe from this group, 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 apply ordering through a M2M join model?

2010-02-28 Thread Kyle Fox
The user needs to be able to manually position the photos in the
gallery (using drag and drop, for example).  A photo can exist in
multiple galleries, which is why the join model GalleryPhoto is
required (and this is where the position gets stored).

On Feb 27, 7:36 pm, Prabhu  wrote:
> What is wrong with gallery.photos.all().order_by('name') ?
>
> On Feb 27, 4:49 pm, Kyle Fox  wrote:
>
>
>
> > I'm wondering if it's possible to apply ordering to a ManyToMany
> > relationship by using a `position` attribute on the join model.  A
> > classic example (photo gallery) is probably the best way to illustrate
> > this:
>
> > class Photo(models.Model):
> >     image = models.ImageField(upload_to="photos")
>
> > class Gallery(models.Model):
> >     name = models.CharField(max_length=100)
> >     photos = models.ManyToManyField(Photo, through='GalleryPhoto')
>
> > class GalleryPhoto(models.Model):
> >     gallery = models.ForeignKey(Gallery)
> >     photo = models.ForeignKey(Photo)
> >     position = models.IntegerField(default=0)
>
> >     class Meta:
> >         ordering = ('position',)
>
> > (Also athttp://dpaste.com/hold/165618/)
>
> > I want to attach photos with a gallery, like this:
>
> > >>> GalleryPhoto.objects.create(photo=photo1, gallery=some_gallery, 
> > >>> position=1)
> > >>> GalleryPhoto.objects.create(photo=photo2, gallery=some_gallery, 
> > >>> position=2)
>
> > And then have the photos retrievable through the gallery *according to
> > the position attribute* on the GalleryPhoto, like so:
>
> > >>> gallery.photos.all()
>
> > [photo1, photo2]
>
> > The simplest fix would be to add create a `get_photos` method on the
> > Gallery which does a query for it's photos, but I'd rather stick to
> > straight Django models if at all possible.
>
> > 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Developing a flexible CMS

2007-06-24 Thread Kyle Fox

I hope I can explain this well, because I've been wracking my poor
little brain trying to figure out how to do this :)

I'm trying to create a flexible CMS.  I want it to be easy for users
to create a Page, and attach all kinds of content ("components") to
that page.  These components would all be Model classes.  Here are two
simple examples of the components I had in mind:

class TextSnippet(models.Model):
body = models.TextField()

class Photo(models.Model):
image = models.ImageField(upload_to="photos")

The idea is that a user add an arbitrary number of these components to
a Page model.  A Page model is nothing more than a container to hold
components, and a URL associated with the Page, something like:

class Page(models.Model):
url = models.CharField( maxlength=100, unique=True,
validator_list=[validators.isAlphaNumericURL])

The problem is that I can't figure out a good way to associate
instances of TextSnippet and Photo with a page.  It's obviously a many-
to-many between the components and pages (a component like a photo can
be on many pages, and a page can have many components), but I also
need to store more information about that particular page-component
relationship, for example a IntegerField that specifies the
component's position on that page.  Here's what I've come up with so
far:

class PageComponent(models.Model):
page = models.ForeignKey(Page, related_name="components",
edit_inline=models.TABULAR)
content_type = models.ForeignKey(ContentType)
object_id = models.IntegerField(core=True)
position = models.IntegerField(default=0, blank=True)


It "works" not too bad.  Conceptually (from the shell), I think it
does what I want.  However, I'm having a HECK of a time getting the
Page form in the admin to work in an intuitive way.  When adding
components to a page, the user sees a drop-down list of content_types,
and has to enter an object_id.  It works for me because I know what to
put for the object_id, but a regular user wouldn't

I think this would require me to write a custom form class for adding
and editing a page, but with these relationships I really don't even
know where to begin :S

If anyone can provide advice (or just flat out tell me if I'm thinking
about this wrong), it would be much appreciated!

Thanks,
Kyle


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



Re: Blog engine

2007-07-18 Thread Kyle Fox

It's easy to write a "basic" blog in Django.  If that's all people
want, then great.  Something like that will work perfectly for the
majority of bloggers (who probably won't get that much readership
anyway)...

But all this talk about making a "full-featured" blog app in Django --
one that will really get noticed (and thus get django noticed): what
we need is a blog with *more features* that could actually begin to
compete with something like Wordpress**.

I mean stuff like Akismet, Flickr integration, delicious/magnolia
bookmarks, multi-author (with per-object permissions), importing from
Wordpress, statistics, easy web-based installation (NOT easy_install
but a wizard someone could follow, like the Wordpress install, lots of
customization, integration with pingback services, etc.

If that sounds like a lot, that's because it is.  To even be a blip on
the screen it will need this kind of stuff.  I also doubt the django-
admin will be sufficient for an application like this.

I know a lot of the stuff I've mentioned above has already been
hammered out by djangonauts -- I'm sure a snippet for almost every
feature has been posted on djangosnippets.org.  It's a matter of
bringing all those together into something that works out of the box,
rather than everyone patching together their own frankenstein.

** By the way, I know "competing with Wordpress" is nearly
impossible.  I'm just saying that to accomplish what it sounds like
people here are talking about, we need close to the same level of
functionality.


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



Re: Including view in a template

2007-08-02 Thread Kyle Fox

You might want to try writing an inclusion tag:
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags

They are much simpler to write than template tags, and more "designer
friendly."  They let you write a separate template that gets rendered
inside of another template (similar to how partials worked in Rails).

So for example you could write a template tag called 'list_users', and
create a template called 'list_users.html'.  Then in
frontpage_template.html you could add something like {% list_users %}
and it will render the list_users.html template.

I work primarily with designers who write the actual templates, so
it's much more intuitive for them to simply drop in something like {%
main_menu %} whenever they want to show the site nav, and then just
edit main_menu.html when they want to modify the markup/design.


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



In need of a more flexible URL routing scheme...

2008-02-03 Thread Kyle Fox

I've been having a hard time figuring out how to solve this problem:

We're building *another* django blogging app, but we want the app to
support multiple blogs on the same site, ideally by having each Blog
"mounted" on it's own URL, ie: "/politics/" is a Blog, "/tumbles/" is
another Blog, etc.

To accomplish this, I have a `Blog` model which looks roughly
something like this:

class Blog(models.Model):
site = models.ForeignKey(Site)
title = models.CharField(max_length=500)
url = models.SlugField('URL', prepopulate_from=("title",),
blank=True)

urls.py then contains lines like this:
(r'^(?P[-\w]+)/categories/',
include('glyph.apps.categories.urls')),

That way we can create new Blogs, and have the URLs be generic enough
to handle any blog's url.  The problem is that we also want to allow a
Blog to have a blank URL, i.e. have it mounted on the root of the
domain.  That way "example.com/categories/" would route to
`glyph.apps.categories.urls', and execute all the views using the Blog
with an empty URL field.  I'm really stuck figuring out how to do
this...

I would greatly appreciate any advice!  I'm really not sure how to do
this, but what I have so far sure doesn't feel like an elegant
solution :(

(For reference, the entirety of the code is at 
http://code.google.com/p/glyph-blog/.
I know it's messy, I'm working on making it better :)

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



Re: In need of a more flexible URL routing scheme...

2008-02-04 Thread Kyle Fox

Okay, I think I did something like that.  The problem is that the
@permalink and named urls doesn't seem to work because the named URL
has two different entries in the URLconf...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: wordpress hooks and actions system in django?

2008-02-22 Thread Kyle Fox

The part that I'm struggling to wrap my head around is how to make
plugins "installable".

I think one of the reasons Wordpress's plugin framework is so
successful is how easy it is to manage your plugins: install /
uninstall buttons on a page means the user doesn't have to write any
glue code or even do anything from the command line.

I guess you could have an empty 'plugins' app somewhere, and simply
drop py files into it for each plugin.  What are your guys' thoughts
on how to accomplish this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Suggestions for Django Presentation

2007-03-21 Thread Kyle Fox

Filters are unbelievably helpful when you have different people doing
markup and development.

The 'pluralize' filter, for example (as well as the 'humanize'
collection), has saved us developers from having to write templae-side
code to figure out if there should be an 's' at the end of a noun.
This shouldn't be a programmer's job: it's a presentation issue and
should be dealt with by the XHTML authors.  Filters lets this happen.

The concept is very simple to grasp, easy to demonstrate, and
EXTREMELY useful!

By the way, good luck with the presentation!


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



Re: DB Super Model (ahem)

2007-03-27 Thread Kyle Fox

This is just a guess, but could it be because you're calling .save()
(defined in models.Model) before calling __init__() on the superclass?


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



Re: Simple model inheritance

2007-04-01 Thread Kyle Fox

> Django's model inheritance will have an attribute to indicate that the
> base class is an abstract base, just as you are asking about.

Do you mean this feature isn't yet in django?  I haven't found
anything on the docs about this (I could really use it too!)

If it's in the trunk, do you know where I can find more info on it?

Thanks,
Kyle


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



Re: Need some help with Amazon S3

2007-05-07 Thread Kyle Fox

1)  We found S3 to be a bit slow, both upstream and down.  Upstream is
slow largely because of the SOAP overhead (from what I understand),
and we were sending lots of data (about 5 resized images for each
image uploaded to django).  Downstream, well, not much you can do
about that, regardless of how you set up you models.  We simply stored
the image's S3 key in the database, and used that when constructing
get_absolute_url().

2) I'm not sure you can do this.  When you say you want to have a
connection with the service, are you referring to a connection using
the S3 python library?  I'm not sure how you would create a global,
persistant connection to S3, which is what I assume you want.  We
simple made a wrapper class around S3, and added a add_to_bucket()
function to our user's profile model that used the S3 wrapper class.
Again, this seemed reasonably fast, the bottleneck was not around
managing the connection to S3, but the actual upload to S3 itself.

Kyle.


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



Re: Securing static files

2007-05-19 Thread Kyle Fox

Maybe I'm not understanding what the problem is, but why can't you
just make a new directory for each user?

> > user A uploads file 1 to /static_files//file1.jpg


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



Re: Where did you put your homepage view?

2007-05-23 Thread Kyle Fox

> I usually make a home controller.  Then I typically use an index
> action for the home page view.

This is normally what I do as well, I just define a view called
'index' somewhere and point r'^$' at it.

But this seems like a good place for me to ask a related question I've
often puzzled over: in what module or py file does everyone else place
this view function?


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



Re: Where did you put your homepage view?

2007-05-23 Thread Kyle Fox

> I usually make a home controller.  Then I typically use an index
> action for the home page view.

This is normally what I do as well, I just define a view called
'index' somewhere and point r'^$' at it.

But this seems like a good place for me to ask a related question I've
often puzzled over: in what module or py file does everyone else place
this view function?


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



Re: Where did you put your homepage view?

2007-05-23 Thread Kyle Fox

> I usually make a home controller.  Then I typically use an index
> action for the home page view.

This is normally what I do as well, I just define a view called
'index' somewhere and point r'^$' at it.

But this seems like a good place for me to ask a related question I've
often puzzled over: in what module or py file does everyone else place
this view function?


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



Re: Where did you put your homepage view?

2007-05-23 Thread Kyle Fox

> I usually make a home controller.  Then I typically use an index
> action for the home page view.

This is normally what I do as well, I just define a view called
'index' somewhere and point r'^$' at it.

But this seems like a good place for me to ask a related question I've
often puzzled over: in what module or py file does everyone else place
this view function?


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



Moving Images to Amazon S3

2007-05-30 Thread Kyle Fox

I'm absolutely stuck on this.  This question might be more python than
django related, but I figured because it deals with Amazon S3, someone
here may know how to handle it.

Here's what needs to happen:
1.  A user uploads an image (part of a Model we have)
2.  Create a 100x100 thumbnail using PIL
3.  Move the thumbnail to Amazon S3

Step 3 is the tricky part for me. I can't figure out how to do it,
other than first temporarily saving the in-memory thumbnail to the
filesystem, re-reading the file, moving the raw data to S3, and then
deleting the temporary thumbnail file:

# thumb is an already thumbnailed Image instance, in memory
thumb.save( temp_path, "JPEG")
raw = open( temp_path ).read()
# code to move 'raw' to S3
os.remove( temp_path )

This is a pretty heavy way of doing it, and I'm desperate to find a
better way of doing it but am absolutely out of ideas...

The S3 API requires the file data to be in the format the
open(myfile).read() returns (whatever that is).

Is there a way to get the same data from an in-memory Image instance,
so I don't need to save/re-read/delete each thumbnail file?


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



Re: Moving Images to Amazon S3

2007-05-31 Thread Kyle Fox

I think my question wasn't clear:  we're having NO problem putting
files on S3, that's dead simple (ie what Holovaty blogged about).

What we need to do is take an *in-memory Image* and put it directly
onto S3.  We need a way to convert a PIL Image instance into a format
S3 can accept WITHOUT having to first save the Image to the file-
system.  S3 accepts the kind of string that gets returned from
open(afile).read()

I was trying to wrap the result of img.tostring() in the StringIO
class, and then put that on S3, but that doesn't work either...


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



Re: Moving Images to Amazon S3

2007-06-01 Thread Kyle Fox

SanPy,

Thank you!  This works awesome and does exactly what I need!


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



Re: Django deployment à lá Capistrano

2007-09-12 Thread Kyle Fox

I really don't see a need for a huge project to accomplish the goals
you've outlined:

0) Checking in the local source changes if they have not already been
checked in (optional).
1) Logging into the deployment target.
2) Checking out the latest source.
3) Modifying the production database as necessary.
4) Making appropriate changes to settings.py.
5) Running tests
6) Restarting the server
7) Cleaning up and logging out.

We have a little shell script that does most of this stuff just fine,
in about 10 lines.

What makes Capistrano handy is the ability to *transparently* deploy
your application across many different machines, and specify roles for
each machine which respond to different tasks.

I am also *extremely* cautious about having scripts modify a
production database with Django.  AFAIK, there is currently no
standard way of keeping track of schema changes in Django.  (This is
more feasible in Rails because of migrations).  Furthermore, one of
the killer features of Capistrano is the ability to completely
rollback your entire application to a previous point in time (db
schema, data and code base) -- but without a standard schema-evolution
tool in Django, how will Djangostrano be able to track & version
changes?

I would love to see a tool that makes the HARD deployment tasks easy.
I suppose what you've outlined is a start, but maybe we'd be better
off to work towards a set of individual tools that can be integrated
right into django (like schema evolution/versioning, etc) prior to
trying to automate these tasks.


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



How to use SplitDateTimeWidget (getting TypeError)

2007-09-25 Thread Kyle Fox

I'm trying to use a SplitDateTimeWidget for a forms.DateTimeField
field, but keep getting TypeError: "expected string or buffer"

The traceback leads to `strptime.py`, which has `found =
format_regex.match(data_string) `.  The local variables are:

data_string = [u'2007-09-29', u'11:05:59.898833']
format = u'%Y-%m-%d %H:%M:%S

It looks like the SplitDateTimeWidget is returning an array of [date,
time] strings, when it should be returning a single string.

Does anyone know how to do this?  Am I using the SplitDateTimeWidget
incorrectly?

Thanks,
Kyle.


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



Re: Design Question : model needs in model or view

2007-11-07 Thread Kyle Fox

I'd probably put it in the model.

Putting it in the view means if you ever create an instance of that
model elsewhere, you'll need to duplicate the code for creating the
related model.  Not very DRY :)


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



Re: Having a problem using django-admin.py runserver

2007-12-03 Thread Kyle Fox

I'd just like to report that we're having this problem as well, the
same as you describe.  The `shell` command seems to work fine...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-08 Thread Kyle Paterson
Started a new project after not using Django for roughly two years, works 
fine when running as a development server but throws TypeError: 
SimpleLazyObject class: property object not callable.

>From apache error log:
[Wed Dec 08 10:11:53.023239 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] Traceback (most recent call last):
[Wed Dec 08 10:11:53.023283 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946]   File 
"/home/kyle/active-travel/traveldata/traveldata/wsgi.py", line 14, in 

[Wed Dec 08 10:11:53.023327 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] from django.core.wsgi import 
get_wsgi_application
[Wed Dec 08 10:11:53.023351 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946]   File 
"home/kyle/active-travel/venv/lib/python3.8/site-packages/django/__init__.py", 
line 1, in 
[Wed Dec 08 10:11:53.023371 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] from django.utils.version 
import get_version
[Wed Dec 08 10:11:53.023377 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946]   File 
"home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/version.py",
 
line 7, in 
[Wed Dec 08 10:11:53.023430 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] from 
django.utils.regex_helper import _lazy_re_compile
[Wed Dec 08 10:11:53.023435 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946]   File 
"home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/regex_helper.py",
 
line 10, in 
[Wed Dec 08 10:11:53.023524 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] from django.utils.functional 
import SimpleLazyObject
[Wed Dec 08 10:11:53.023529 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946]   File 
"home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/functional.py",
 
line 364, in 
[Wed Dec 08 10:11:53.023578 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] class 
SimpleLazyObject(LazyObject):
[Wed Dec 08 10:11:53.023611 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] TypeError: Error when calling the 
metaclass bases
[Wed Dec 08 10:11:53.023613 2021] [wsgi:error] [pid 10704:tid 
140343150348032] [remote 127.0.0.1:44946] 'property' object is not 
callable

Apache site config file:

# The ServerName directive sets the request scheme, hostname and 
port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header 
to
# match this virtual host. For the default virtual host (this file) 
this
# value is not decisive as it is used as a last resort host 
regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost

Alias /static /home/kyle/active-travel/traveldata/static

Require all granted




Require all granted



WSGIScriptAlias / 
/home/kyle/active-travel/traveldata/traveldata/wsgi.py 
process-group=traveldata
WSGIDaemonProcess traveldata 
python-home=/home/kyle/active-travel/venv 
python-path=/home/kyle/active-travel/traveldata/traveldata
WSGIProcessGroup traveldata

# Available loglevels: trace8, ..., trace1, debug, info, notice, 
warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
LogLevel info

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example 
the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf


Django project wsgi.py:
import os, sys
sys.path.append('home/kyle/active-travel/venv/lib/python3.8/site-packages')
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'traveldata.settings')
application = get_wsgi_application()

As you can see, all fairly standard, Debug set to true, no changes to 
standard content of site, followed the documentation instructions to run 
requests throug

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-15 Thread Kyle Paterson
I am not using either of those, I think. The only place I explicitly load
settings is in wsgi.py, with the line:
os.environ[‘DJANGO_SETTINGS_MODULE’] = ‘travel data.settings'

On Thu, 9 Dec 2021 at 12:52, Jason  wrote:

>
> with your settings usage, are you defining a property in settings and
> trying to use it anywhere?
>
> furthermore, are you using settings via
>
> from traveldata.traveldata import settings (example)
>
> or via
>
> from django.conf import settings
>
> The latter is the recommended means because settings are lazy loaded.
> On Wednesday, December 8, 2021 at 10:07:11 AM UTC-5 sencer...@gmail.com
> wrote:
>
>> Hi,
>>
>> I think this is not related with apache
>>
>> It seems like class object property is called as a method somehow.
>> Unfortunately the error does not reveal the property name.
>>
>> Regards,
>> Sencer HAMARAT
>>
>>
>>
>> On Wed, Dec 8, 2021 at 4:59 PM Kyle Paterson 
>> wrote:
>>
>>> Started a new project after not using Django for roughly two years,
>>> works fine when running as a development server but throws TypeError:
>>> SimpleLazyObject class: property object not callable.
>>>
>>> From apache error log:
>>> [Wed Dec 08 10:11:53.023239 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] Traceback (most recent call
>>> last):
>>> [Wed Dec 08 10:11:53.023283 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946]   File
>>> "/home/kyle/active-travel/traveldata/traveldata/wsgi.py", line 14, in
>>> 
>>> [Wed Dec 08 10:11:53.023327 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] from django.core.wsgi
>>> import get_wsgi_application
>>> [Wed Dec 08 10:11:53.023351 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946]   File
>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/__init__.py",
>>> line 1, in 
>>> [Wed Dec 08 10:11:53.023371 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] from django.utils.version
>>> import get_version
>>> [Wed Dec 08 10:11:53.023377 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946]   File
>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/version.py",
>>> line 7, in 
>>> [Wed Dec 08 10:11:53.023430 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] from
>>> django.utils.regex_helper import _lazy_re_compile
>>> [Wed Dec 08 10:11:53.023435 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946]   File
>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/regex_helper.py",
>>> line 10, in 
>>> [Wed Dec 08 10:11:53.023524 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] from
>>> django.utils.functional import SimpleLazyObject
>>> [Wed Dec 08 10:11:53.023529 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946]   File
>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/functional.py",
>>> line 364, in 
>>> [Wed Dec 08 10:11:53.023578 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] class
>>> SimpleLazyObject(LazyObject):
>>> [Wed Dec 08 10:11:53.023611 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] TypeError: Error when calling
>>> the metaclass bases
>>> [Wed Dec 08 10:11:53.023613 2021] [wsgi:error] [pid 10704:tid
>>> 140343150348032] [remote 127.0.0.1:44946] 'property' object is not
>>> callable
>>>
>>> Apache site config file:
>>> 
>>> # The ServerName directive sets the request scheme, hostname and
>>> port that
>>> # the server uses to identify itself. This is used when creating
>>> # redirection URLs. In the context of virtual hosts, the
>>> ServerName
>>> # specifies what hostname must appear in the request's Host:
>>> header to
>>> # match this virtual host. For the default virtual host (this
>>> file) this
>>> # value is not decisive as it is used as a last resort host
>>> regardless.
>>> # However, you must set it for any further virtual host
>>> explicitly.

ModuleNotFoundError: No module named [project_name]

2021-12-15 Thread Kyle Paterson
I am using django 4.0 with Apache and mod_wsgi. Whenever I try request the 
site through apache, I get the following error:
[Wed Dec 15 14:51:59.385259 2021] [wsgi:info] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] mod_wsgi (pid=15535, 
process='traveldata', application='127.0.1.1|'): Loading Python script file 
'/home/kyle/active-travel/traveldata/traveldata/wsgi.py'.
[Wed Dec 15 14:51:59.385699 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] mod_wsgi (pid=15535): Failed to 
exec Python script file 
'/home/kyle/active-travel/traveldata/traveldata/wsgi.py'.
[Wed Dec 15 14:51:59.385718 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] mod_wsgi (pid=15535): Exception 
occurred processing WSGI script 
'/home/kyle/active-travel/traveldata/traveldata/wsgi.py'.
[Wed Dec 15 14:51:59.385800 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] Traceback (most recent call last):
[Wed Dec 15 14:51:59.385828 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/home/kyle/active-travel/traveldata/traveldata/wsgi.py", line 19, in 

[Wed Dec 15 14:51:59.385831 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] application = 
django.core.handlers.wsgi.WSGIHandler()
[Wed Dec 15 14:51:59.385836 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/home/kyle/active-travel/venv/lib/python3.8/site-packages/django/core/handlers/wsgi.py",
 
line 127, in __init__
[Wed Dec 15 14:51:59.385838 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] self.load_middleware()
[Wed Dec 15 14:51:59.385842 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/home/kyle/active-travel/venv/lib/python3.8/site-packages/django/core/handlers/base.py",
 
line 39, in load_middleware
[Wed Dec 15 14:51:59.385844 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] for middleware_path in 
reversed(settings.MIDDLEWARE):
[Wed Dec 15 14:51:59.385847 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/home/kyle/active-travel/venv/lib/python3.8/site-packages/django/conf/__init__.py",
 
line 84, in __getattr__
[Wed Dec 15 14:51:59.385849 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] self._setup(name)
[Wed Dec 15 14:51:59.385859 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/home/kyle/active-travel/venv/lib/python3.8/site-packages/django/conf/__init__.py",
 
line 71, in _setup
[Wed Dec 15 14:51:59.385861 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] self._wrapped = 
Settings(settings_module)
[Wed Dec 15 14:51:59.385864 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/home/kyle/active-travel/venv/lib/python3.8/site-packages/django/conf/__init__.py",
 
line 179, in __init__
[Wed Dec 15 14:51:59.385866 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] mod = 
importlib.import_module(self.SETTINGS_MODULE)
[Wed Dec 15 14:51:59.385869 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File 
"/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
[Wed Dec 15 14:51:59.385871 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] return 
_bootstrap._gcd_import(name[level:], package, level)
[Wed Dec 15 14:51:59.385875 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 1014, in _gcd_import
[Wed Dec 15 14:51:59.385878 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 991, in _find_and_load
[Wed Dec 15 14:51:59.385882 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 961, in _find_and_load_unlocked
[Wed Dec 15 14:51:59.385886 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 219, in _call_with_frames_removed
[Wed Dec 15 14:51:59.385889 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 1014, in _gcd_import
[Wed Dec 15 14:51:59.385893 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 991, in _find_and_load
[Wed Dec 15 14:51:59.385896 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654]   File "", line 973, in _find_and_load_unlocked
[Wed Dec 15 14:51:59.385905 2021] [wsgi:error] [pid 15535:tid 
140431892707072] [remote 127.0.0.1:44654] ModuleNotFoundError: No module 
named 'traveldata'
[Wed Dec 15 14:51:59.422414 2021] [authz_core:error] [pid 15536:tid 

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-15 Thread Kyle Paterson
Used libapache2-mod-wsgi-py3 instead of python 2 version

On Wednesday, 15 December 2021 at 10:03:27 UTC Kyle Paterson wrote:

> I am not using either of those, I think. The only place I explicitly load 
> settings is in wsgi.py, with the line:
> os.environ[‘DJANGO_SETTINGS_MODULE’] = ‘travel data.settings'
>
> On Thu, 9 Dec 2021 at 12:52, Jason  wrote:
>
>>
>> with your settings usage, are you defining a property in settings and 
>> trying to use it anywhere?
>>
>> furthermore, are you using settings via 
>>
>> from traveldata.traveldata import settings (example)
>>
>> or via
>>
>> from django.conf import settings
>>
>> The latter is the recommended means because settings are lazy loaded.
>> On Wednesday, December 8, 2021 at 10:07:11 AM UTC-5 sencer...@gmail.com 
>> wrote:
>>
>>> Hi,
>>>
>>> I think this is not related with apache
>>>
>>> It seems like class object property is called as a method somehow.
>>> Unfortunately the error does not reveal the property name.
>>>
>>> Regards,
>>> Sencer HAMARAT
>>>
>>>
>>>
>>> On Wed, Dec 8, 2021 at 4:59 PM Kyle Paterson  
>>> wrote:
>>>
>>>> Started a new project after not using Django for roughly two years, 
>>>> works fine when running as a development server but throws TypeError: 
>>>> SimpleLazyObject class: property object not callable.
>>>>
>>>> From apache error log:
>>>> [Wed Dec 08 10:11:53.023239 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] Traceback (most recent call 
>>>> last):
>>>> [Wed Dec 08 10:11:53.023283 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946]   File 
>>>> "/home/kyle/active-travel/traveldata/traveldata/wsgi.py", line 14, in 
>>>> 
>>>> [Wed Dec 08 10:11:53.023327 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] from django.core.wsgi 
>>>> import get_wsgi_application
>>>> [Wed Dec 08 10:11:53.023351 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946]   File 
>>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/__init__.py",
>>>>  
>>>> line 1, in 
>>>> [Wed Dec 08 10:11:53.023371 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] from 
>>>> django.utils.version import get_version
>>>> [Wed Dec 08 10:11:53.023377 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946]   File 
>>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/version.py",
>>>>  
>>>> line 7, in 
>>>> [Wed Dec 08 10:11:53.023430 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] from 
>>>> django.utils.regex_helper import _lazy_re_compile
>>>> [Wed Dec 08 10:11:53.023435 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946]   File 
>>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/regex_helper.py",
>>>>  
>>>> line 10, in 
>>>> [Wed Dec 08 10:11:53.023524 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] from 
>>>> django.utils.functional import SimpleLazyObject
>>>> [Wed Dec 08 10:11:53.023529 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946]   File 
>>>> "home/kyle/active-travel/venv/lib/python3.8/site-packages/django/utils/functional.py",
>>>>  
>>>> line 364, in 
>>>> [Wed Dec 08 10:11:53.023578 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] class 
>>>> SimpleLazyObject(LazyObject):
>>>> [Wed Dec 08 10:11:53.023611 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] TypeError: Error when 
>>>> calling the metaclass bases
>>>> [Wed Dec 08 10:11:53.023613 2021] [wsgi:error] [pid 10704:tid 
>>>> 140343150348032] [remote 127.0.0.1:44946] 'property' object is not 
>>>> callable
>>>>
>>>> Apache site config file:
>>>> 
>>>> # The ServerName directive sets the request scheme, hostname 
>>>> and port that
>&g

Getting InspectDB to work with postgres

2023-02-27 Thread Kyle Wan
Hi,

I'm new to Django, and I'm struggling to get inspectdb to populate postgres 
models as json, hstore, or array objects. I have put 
`django.contrib.postgres` under the INSTALLED_APPS and I have psycopg2 
installed. I have set my engine to be postgresql and am able to use the 
makemigration and migrate CLI.

Do I need to do anything extra to get this working? I know inspectdb may 
not work because it is guessing, but it seems like this is a solved issue 
in terms of json, hstore, and array for postgres as many people have asked 
about this issue years past. I am using version 4.1.7 of django.

I'm trying to make an automated script for creating the migration with 
inspectdb -> makemigration -> migrate, but there is no easy way for 
detecting what type the inspectdb guessed as TextField.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7c1651d6-3071-4de1-9d3a-63e5c6c3f2fan%40googlegroups.com.


Re: SMTPDataError with mail_admins, no problem with send_mail

2012-09-06 Thread Kyle Gong
This might be 3 years too late, but I had this same problem and the issue 
was that my ADMINS setting wasn't a list or tuple:

ADMINS = (
('Admin', 't...@test.com')
)

changed it to the following and mail_admins worked:

ADMINS = (
('Admin', 't...@test.com'),
)

On Wednesday, June 17, 2009 1:00:13 PM UTC-7, ozgurisil wrote:
>
>
> Hello, 
>
> When I try to send an e-mail via mail_admins method, I receive an 
> SMTPDataError with the value: (503, '5.5.1 RCPT first. e9sm3788894muf. 
> 32'). 
>
> Here is the code: 
>
> def send_mail(self): 
> from django.core.mail import mail_admins, send_mail 
> mail_admins(self.cleaned_data['subject'], 
> self.cleaned_data['body'], 
> fail_silently=False) 
>
> When I change the code and switch to the regular send_mail method 
> using the same variables with the mail_admins method, the mail is sent 
> successfully. 
>
> def send_mail(self): 
> from django.core.mail import mail_admins, send_mail 
> send_mail(self.cleaned_data['subject'], 
> self.cleaned_data['body'], settings.SERVER_EMAIL, 
> settings.ADMINS, fail_silently=False) 
>
> What can be the reason of this situation?

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



How to run all tests in INSTALLED_APPS with the new test runner 1.6?

2013-11-09 Thread Kyle MacFarlane
With the new test runner in 1.6 it only seems to be running tests under my 
project and ignoring all tests in dependent apps listed in INSTALLED_APPS.

If I try to specify another app to test by doing something like "django 
test a_dependency" I get an exception from Python's unittest saying "Path 
must be within the project" (all my dependencies are installed system wide 
or in a shared buildout folder in my user dir).

The only tests outside of my project I seem to be able to run are Django's 
itself via "django test django".

How can I get the new test runner to discover and run all tests in 
INSTALLED_APPS? As far as I can tell the new test runner only supports 
tests located under the cwd which is not very useful for me since my 
projects tend to just amalgamate smaller apps located elsewhere.

-- 
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/8e2ffc33-2a20-4070-b8e3-f54557c34f26%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: __unicode__() addition not working in basic poll application.

2011-06-14 Thread Kyle Latham
Hello,

I am having the same problem while working through the tutorial. have
searched these forums and tried everything that was recommended. My
spacing is good also - I checked that.  I am still getting the same
output:

>>> Poll.objects.all()
[]

Any ideas on how to fix my issue?

On Jun 5, 11:20 am, EPS  wrote:
> Hi, i found this post when try to solve same problem: my trouble was a
> "spaces" in models.py.
> in your first message it seems to be ok, but you must really check
> spaces in your class 
> describe.http://mail.python.org/pipermail/tutor/2007-January/051903.html
>
> On May 17, 4:59 pm, maaz muqri  wrote:
>
>
>
> > im just getting "Pollobject" as output
>
> > On May 17, 1:14 pm, Roman Klesel  wrote:> 
> > 2011/5/16 maaz muqri :
>
> > > > I am getting this
>
> > > Poll.objects.all()
> > > > []
>
> > > What do you get when you do:
>
> > > print unicode(Poll.objects.all()[0])
>
> > > ?
>
> > > Regards
> > >  Roman- Hide quoted text -
>
> - Show quoted text -

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



Need help with tutorial

2011-06-15 Thread Kyle Latham
I'm trying to work my way through the tutorial 1 but am getting stuck.
I am using python 2.7 and am using SQLite3 like the tutorial
recommended for beginners

I am at the step where I am changing the models.py file to add the
_unicode_ methods to display the Poll Object

I believe I have the NAME in the settings.py file set up correctly. I
first set did
'NAME': 'database.db',
to create my database file, then I changed it to the path to that
file.

Anyways, after I modified the models.py file to display the
question...
>>> Poll.objects.all()
[]

I am still getting

>>> Poll.objects.all()
[]

as the output.

Any help would be greatly appreciated.

Thanks,

Kyle

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, 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 help with tutorial

2011-06-15 Thread Kyle Latham
I understand your frustration. I'm sorry for not posting my code with
my first post.

my settings.py file (only up to the part I changed) is below:

# Django settings for mysite project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Name', 'n...@email.com'),
)

MANAGERS = ADMINS

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'C:/Django/django/bin/mysite/
database.db',  # Or path to database file if using
sqlite3.
'USER': '',  # Not used with sqlite3.
'PASSWORD': '',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for
default. Not used with sqlite3.
}
}


My models.py file is:

from django.db import models
import datetime

# Create your models here.
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



Thanks for your help.



On Jun 15, 10:55 am, "Cal Leeming [Simplicity Media Ltd]"
 wrote:
> Please please please please PLEASE, always post the code you are having
> trouble with. I've lost track on the amount of times people have to be told
> this :/ It's like saying "I made a change to this file, but it didn't work,
> why not?" Come on man.
>
>
>
>
>
>
>
> On Wed, Jun 15, 2011 at 5:48 PM, Kyle Latham  wrote:
> > I'm trying to work my way through the tutorial 1 but am getting stuck.
> > I am using python 2.7 and am using SQLite3 like the tutorial
> > recommended for beginners
>
> > I am at the step where I am changing the models.py file to add the
> > _unicode_ methods to display the Poll Object
>
> > I believe I have the NAME in the settings.py file set up correctly. I
> > first set did
> > 'NAME': 'database.db',
> > to create my database file, then I changed it to the path to that
> > file.
>
> > Anyways, after I modified the models.py file to display the
> > question...
> > >>> Poll.objects.all()
> > []
>
> > I am still getting
>
> > >>> Poll.objects.all()
> > []
>
> > as the output.
>
> > Any help would be greatly appreciated.
>
> > Thanks,
>
> > Kyle
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, 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: Need help with tutorial

2011-06-15 Thread Kyle Latham
Wow. I feel like a dumbass haha. That worked! Thank you so much for
your help!

On Jun 15, 11:15 am, "Cal Leeming [Simplicity Media Ltd]"
 wrote:
> No problem.
>
> You need to use __unicode__, not _unicode_ :)
>
> Cal
>
>
>
>
>
>
>
> On Wed, Jun 15, 2011 at 6:02 PM, Kyle Latham  wrote:
> > I understand your frustration. I'm sorry for not posting my code with
> > my first post.
>
> > my settings.py file (only up to the part I changed) is below:
>
> > # Django settings for mysite project.
>
> > DEBUG = True
> > TEMPLATE_DEBUG = DEBUG
>
> > ADMINS = (
> >    # ('Name', 'n...@email.com'),
> > )
>
> > MANAGERS = ADMINS
>
> > DATABASES = {
> >    'default': {
> >        'ENGINE': 'django.db.backends.sqlite3', # Add
> > 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
> >        'NAME': 'C:/Django/django/bin/mysite/
> > database.db',                      # Or path to database file if using
> > sqlite3.
> >        'USER': '',                      # Not used with sqlite3.
> >        'PASSWORD': '',                  # Not used with sqlite3.
> >        'HOST': '',                      # Set to empty string for
> > localhost. Not used with sqlite3.
> >        'PORT': '',                      # Set to empty string for
> > default. Not used with sqlite3.
> >    }
> > }
>
> > My models.py file is:
>
> > from django.db import models
> > import datetime
>
> > # Create your models here.
> > 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
>
> > Thanks for your help.
>
> > On Jun 15, 10:55 am, "Cal Leeming [Simplicity Media Ltd]"
> >  wrote:
> > > Please please please please PLEASE, always post the code you are having
> > > trouble with. I've lost track on the amount of times people have to be
> > told
> > > this :/ It's like saying "I made a change to this file, but it didn't
> > work,
> > > why not?" Come on man.
>
> > > On Wed, Jun 15, 2011 at 5:48 PM, Kyle Latham 
> > wrote:
> > > > I'm trying to work my way through the tutorial 1 but am getting stuck.
> > > > I am using python 2.7 and am using SQLite3 like the tutorial
> > > > recommended for beginners
>
> > > > I am at the step where I am changing the models.py file to add the
> > > > _unicode_ methods to display the Poll Object
>
> > > > I believe I have the NAME in the settings.py file set up correctly. I
> > > > first set did
> > > > 'NAME': 'database.db',
> > > > to create my database file, then I changed it to the path to that
> > > > file.
>
> > > > Anyways, after I modified the models.py file to display the
> > > > question...
> > > > >>> Poll.objects.all()
> > > > []
>
> > > > I am still getting
>
> > > > >>> Poll.objects.all()
> > > > []
>
> > > > as the output.
>
> > > > Any help would be greatly appreciated.
>
> > > > Thanks,
>
> > > > Kyle
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Django users" group.
> > > > To post to this group, send email to django-users@googlegroups.com.
> > > > To unsubscribe from this group, 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.



Django won't send 500 or 404 emails, but django.core.mail.EmailMessage and django.utils.log.AdminEmailHandler work

2011-06-24 Thread Kyle Gong
For some reason, I can't get my server to send 500 or 404 emails.  I
am set up to send email through gmail, and it is working properly when
I send error emails through a logger set up using
django.utils.log.AdminEmailHandler, and also when I send mail using
django.core.mail.EmailMessage.

I have DEBUG = False and SEND_BROKEN_LINK_EMAILS = True.

The server is a linode running Ubuntu 10.04, Django 1.3 and Python
2.6.5.

Any idea where I could look to track down the problem?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, 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 won't send 500 or 404 emails, but django.core.mail.EmailMessage and django.utils.log.AdminEmailHandler work

2011-06-26 Thread Kyle Gong
I was trying to avoid setting up a mail server by just sending through
gmail's SMTP server. It is sending correctly through
django.utils.log.AdminEmailHandler and it was my understanding that they
worked through the same mechanisms?
On Jun 24, 2011 6:58 PM, "Russell Keith-Magee" 
wrote:
> On Saturday, June 25, 2011, Kyle Gong  wrote:
>> For some reason, I can't get my server to send 500 or 404 emails.  I
>> am set up to send email through gmail, and it is working properly when
>> I send error emails through a logger set up using
>> django.utils.log.AdminEmailHandler, and also when I send mail using
>> django.core.mail.EmailMessage.
>>
>> I have DEBUG = False and SEND_BROKEN_LINK_EMAILS = True.
>>
>> The server is a linode running Ubuntu 10.04, Django 1.3 and Python
>> 2.6.5.
>>
>> Any idea where I could look to track down the problem?
>
> My first guess, since you haven't mentioned that you've done this
> step: have you configured your Linode to send mail? Unless you have a
> mail server installed and configured, you won't be able to send mail.
>
> apt-get install postfix
>
> Should be all you need to do.
>
> 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.
>

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



Question about Displaying a Table

2011-06-27 Thread Kyle Latham
Hello,

I am pretty new to Django and Python.

I'm wanting to create a Django app that displays different tables in
my MySQL database, and the user can search through the tables for info
they want.

I haven't written any code yet, I'm doing research on the approach I
have to take.  Is the only way I am able to display a table from the
MySQL database in Django by creating a template and importing the data
to the template? Is there a another/better approach towards displaying
a MySQL table in the Django app?

Thank you,

Kyle

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



ImportError: No module named site

2011-06-29 Thread Kyle Latham
I searched this group for that error, and browsed through several
pages and dozens of posts...but none of them helped me solve my error.

Yesterday I had my server up and running, and I left it running
overnight. I do not remember changing anything in any of my .py files,
but when I shut down my server to restart it, I was getting an error:

"Import Error: No module named site"

I have no idea what is going wrong, but here is all my code thus far
(I'm following the tutorial to create my own app that will display
various material measurements)

---
models.py
---
from django.db import models

# Create your models here.
class adhesive(models.Model):
measurement_id = models.CharField(max_length = 200)
material_id = models.CharField(max_length = 200)
program_name = models.CharField(max_length = 200)
date = models.DateField()
measurement_method = models.CharField(max_length = 30)
frequency_low = models.IntegerField()
frequency_high = models.IntegerField()

class ceramic(models.Model):
measurement_id = models.CharField(max_length = 200)
material_id = models.CharField(max_length = 200)
program_name = models.CharField(max_length = 200)
date = models.DateField()
measurement_method = models.CharField(max_length = 30)
frequency_low = models.IntegerField()
frequency_high = models.IntegerField()

class composite(models.Model):
measurement_id = models.CharField(max_length = 200)
material_id = models.CharField(max_length = 200)
program_name = models.CharField(max_length = 200)
date = models.DateField()
measurement_method = models.CharField(max_length = 30)
frequency_low = models.IntegerField()
frequency_high = models.IntegerField()


---
settings.py
---
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'materials',  # Or path to
database file if using sqlite3.
'USER': 'root',  # Not used with sqlite3.
'PASSWORD': 'x',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for
default. Not used with sqlite3.
}
}

...

ROOT_URLCONF = 'material_measurements/urls'

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/
django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
"C:/Django/material_measurements.materials"
)

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'material_measurements.materials',
# 'django.contrib.messages',
# 'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)




---
urls.py
---
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
# Examples:
# url(r'^$', 'material_measurements.views.home', name='home'),
# url(r'^material_measurements/',
include('material_measurements.foo.urls')),

# Uncomment the admin/doc line below to enable admin
documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
(r'^admin/(.*)', admin.site.root),
)





Thanks for the 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.



Getting list of user groups

2014-07-23 Thread Kyle Adams
I'm trying to get a list of the user groups available in a system. I have 
groups set up, but how do I, on some request, get a list of the names of 
each of the groups in my system?

For some context, I'm working on an analytics dashboard, and part of what I 
want to be able to do is look at the data for certain groups, perhaps staff 
and non-staff. To do this, I want to be able to ask Django for the list of 
groups first, so the user can choose a group from there, and then later 
will get a list of all users in that group, so I can look only at their 
data.

-- 
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/c9de4101-1283-48c8-957a-0d1e8c4c8a12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting list of user groups

2014-07-24 Thread Kyle Adams
Thanks for your help, Russ. I'm planning to expose the user to the names of 
the groups using a drop list on my site. They'll choose a group, then our 
site will get the list of users in that group from Django, and then send a 
query to our database to get the data for that group of users.

-- 
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/7dd07c3d-92c7-41fb-b5b8-aee98ff4d44d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting list of user groups

2014-07-24 Thread Kyle Adams
One issue I'm still having is actually getting the list of group names. I'm 
trying to use the line

groups = Group.objects.value_list('name', flat=True)

but I'm getting an error that reads 

'GroupManager' object has no attribute 'value_list'


Any idea about this?

-- 
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/cfda2446-eb3d-4a62-b19f-643e9f08b768%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting list of user groups

2014-07-24 Thread Kyle Adams
After some more research, turns out it is "values_list" instead of 
"value_list"

-- 
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/54e20481-8952-4f84-b471-7c13556c1354%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: My class communication design problem.

2014-09-05 Thread Kyle Connors
I believe what you're looking for is an initial value. In __init__ the 
following would achieve this:

self.fields['exercise_field'].initial = self.getRandomText(self.language, 
self.dictionary)



On Friday, September 5, 2014 8:17:33 AM UTC-7, Yarick Antonov wrote:
>
> I have serious OOP design problem, and i don't know the way to solve it.
>
> *Here are two of my views:*
> def exercise(request):
> if request.method == 'GET':
> request.session["exercise_start"] = time()
> form = ExerciseForm(language = request.session["language"], 
> dictionary = request.session["dictionary"])
>
> elif request.method == 'POST':
> form = ExerciseForm(request.POST, language = request.session[
> "language"], dictionary = request.session["dictionary"])
>
> if form.is_valid():
> ExerciseTime = time() - request.session["exercise_start"]
> ExerciseText = form.cleaned_data["exercise_field"]
>
> if request.user.is_authenticated():
> exercise = Exercise(player = request.user)
> exercise.time = ExerciseTime
> exercise.save()
>
> request.session["exercise_text"] = ExerciseText
> request.session["exercise_time"] = ExerciseTime
> return redirect('game_result')
> return render(request, "game/exercise.html", {'form': form})
>
> def result(request):
> exercise_result = {"exercise_text": request.session["exercise_text"], 
> "exercise_time": request.session["exercise_time"]}
> return render(request, "game/result.html", exercise_result)
>
> *And here is my "exercise form" which obviously used by "exercise view":*
> class ExerciseForm(forms.Form):
> def __init__(self, *args, **kwargs):
> self.language = kwargs.pop('language', None)
> self.dictionary = kwargs.pop('dictionary', None)
> self.exercise_text = self.getRandomText(lng=self.language, dct=
> self.dictionary)
> self.SetExText()
> super(ExerciseForm, self).__init__(*args, **kwargs)
>
> def SetExText(self):
> self.exercise_text = self.getRandomText(self.language, self.
> dictionary)
> self.exercise_field.exercise_text = self.exercise_text
>
> def getRandomText(self, lng, dct):
> count = ExerciseText.objects.filter(dictionary__dictionary_name = 
> dct).count()
> if count:
> rand_id = sample(range(1, count), 1)
> return ExerciseText.objects.get(id__in=rand_id).text
> else:
> return "lol"
>
> exercise_field = ExerciseField(exercise_text = exercise_text, widget = 
> forms.TextInput(attrs = {'autocomplete': 'off', 'autofocus': 'autofocus'
> }))
>
> *My field, used in form above:*
> class ExerciseField(forms.CharField):
> def __init__(self, exercise_text, *args, **kwargs):
> self.exercise_text = exercise_text
> super(ExerciseField, self).__init__(*args, **kwargs)
>
> def validate(self, value):
> if value != self.exercise_text:
> raise ValidationError("Texts don't match")
>
> *And finally, simple template:*
> {% extends "base.html" %}
>
> {% block content %}
> 
> {% csrf_token %}
> {{ form.exercise_text }}
> {{ form.as_p }}
> 
> {% endblock content %}
>
> What i try to do:
> I try to bargain two arguments which come from "create view" which not 
> represent here in sake of space saving, and these two arguments are 
> "language", and "dictionary".
> I use them to get a record from db table, to get random text.
>
> And here I need your help, because i can't dynamically create variable 
> "exercise_text", because i need it in Class instance.
> Meaning - it need to be predefined before I'll use my "exercise_field.
>
> And also i can't put exercise_field inside of "__init__", because it will 
> not be accessible in template.
>
> *In short:*
> I need to get random record from db, and i need to put this record in my 
> field. How to do that? Dynamically.
>

-- 
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/ed45bdcc-c82d-42c7-9fb8-203d6d187148%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


tutorial site refers to a module which does not exist

2017-11-04 Thread Kyle Foley
I'm trying to teach myself Django on this site:

https://docs.djangoproject.com/en/1.11/intro/tutorial02/

If you look at this sentence:

To include the app in our project, we need to add a reference to its 
configuration class in the INSTALLED_APPS 

 setting. 
The PollsConfig class is in the polls/apps.py file, so its dotted path is 
'polls.apps.PollsConfig'.

They haven't told me what the pollsconfig class consists in, nor have they 
told me to build the apps.py module.  When I run the command line

python manage.py makemigrations polls

ModuleNotFoundError: No module named 'polls.apps.PollsConfig'; 'polls.apps' 
is not a package


So what am I supposed to put in that module?



-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5cd8bacd-dae2-4c87-99b0-c83da4520edf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tutorial site refers to a module which does not exist

2017-11-04 Thread Kyle Foley
But if you look at the previous page where the apps.py is created

https://docs.djangoproject.com/en/1.11/intro/tutorial01/

you'll see that in no case do they ask you to put anything in the apps.py
It's blank, there's no pollsconfig in that file.


On Saturday, November 4, 2017 at 3:01:15 PM UTC-7, Kyle Foley wrote:
>
> I'm trying to teach myself Django on this site:
>
> https://docs.djangoproject.com/en/1.11/intro/tutorial02/
>
> If you look at this sentence:
>
> To include the app in our project, we need to add a reference to its 
> configuration class in the INSTALLED_APPS 
> <https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-INSTALLED_APPS>
>  setting. 
> The PollsConfig class is in the polls/apps.py file, so its dotted path is 
> 'polls.apps.PollsConfig'.
>
> They haven't told me what the pollsconfig class consists in, nor have they 
> told me to build the apps.py module.  When I run the command line
>
> python manage.py makemigrations polls
>
> ModuleNotFoundError: No module named 'polls.apps.PollsConfig'; 
> 'polls.apps' is not a package
>
>
> So what am I supposed to put in that module?
>
>
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20b5350b-deb3-4656-87a0-f5c5981e79d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tutorial site refers to a module which does not exist

2017-11-04 Thread Kyle Foley
ok, i redit it from scratch and when i wrote

python manage.py startapp polls


I was supposed to get


polls/
__init__.py
admin.py
apps.py
migrations/
__init__.py
models.py
tests.py
views.py


but instead the apps.py did not create




On Saturday, November 4, 2017 at 3:31:58 PM UTC-7, knbk wrote:
>
> Hi,
>
> What version of Django are you using? Starting in 1.9, the startapp 
> command definitely creates an apps.py with a PollsConfig class, so you're 
> likely using an older version of Django. 
>
> You can either upgrade Django to 1.11 or use the tutorial for whichever 
> version you have installed.
>
> Marten
>
> On Saturday, November 4, 2017 at 11:01:15 PM UTC+1, Kyle Foley wrote:
>>
>> I'm trying to teach myself Django on this site:
>>
>> https://docs.djangoproject.com/en/1.11/intro/tutorial02/
>>
>> If you look at this sentence:
>>
>> To include the app in our project, we need to add a reference to its 
>> configuration class in the INSTALLED_APPS 
>> <https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-INSTALLED_APPS>
>>  setting. 
>> The PollsConfig class is in the polls/apps.py file, so its dotted path 
>> is 'polls.apps.PollsConfig'.
>>
>> They haven't told me what the pollsconfig class consists in, nor have 
>> they told me to build the apps.py module.  When I run the command line
>>
>> python manage.py makemigrations polls
>>
>> ModuleNotFoundError: No module named 'polls.apps.PollsConfig'; 
>> 'polls.apps' is not a package
>>
>>
>> So what am I supposed to put in that module?
>>
>>
>>
>>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43a989b6-e0f9-4257-b808-2b77d6bd7ef9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tutorial site refers to a module which does not exist

2017-11-04 Thread Kyle Foley
I called a consultant and he told me to write the following code

INSTALLED_APPS = (
'polls',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',


and that solved the issue.  but i'm a little confused as to why the apps.py 
module is not being created.


On Saturday, November 4, 2017 at 3:01:15 PM UTC-7, Kyle Foley wrote:
>
> I'm trying to teach myself Django on this site:
>
> https://docs.djangoproject.com/en/1.11/intro/tutorial02/
>
> If you look at this sentence:
>
> To include the app in our project, we need to add a reference to its 
> configuration class in the INSTALLED_APPS 
> <https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-INSTALLED_APPS>
>  setting. 
> The PollsConfig class is in the polls/apps.py file, so its dotted path is 
> 'polls.apps.PollsConfig'.
>
> They haven't told me what the pollsconfig class consists in, nor have they 
> told me to build the apps.py module.  When I run the command line
>
> python manage.py makemigrations polls
>
> ModuleNotFoundError: No module named 'polls.apps.PollsConfig'; 
> 'polls.apps' is not a package
>
>
> So what am I supposed to put in that module?
>
>
>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f7e2178b-988c-4e59-b1b2-622ebd151dea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


tutorial site not working

2017-11-04 Thread Kyle Foley
At this site

https://docs.djangoproject.com/en/1.11/intro/tutorial02/

towards the end I input the following:

>>> q.was_published_recently()


and I got the following error:


Traceback (most recent call last):

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/commands/shell.py",
 line 69, in handle

self.run_shell(shell=options['interface'])

  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/django/core/management/commands/shell.py",
 line 61, in run_shell

raise ImportError

ImportError


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "", line 1, in 

AttributeError: 'Question' object has no attribute 'was_published_recently'

>>> 


It's also not very clear from that site how they want the models.py file to 
look. Right now I have:


import datetime

from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils import timezone

@python_2_unicode_compatible  # only if you need to support Python 2
class Question(models.Model):
# ...
def __str__(self):
return self.question_text

def was_published_recently(self):
return self.pub_date >= timezone.now() - datetime.timedelta(days=1)

datetime.timedelta(days=1)

@python_2_unicode_compatible  # only if you need to support Python 2
class Choice(models.Model):
# ...
def __str__(self):
return self.choice_text


But I'm not sure that's right. 

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cb6b71bf-d420-4233-a8cf-ceae8b04731e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: tutorial site not working

2017-11-04 Thread Kyle Foley
Let me also show what I have placed in the terminal

>>> Question.objects.get(pk=1)



>>> q = Question.objects.get(pk=1)

>>> q.was_published_recently()

I also don't understand why I am outputting:



And the website says the output should be:



 

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6087580b-5be3-484e-a929-d0e4e6a7ad5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django to APK

2019-01-19 Thread Jean Kyle
Is there a way of converting a Django website into an APK that can be 
installed on an Android phone?

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31a440ae-1638-4ce9-9539-b4edc57ee516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error running Django tutorial

2020-03-24 Thread kyle D
I'm using Django for a class, and came across this thread and thought I'd 
post what fixed it for me in case someone else has the same issue I did.

Makes sure your mysite/urls.py is the one that has the urlpatterns[] with 
the path to your polls and not the mysite/polls/urls.py.

This one:
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]

 
Not this one:
app_name = 'polls'
urlpatterns = [
# ex: /polls/
path('', views.index, name='index'),

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/61ca2cd8-70cb-4a5b-8ae7-5657ef413209%40googlegroups.com.


Re: Required Django Programmer for freelancer

2020-07-08 Thread LordIS Kyle
I'm interested for this project


Le mer. 8 juil. 2020 14:25, Kumar Sanu  a écrit :

> Highly interested for this position
>
> On Wed, 8 Jul 2020, 15:12 Ajeet Kumar Gupt, 
> wrote:
>
>> Dear Team,
>>
>> I require Django programmers for an HR portal like leave request, HRMS.
>>
>> *System Requirements:*
>>
>> *1. Main Database :* Main app only for the authentication purpose and
>> employee information take it from the oracle ebs system by API.
>>
>> *2. Leave Application System:* User login and validate details from the
>> main app point no.1 apply the leave and send for the approver with history
>> details
>>
>> *3. SCR application :* Here also a  approval and rejection process with
>> customized notification based on company profile.
>>
>> *Note:* Single Sign On and single Employee Information no need to create
>> in every app for the user profile. I need to create the only Main App /
>> Main Database.
>>
>> Any person have interested please let me know and give me the demo on
>> zoom meeting as soon as possible.
>>
>>
>>
>> *Thanks & Regards*
>> Ajit
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BTqRstOCEpZsnpq%3DyJkgqRRXY-UBqUMMxX%2BaM-Mt7Q-pBejoQ%40mail.gmail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJ2YsERsvXsgPbU1RR0kPgfqjZ%2Bmu6%3DcJ%3DGjVXWYxVbfCevoPQ%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-He%3DGDDNGneb7W5gQ_Ghgk4EDkeA5Kq6RgdHMQ3Yw3UbuZHw%40mail.gmail.com.


Re: Conseil et Guide

2021-03-02 Thread LordIS Kyle
Salut mon ami,

Les Frameworks facilitent la création de contenu avec un gain de temps.
Personnellement j'aime Django pour sa facilité et le fait qu'il est écrit
en python et si t'es plutôt php je te conseille Laravel que symphony

Le mar. 2 mars 2021 17:19, Michel Mahomy  a écrit :

> Bonjour M. Richard, selon vous entre Django et les framework Php (Laravel,
> Symfony, CodeIgniter et autres) quel est votre préférence ?
>
> Le dim. 28 févr. 2021 à 17:26, Richard Dushime  a
> écrit :
>
>> mr jean michel  selon moi django est pour le web devellopement en
>> utilisant python pour rendre facile quelque task et d n est pas repeter les
>> codes ecrit  beaucoup des fois
>> thank you
>>
>> On Sun, Feb 28, 2021 at 6:33 PM Michel Mahomy 
>> wrote:
>>
>>> Bonjour M./M.., je suis Michel MAHOMY développeur débutant en Django.
>>> Je voudrais savoir est-ce possible de faire de l'intelligence
>>> artificielle en Django ?
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/cb021f3e-8c55-4e46-bcb6-9dbb8e0bc2c9n%40googlegroups.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJCm56JSU1%3DBzNNdfWbOxfd%2BwyO_CCjzJEpK9ZS5xXih9RviHQ%40mail.gmail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAAM8LEMyy_%3DZckGk6yJXJXe0h3mYq26pBHoW5p7Y88jcF1tZHw%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAM-He%3DHTvT0prQYn7J4_rmAp55%2BHeK4Cie72TWp39n_ZfOrRbA%40mail.gmail.com.


Zero Downtime Field Type Changes

2019-03-12 Thread &#x27;Kyle Mulka' via Django users
Hi there,

Wondering if there's any tool out there to make a zero downtime field type 
change easier. I want to change a django model field from one type to 
another, and the format of the field in the database is slightly different.

I've come up with a process I think will work, but it will be rather 
tedious if done manually. Wondering if there's a more automated approach or 
other tools out there already. I'd like to come up with a general solution 
for use in the future, but right now trying to tackle converting UUIDField 
from django-extensions to the built in django version.
https://github.com/django-extensions/django-extensions/issues/647

I was thinking about maybe using a custom field that supports both types, 
but not exactly sure how to write a custom field that would do that.

If it helps, the manual process I'm thinking about kind of goes as follows:

# existing model:
class Model:
field = OldField()

# add field_old with OldField type
# when updating or adding rows start writing to both fields
# copy data from field to field_old
class Model:
field = OldField()
field_old = OldField()

# stop using field, only use field_old
# remove field
class Model:
field_old = OldField()

# create field with new type
# when updating or adding rows start writing to both fields in their 
respective formats
# copy data from field_old in old format to field in new format
class Model:
field = NewField()
field_old = OldField()

# stop using field_old
# remove field_old
class Model:
field = NewField()

Thanks for your help!

--
Kyle Mulka
http://www.kylemulka.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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b16ffdee-74d6-4ba2-ac1f-b5bd9cf1e40b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Prefetch and custom managers

2019-04-08 Thread &#x27;Kyle Mulka' via Django users
Hello,

I'm having an issue with trying to use prefetch and custom managers 
together. They seem to be interacting in a weird way. Wondering if I'm 
doing something wrong.

I've set up a test django project which demonstrates the issue here:
https://github.com/mulka/django_prefetch_manager_bug

These two tests are coming back with different results:
https://github.com/mulka/django_prefetch_manager_bug/blob/master/review_site/tests.py

Here's the models file:
https://github.com/mulka/django_prefetch_manager_bug/blob/master/review_site/models.py

Thanks in advance for your help!

-Kyle

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2f946ab2-620c-49a0-a3cc-55b69e5a7e7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Custom Django Admin Pages

2018-08-20 Thread &#x27;Kyle Mulka' via Django users
Hi there,

It seems like Django Admin is designed to work with Django models. But, I'm 
wondering what the best way is to create custom admin pages that don't 
revolve around Django models. Like, maybe there's a third party API that I 
want admins to be able to call from the Django admin. What's the best way 
to get custom pages to show up and render in the Django admin?

Thanks,

Kyle

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/57ccf869-829c-4ed4-881b-3b2031834bee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.