Re: can't get STATICFILES to work (Django dev version)

2011-09-26 Thread Xavier Ordoquy
Hi, Using a static directory like that on the development server sounds wrong and you'll most probably have issues when the site goes live. >From what you said, it looks like you are confusing STATICFILES_DIRS and >STATICFILES_ROOT. Regards, Xavier. Le 27 sept. 2011 à 05:29, nara a écrit :

Re: can't get STATICFILES to work (Django dev version)

2011-09-26 Thread Babatunde Akinyanmi
When you want to access say screen.css, how do you put it in your template?? On 9/26/11, nara wrote: > I am having trouble getting STATICFILES to work. I have read the docs, > and followed the instructions, but I never get my css files to load. > My current workaround is to put all the css inline

Re: can't get STATICFILES to work (Django dev version)

2011-09-26 Thread nara
Good news, my static files finally work. (I wanted to make one last try before giving up). Bottom line, I did not have to make any changes to my original settings.py or urls.py. All I did: created a static dir. under my app's directory, placed the css files under it, and put '/static/css/blueprint/

Re: Forms from models API example.

2011-09-26 Thread Russell Keith-Magee
On Tue, Sep 27, 2011 at 7:10 AM, Jack720 wrote: > I'd just like to state that I did try and find this out on my own > first but "django form model api" isn't a vary narrowing search. I've > read through the documentation multiple times but I'm still a little > stuck. It would appear most of the do

Re: [pinax-users] Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-26 Thread Alec Taylor
Thanks. I'll get the prereqs installed now. On Tue, Sep 27, 2011 at 10:43 AM, Brian Rosner wrote: > On Sat, Sep 17, 2011 at 1:17 AM, Alec Taylor wrote: >> Would you recommend I follow the aforementioned Learning Plan, or >> would you recommend a different method? > > Our getting started guide >

Creating an imageField from a charField

2011-09-26 Thread Mehrms
Does anyone know how to instantiate an imageField using just the URL of the image? I am storing my URLs to images in a charField, but I am letting the user interact with the imageField. Everything works fine to render the imageField and I can use the imageField to upload an image. The url of the s

password_reset_form_save() got an unexpected keyword argument 'request'

2011-09-26 Thread Ben O'Day
I recently upgraded to Django 1.3 (from 1.2) and noticed that our password reset functionality isn't working. I do have the templates customized, but am using the default view/form files for this. Looking at the django.contrib.auth.views file, I can't see the issue either (the parameters in the op

Forms from models API example.

2011-09-26 Thread Jack720
I'd just like to state that I did try and find this out on my own first but "django form model api" isn't a vary narrowing search. I've read through the documentation multiple times but I'm still a little stuck. It would appear most of the documentation/examples are outdated. I'm certain this has b

Re: can't get STATICFILES to work (Django dev version)

2011-09-26 Thread nara
Xavier, I followed the blog, and at the end, my css files were not getting pulled in. I then tried doing a ./manage.py collectstatic, and this does collect all static files. Unfortunately, running the server still does not serve my css files. I have spent too many cycles on this issue now. I will

Re: [pinax-users] Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-26 Thread Brian Rosner
On Sat, Sep 17, 2011 at 1:17 AM, Alec Taylor wrote: > Would you recommend I follow the aforementioned Learning Plan, or > would you recommend a different method? Our getting started guide http://pinax.readthedocs.org/en/latest/gettingstarted.html shows you some reading you should do before diving

Re: Platform system with Django?

2011-09-26 Thread Ian
So I already have my site up and running in PHP/mySQL, but I want to move to Django (and learn it in the process!) The way I do it now is have a main table of posts, and the table of posts has a column called "site". If the user accesses myproject.com/ mySite, it loads the posts from the database

Re: Postgres on OSX Lion

2011-09-26 Thread Nadae Ivar BADIO
Sudo for admin permissions Envoyé par mon BlackBerry® smartphone de Tigo -Original Message- From: adrian Sender: django-users@googlegroups.com Date: Mon, 26 Sep 2011 15:54:00 To: Django users Reply-To: django-users@googlegroups.com Subject: Postgres on OSX Lion Postgres comes pre-insta

Re: How to make a query form depend on a field?

2011-09-26 Thread Russell Keith-Magee
On Mon, Sep 26, 2011 at 11:59 PM, Tom Evans wrote: > On Mon, Sep 26, 2011 at 4:26 PM, David G. Pullman > wrote: >> Thanks very much for helping to separate the processing.  I'm trying to >> implement a setup using your suggestions.  I've hit a snag on a detail: >> >>> class SearchForm(forms.Form

Re: Python Weekly

2011-09-26 Thread Gelonida N
On 09/26/2011 07:43 PM, Rahul wrote: > Hi Everyone, > > I have started a free weekly newsletter called Python Weekly which > includes curated news, articles, new releases, software & tools, > events, jobs etc about Python and related technologies. It's a great > way to keep abreast of what's happe

Postgres on OSX Lion

2011-09-26 Thread adrian
Postgres comes pre-installed in OSX Lion for the first time (and mysql is no longer present). Yeah! I installed psycopg2 using pip. Then I kept getting the error message: psycopg2.OperationalError: could not connect to server: Permission denied Is the server running locally and acceptin

psycopg2 pickling error

2011-09-26 Thread tom
Hello, since a while I see very often those errors: Traceback (most recent call last): File "/opt/agileamp/lib/python/django/core/handlers/base.py", line 89, in get_response response = middleware_method(request) File "/usr/local/lib/python2.6/dist-packages/newrelic-0.5.15.41- py2.6.egg/newr

Re: DJango doesn't work with Oracle 11g on Windows 8

2011-09-26 Thread Benjamin Welton
Very true, oracle is quite difficult to get working (properly at least) in general on windows. Much less what amounts to a beta version of windows. I haven't heard back from the original poster on this, like i said im very curious to see if he was able to get everything working correctly. Every

Re: Web Designer

2011-09-26 Thread Joseph Slone
What!!! Nobody is using vigor anymore? On Mon, Sep 26, 2011 at 12:25 PM, Sushirod wrote: > For Mac I use coda and for Windows I realy like Notepad++. > > As far as WYSIWYG editors go I`ve never seen one that`s better than > Dreamweaver, wich I`d say it`s not that wysiwyg at all. To be honest > t

Re: good django twitter login tutorial

2011-09-26 Thread Gianluca Sforna
On Mon, Sep 26, 2011 at 7:49 PM, Cal Leeming [Simplicity Media Ltd] wrote: > You are kidding, right? > https://bitbucket.org/david/django-oauth-plus/wiki/Home > I appreciate you are a total beginner, but come on, get your hands dirty! :) Are you sure that covers the OP question? I think django-oa

Re: DJango doesn't work with Oracle 11g on Windows 8

2011-09-26 Thread Andre Terra
It's just that if I were trying to get django working on windows 8, I wouldn't start with an Oracle setup. Cheers, AT On Mon, Sep 26, 2011 at 6:14 PM, Benjamin Welton < benjamin.r.wel...@wmich.edu> wrote: > Windows 8? > > > Its possible he's using it on Windows 8 since the developer preview is

Re: DJango doesn't work with Oracle 11g on Windows 8

2011-09-26 Thread Benjamin Welton
Windows 8? Its possible he's using it on Windows 8 since the developer preview is available. If he actually is id be curious to know if everything works ok on windows 8 with python/django. Ben On 09/26/2011 04:10 PM, Andre Terra wrote: Windows 8? On Sat, Sep 24, 2011 at 5:27 AM, Benjamin

Re: DJango doesn't work with Oracle 11g on Windows 8

2011-09-26 Thread Andre Terra
Windows 8? On Sat, Sep 24, 2011 at 5:27 AM, Benjamin Welton < benjamin.r.wel...@wmich.edu> wrote: > Hey Alec, > > django.core.exceptions.ImproperlyConfigured: Error loading cx_Oracle > module: DLL load failed: %1 is not a valid Win32 application. > > Do you have the visual c redistributable inst

Re: Python Weekly

2011-09-26 Thread Javier Guerra Giraldez
On Mon, Sep 26, 2011 at 12:43 PM, Rahul wrote: > started a free weekly newsletter called Python Weekly make it an RSS, and on a readable format (not a single PNG), and I'm in. right now, it's too much like spam techniques for my taste. (not saying that it's spam, only that you're using the same

Re: How to make a query form depend on a field?

2011-09-26 Thread Doug Ballance
There are also a few third-party apps that can assist you with the form->query process such as this one: https://github.com/alex/django-filter -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goo

Re: Web Designer

2011-09-26 Thread Andre Terra
Please refer to our recent thread with suggestions for development environments. There's enough there already to get anyone started. On the web: https://groups.google.com/forum/#!msg/django-users/ZwVHa0jBRrY/Fq-jCVxrK7AJ Cheers, AT On Mon, Sep 26, 2011 at 1:25 PM, Sushirod wrote: > > Good s

daemon mod_wsgi or embedded mod_wsgi + apache-mpm + suexec

2011-09-26 Thread CC4t
What do you use in your high loaded project? mod_wsgi with "WSGIDaemonProcess testapp.test user=testapp group=testapp processes=N threads=M" in your VirtualHost or embedded mod_wsgi + apache-mpm + suexec -- You received this message because you are subscribed to the Google Groups "Django users"

django.middleware.gzip vs mod_deflate (Apache)

2011-09-26 Thread CC4t
What is the best choise? django.middleware.gzip or mod_deflate (Apache)? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-us

Re: MYSQL Installation error

2011-09-26 Thread Ilian Iliev
Probably your MtSQL is not working, Try to telnet to this port to check is it open and is something listening on it. -- eng. Ilian Iliev Web Software Developer Mobile: +359 88 66 08 400 Website: http://ilian.i-n-i.org On Mon, Sep 26, 2011 at 11:32 PM, PremAnand Lakshmanan wrote: > Im trying to

MYSQL Installation error

2011-09-26 Thread PremAnand Lakshmanan
Im trying to install mysql and get the following error, Any idea on this error? >>> import pymysql >>> conn = pymysql.connect(host='localhost', port=3306, user='root', passwd=None , db='mysql') Traceback (most recent call last): File "", line 1, in File "build\bdist.win32\egg\pymysql\__init_

Re: Using exists() on queryset for a User

2011-09-26 Thread Kurtis Mullins
That worked perfectly and makes a lot more sense. Thanks! On Mon, Sep 26, 2011 at 4:05 PM, Shawn Milochik wrote: > if User.objects.filter(email = data['email']).exists() > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this g

can't get STATICFILES to work (Django dev version)

2011-09-26 Thread nara
I am having trouble getting STATICFILES to work. I have read the docs, and followed the instructions, but I never get my css files to load. My current workaround is to put all the css inline in my template file, but that should not be a permanent solution. I am running the django dev version, and

looking for an event planning app

2011-09-26 Thread j_syk
I'm looking to build a site to plan events for a small convention. I've been looking around for an Here's what I'm looking for: -Users can sign up to host an event at a given location -User can pick event length in hour or 30min increments -There can't be more than one event at the same location a

Re: Using exists() on queryset for a User

2011-09-26 Thread Shawn Milochik
if User.objects.filter(email = data['email']).exists() -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@go

Using exists() on queryset for a User

2011-09-26 Thread Kurtis
I'm trying to check if a user with a specified email already exists. According to the docs, it's better to use the .exists() method. I tried this: if User.objects.exists(email = data['email']): raise forms.ValidationError(u'Email Already Exists') However, I get this error: exists() got an u

Re: Python Weekly

2011-09-26 Thread Kurtis Mullins
There is a privacy policy right on the page where you subscribe. We respect your privacy, and we take it very seriously. We won't share your > email address with anyone, and you'll only receive Python Weekly newsletter > as scheduled. > > On Mon, Sep 26, 2011 at 3:42 PM, Sonny wrote: > Would be

Re: Question about losing port number.

2011-09-26 Thread Felipe Prenholato
People, this is DJANGO user list, not PHP user list... Go to the right place (and you will get more help). Felipe 'chronos' Prenholato. Linux User nº 405489 Home page: http://chronosbox.org/blog Twitter: http://twitter.com/chronossc 2011/9/26 Chen Xu > Thx, but $_SERVER['SERVER_PORT'] doesn'

Re: Question about losing port number.

2011-09-26 Thread Chen Xu
Thx, but $_SERVER['SERVER_PORT'] doesn't give me 9090, it gives me 80. On Mon, Sep 26, 2011 at 12:33 PM, Kurtis Mullins wrote: > Umm, I'm kinda new here so I'm not sure if this is the right place for that > kind of a question. But, you could easily include $_SERVER['SERVER_PORT'] in > there >

Re: Python Weekly

2011-09-26 Thread Sonny
Would be nice if you include a privacy policy clause on your site, but good idea overall. On Sep 26, 1:43 pm, Rahul wrote: > Hi Everyone, > > I have started a free weekly newsletter called Python Weekly which > includes curated news, articles, new releases, software & tools, > events, jobs etc ab

Admin WCAG Conformance

2011-09-26 Thread Lee
The only reference I see to WCAG in this forum is from 2007. What is the current level of conformance to WCAG for the Admin interface? Thanks- Lee -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-user

Re: Question about losing port number.

2011-09-26 Thread Kurtis Mullins
Umm, I'm kinda new here so I'm not sure if this is the right place for that kind of a question. But, you could easily include $_SERVER['SERVER_PORT'] in there Source: http://php.net/manual/en/reserved.variables.server.php On Mon, Sep 26, 2011 at 3:30 PM, Chen Xu wrote: > I have a general qu

Re: Question about losing port number.

2011-09-26 Thread Donald Stufft
I think you might be on the wrong mailing list… There's no PHP around these parts ;) On Monday, September 26, 2011 at 3:30 PM, Chen Xu wrote: > I have a general question about PHP: > So basically I have a link, and I want the href to be absolute., so I do > 'https://' . $_SERVER['HTTP_HOST'

Question about losing port number.

2011-09-26 Thread Chen Xu
I have a general question about PHP: So basically I have a link, and I want the href to be absolute., so I do 'https://' . $_SERVER['HTTP_HOST'] . '/login' ; this gives me https://127.0.0.1/login on my local; however, what i really want is https://127.0.0.1:9090/login, it is missing ":9090". Coul

Re: Python Weekly

2011-09-26 Thread ANKUR AGGARWAL
Nice :) Subscribed :D On Mon, Sep 26, 2011 at 11:49 PM, Kurtis Mullins wrote: > Thanks! I'm joining as well. > > > On Mon, Sep 26, 2011 at 1:52 PM, Arthur Gouveia > wrote: > >> Nice one. I'm in. >> >> -- >> Arthur Gouveia >> Web Developer >> >> http://arthurgouveia.com >> >> >> >> On Mon, Sep 26

Re: Python Weekly

2011-09-26 Thread Kurtis Mullins
Thanks! I'm joining as well. On Mon, Sep 26, 2011 at 1:52 PM, Arthur Gouveia wrote: > Nice one. I'm in. > > -- > Arthur Gouveia > Web Developer > > http://arthurgouveia.com > > > > On Mon, Sep 26, 2011 at 1:46 PM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote:

Re: circular dependency in models.py

2011-09-26 Thread Shawn Milochik
If I'm understanding your question properly, you can use the unique_together option. https://docs.djangoproject.com/en/1.3/ref/models/options/#unique-together -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Cloudfiles Storage Backend

2011-09-26 Thread Kurtis Mullins
Thanks Alex. Yeah, I actually did try to use that. Currently I'm using it for SFTP (and having some issues with the URLs provided by the SFTP plugin). The problem with the Cloudfiles implementation is that, according to what I've read and tried, the API it used is outdated. Rackspace has changed q

circular dependency in models.py

2011-09-26 Thread Amit Sethi
I think the solution to this might actually be very simple . I have an app stories that looks something like this at the moment . It is in the same file ideally i would like if both of them were related by foreignkey but that is not possible because they are in same file and there are declaration i

Re: Python Weekly

2011-09-26 Thread Arthur Gouveia
Nice one. I'm in. -- Arthur Gouveia Web Developer http://arthurgouveia.com On Mon, Sep 26, 2011 at 1:46 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Sample looks quite interesting - subscribed. > > > On Mon, Sep 26, 2011 at 6:43 PM, Rahul wrote: > >>

Re: Reuse admin for views when some fields are from remote sources

2011-09-26 Thread Ilian Iliev
If you want to make these editable you should declare your own form for the admin and overwrite the save method. -- eng. Ilian Iliev Web Software Developer Mobile: +359 88 66 08 400 Website: http://ilian.i-n-i.org On Mon, Sep 26, 2011 at 7:37 PM, cesar.ortiz wrote: > It works for the List V

Re: good django twitter login tutorial

2011-09-26 Thread Cal Leeming [Simplicity Media Ltd]
You are kidding, right? https://bitbucket.org/david/django-oauth-plus/wiki/Home I appreciate you are a total beginner, but come on, get your hands dirty! :) Cal On Mon, Sep 26, 2011 at 6:13 PM, Guido wrote: > Hey all, > > I want to build a website where users log in with their twitter > acco

Re: Python Weekly

2011-09-26 Thread Cal Leeming [Simplicity Media Ltd]
Sample looks quite interesting - subscribed. On Mon, Sep 26, 2011 at 6:43 PM, Rahul wrote: > Hi Everyone, > > I have started a free weekly newsletter called Python Weekly which > includes curated news, articles, new releases, software & tools, > events, jobs etc about Python and related technolo

Python Weekly

2011-09-26 Thread Rahul
Hi Everyone, I have started a free weekly newsletter called Python Weekly which includes curated news, articles, new releases, software & tools, events, jobs etc about Python and related technologies. It's a great way to keep abreast of what's happening in Python land. You can subscribe to it here

Re: How to make a query form depend on a field?

2011-09-26 Thread David G. Pullman
On Sep 26, 2011, at 11:59 AM, Tom Evans wrote: > 100% certain that was just a brain fade on Russell's part, it should > be forms.ModelChoiceField > > https://docs.djangoproject.com/en/1.3/ref/forms/fields/#modelchoicefield > > Cheers > > Tom > > -- > You received this message because you are

Re: Cloudfiles Storage Backend

2011-09-26 Thread Alex Chan
Hi, Have you already checked out this project? http://code.welldev.org/django-storages/ I'm currently using this and it works great with Mongo's GridFS and S3. -- Alex On Mon, Sep 26, 2011 at 8:33 AM, Kurtis wrote: > Hey, > > I really want to build a storage back-end for cloudfiles. The snag

good django twitter login tutorial

2011-09-26 Thread Guido
Hey all, I want to build a website where users log in with their twitter account like you see a lot on the internet. I read some things about OAuth 2.0 etc. but don't understand any of those docs. I am a total beginner (I just got the poll application to work) and have never build a site with us

Re: Reuse admin for views when some fields are from remote sources

2011-09-26 Thread cesar.ortiz
It works for the List View, but it doesn't work for the Edit View On 26 sep, 13:40, Ilian Iliev wrote: > If these fields are not field in the model class you won't see them in the > add/edit of the admin. > If you want to show them in the view(list) section of the admin you can > define them

Re: Web Designer

2011-09-26 Thread Sushirod
Good sugestions, I`ll take a look at this! On 26 set, 04:32, Markus Gattol wrote: > I'd say most people us a simple text editor such as Vim, Emacs... If you use > runserver and and your browsers auto-reload for that tab then that's all you > need. If you want to be a bit speedier then you can us

Re: Web Designer

2011-09-26 Thread Sushirod
For Mac I use coda and for Windows I realy like Notepad++. As far as WYSIWYG editors go I`ve never seen one that`s better than Dreamweaver, wich I`d say it`s not that wysiwyg at all. To be honest there's no such thing as a WYSIWYG, I think its just a marketing term that propose a software with a v

Re: Multiple forms with same name.

2011-09-26 Thread sakthi
Thank you. But how to use that. can you please briefly demonstrate in my code that how could i use it in views.py to populate the values. On Sep 26, 11:36 am, Shawn Milochik wrote: > Use the 'prefix' kwarg that comes with Django forms. -- You received this message because you are subscribed to

Re: How to make a query form depend on a field?

2011-09-26 Thread Tom Evans
On Mon, Sep 26, 2011 at 4:26 PM, David G. Pullman wrote: > Thanks very much for helping to separate the processing.  I'm trying to > implement a setup using your suggestions.  I've hit a snag on a detail: > >> class SearchForm(forms.Form): >>    organization = forms.ModelField(Organization) >>  

FileField parser populating other fields

2011-09-26 Thread Paulo VJ
Hello Everyone, I'm looking to building an Model where it's fields are populated by the contents of a PDF file. I've come to this solution, one I didn't like: class ContaPdf(models.Model): conta_pdf = models.FileField(upload_to='conta_pdf') class Conta(models.Model) data_inicio = models.D

Re: postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread j_syk
> You can control the order of how nulls sort with pgsql (at least, 8.3 > and above) by appending 'NULLS FIRST' or 'NULLS LAST' to the 'ORDER > BY' clause of a select query. Good to know. I am using 8.4, I may look into adding the order by into a .extra() call. Thanks Due to the urgency, I went w

Re: Multiple forms with same name.

2011-09-26 Thread Shawn Milochik
Use the 'prefix' kwarg that comes with Django forms. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@goog

Multiple forms with same name.

2011-09-26 Thread sakthi
In a page i made multiple text forms with the same name. i cannot get the values of all the forms. only the last form's value is available. my html looks like this how can i get the values of all the forms having the same name. Thank you. -- You received this message because you are subs

Re: How to make a query form depend on a field?

2011-09-26 Thread David G. Pullman
On Sep 25, 2011, at 7:45 PM, Russell Keith-Magee wrote: > On Sun, Sep 25, 2011 at 9:00 PM, David wrote: >> I'm new to Django, gone through the django book and some >> documentation, but I can't find how to do this or if it's possible. >> >> I have a model that lists documents with title and edi

Cloudfiles Storage Backend

2011-09-26 Thread Kurtis
Hey, I really want to build a storage back-end for cloudfiles. The snag is that cloudfiles containers do not allow for a hierarchical directory structure. Everything must be in a "base directory". Does anyone have any suggestions on methods for performing this conversion of a hierarchical directo

django foreign key admin interface and models structure

2011-09-26 Thread maxwell
(All code is some kind of pseudocode, just for better reading I have an Invoice model: class Invoice(models.Model): // many fields here I need to attach some products (with price for unit, and quantity fields) to this invoice, so I made additional table: class InvoiceProduct(models.Model

Wrong view prefix on Django 1.3, mod_wsgi and mutliple URLconfs

2011-09-26 Thread lucamag
Hi all, I'm using multiple URLconfs for my simple django application. Everything works fine in development mode, but I'm getting a strange error when moving to Apache 2 with mod_wsgi. My main urls.py looks like: --- from django.conf.urls.defaults import * from django.conf import settings # Uncom

Re: postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread Tom Evans
On Mon, Sep 26, 2011 at 3:12 PM, j_syk wrote: > Hello- > On Friday afternoon I migrated a project from sqlite to postgres. > Everything went smoothly and I was able to go home for the weekend and > be happy. Yay. > This morning I was informed that the sort order is different. I have a > DateField

Re: Accessing sum in templates

2011-09-26 Thread David
Sorted: {{ issue.type__severity__sum }} doh :-/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegr

Accessing sum in templates

2011-09-26 Thread David
Hello In my view I have: a = Person.objects.select_related().get(pk=pk) b = a.issue_set.filter(resolution_date__isnull=True).aggregate(Sum('type__severity')) variables = RequestContext(request, { 'person': a, 'issue': b, }) r

Re: postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread j_syk
Found a similar post http://groups.google.com/group/django-users/browse_thread/thread/4edf7a4a94c65c17/2dfbc193845d4383?lnk=gst&q=sort+null#2dfbc193845d4383 The main difference is that mine is a DateField. So I can't just make it 0 instead of None. -- You received this message because you are su

postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread j_syk
Hello- On Friday afternoon I migrated a project from sqlite to postgres. Everything went smoothly and I was able to go home for the weekend and be happy. Yay. This morning I was informed that the sort order is different. I have a DateField for a due date that is set as not required, however leaving

Re: Multiple Image Field in a model

2011-09-26 Thread Philip Mountifield
I would put the images in a seperate model such as "ReportImage" and make a foreign key to "Report", and finally I'd use the "inlines" admin feature for ReportImages to display them on the same page as the report. Phil On 26/09/2011 15:02, NavaTux wrote: Hi all, I have a filed(ImageF

Multiple Image Field in a model

2011-09-26 Thread NavaTux
Hi all, I have a filed(ImageField) in my model.Also I want to have multiple ImageFields.How to have more than one ImageFields only in django model.Is there any need to derive that ImageField as a seperate new model which holds as a foreign key of another one? This is my model: class Repor

HY010 Function sequence error (mssql django-pyodbc)

2011-09-26 Thread PyMan
Hi guys, I'm experiencing a problem with ODBC driver. I'm quite sure is not a django problem, but I'm posting here 'cause maybe someone can help me. I'm using Python 2.6, Django 1.2.0, pyodbc 2.1.7, django-pyodbc (not the last version, but it's ok for this django version). In the settings the DAT

Re: Platform system with Django?

2011-09-26 Thread jmontoya
You can use pinax is based in django and it has a lots of "website templates", intranet, blog, social etc You can easly customized it ... http://pinaxproject.com/ Regards, Julio On Sep 26, 6:18 am, Ian wrote: > I'm new to django, and at this point all I've done is the tutorial. > > But my end

Re: Reuse admin for views when some fields are from remote sources

2011-09-26 Thread Ilian Iliev
If these fields are not field in the model class you won't see them in the add/edit of the admin. If you want to show them in the view(list) section of the admin you can define them as properties, example: class MyModel(models.Model): # field here @property def remote_property(self):

Reuse admin for views when some fields are from remote sources

2011-09-26 Thread cesar.ortiz
Hi, We have some fields that will appear in the view that we won't to be part of the model. They are from other system and we don't wish to store them in order to avoid the problems that will arise with the duplication of data. We also would like to reuse the admin as much as possible in order to

Re: Platform system with Django?

2011-09-26 Thread kenneth gonsalves
On Sun, 2011-09-25 at 21:18 -0700, Ian wrote: > Is it possible to do this? I can imagine the structure and how to get > the second part working (having users register on a particular > subdomain site, post things, etc), but I'm having trouble figuring out > where to get started with the first part

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Matthias Kestenholz
On Mon, Sep 26, 2011 at 12:36 PM, Matthias Kestenholz wrote: > On Mon, Sep 26, 2011 at 12:34 PM, Philip Mountifield > wrote: >> I also have a great deal of dynamically generated models. Interestingly in >> my case I find the issue when using the development server with DEBUG = >> TRUE, I've not y

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Matthias Kestenholz
On Mon, Sep 26, 2011 at 12:34 PM, Philip Mountifield wrote: > I also have a great deal of dynamically generated models. Interestingly in > my case I find the issue when using the development server with DEBUG = > TRUE, I've not yet tried it in deployment. > > I'll take a look at your github, thank

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread David Markey
I actually haven't moved.. I'm still using django 1.2.x. :) Although we plan to move to PG 9.1 and django 1.3 within the next few weeks(we are already using both in testing) I think i read something somewhere in the django 1.3 documentation that PG 8.1 was not supported any more(could have dreamt

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Philip Mountifield
I also have a great deal of dynamically generated models. Interestingly in my case I find the issue when using the development server with DEBUG = TRUE, I've not yet tried it in deployment. I'll take a look at your github, thanks for sharing the link. Out of interest, with respect to David's c

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Philip Mountifield
I am indeed using psycopyg2 and pg8.1, which version did you move to in order to solve the problem? I have just been using 8.1 since it was the default for CentOS 5, but I also see the 8.4 is available via yum. Philip On 26/09/2011 11:20, David Markey wrote: I had some problems with 1.3 and P

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Matthias Kestenholz
Hi Philip On Fri, Sep 23, 2011 at 3:40 PM, Philip wrote: > FieldError: Cannot resolve keyword 'email_config_set' into field. > Choices are: id, name, site, type > > Any ideas/solutions/pointers/tips would be most welcome. Yes, I've seen similar problems in two sites I'm running. I suspect it has

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread David Markey
I had some problems with 1.3 and Postgres 8.1, Are you using psycopg2 and pg 8.1? On 26 September 2011 11:16, Russell Keith-Magee wrote: > Hi Philip, > > I can't say I've seen the error you report. > > My immediate question when I see reports like this is "what else are > you doing?". Django has

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Russell Keith-Magee
Hi Philip, I can't say I've seen the error you report. My immediate question when I see reports like this is "what else are you doing?". Django has an extensive test suite, and things like m2m fields are tested very heavily. Outside of Django's test suite, there are thousands of applications out

Re: FieldError on ManyToMany after upgrading to Django 1.3

2011-09-26 Thread Philip Mountifield
Has anyone else experienced this error? Any help would be appreciated. Thanks Philip On 23/09/2011 14:40, Philip wrote: Just been updating to Django 1.3.1 and come across an odd error. I'm getting the following error from some code which works with version 1.2.7. FieldError: Cannot resolve ke

Re: Web Designer

2011-09-26 Thread Markus Gattol
I'd say most people us a simple text editor such as Vim, Emacs... If you use runserver and and your browsers auto-reload for that tab then that's all you need. If you want to be a bit speedier then you can use things like Sass/Compass for your CSS and maybe HamlPy for your HTML. Both have "watch

Re: Platform system with Django?

2011-09-26 Thread Markus Gattol
Have you had a look at the sites framework yet: https://docs.djangoproject.com/en/dev/ref/contrib/sites/ That might just be what you're after... -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://

Re: Platform system with Django?

2011-09-26 Thread Phang Mulianto
of cource it can be done. it will be your application logic jobs and the database layout... On Sep 26, 2011 12:57 PM, "Ian" wrote: > I'm new to django, and at this point all I've done is the tutorial. > > But my end goal is to create a website that serves as a platform > system. > > I want users t