Re: Model gets subset of fields from inheritance, but then admin.py can't find the inherited fields.

2009-06-09 Thread m
UGHHH! I feel like an idiot. I actually had simply misplaced a comma on the first attribute that came from inheritance, so I thought that when it couldn't find the inherited field but it could find the others, that it was an inheritance problem. Seems to be working now. I had to step away from

Admin interface is doing nothing

2009-10-26 Thread M.
Hi, I've installed the Admin interface, but the interface is unresponsive. If click on USERS, the page refreshes itself and appends auth/user/ to the URL. If I click it again, it appends it again, but I still remain on the same page. I am using Python 2.6 and Ubuntu. Thanks, Martynas --~--~

Re: Admin interface is doing nothing

2009-10-26 Thread M.
cluded exactly as in documentation example: "(r'^admin/', include > (admin.site.urls))", without any wildcards. > > On 27 окт, 00:12, "M." wrote: > > > Hi, > > > I've installed the Admin interface, but the interface is unresponsive. &g

Re: python mvc framework and java mvc framework

2007-10-20 Thread M
In the java world, one of the more interesting approach is grails. Http://grails.codehaus.org It uses proven java technology such as hibernate for ORM and spring for MVC. And glue everything together using a jvm dynamic language called groovy. It's worth checking out if you want to explore

Re: URL_VALIDATOR_USER_AGENT

2013-01-09 Thread m
Hello, > According to : > > https://docs.djangoproject.com/en/dev/ref/settings/ > > URL_VALIDATOR_USER_AGENT > > is deprecated in 1.5. But it's actually been removed. Is that worth a > bug report? > > I just stumbled across this myself, django-oscar (a reasonably big ecommerce app http://o

solve disallowedhost issue with AWS

2017-04-27 Thread M
Hi, Im trying to deploy my website using AWS, and I basically just follow the AWS tutorial at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html. however when I run eb open, it gives me disallowedhost exception, trackback to get_host() call. Plz help. --

Re: help on autologging users after signup

2021-05-24 Thread I,M& M
in drf, the request.POST dictionary does not contain the body of the request instead use the request.data to access the requests body. ex. email = request.data.get('email') password= request.data.get('password') new_user = authenticate(request, email, password) request.data contains the username

Handling multiple sites branched off of one main site

2008-10-30 Thread Wayne M
I'm looking at using Django for a project at work, which is an e- commerce storefront that *must* be able to support multiple storefronts, each storefront filtering a subset of the master products database. For example, we might have a furniture store with the URL furniture.mycompany.com or a rec

multiple models in object_list

2008-11-04 Thread John M
I'm trying to figure out how I can use more than one model with a call to object_list generic view. currently I have this.. objectlist_dict = {'queryset' : Report.reports.all(), 'extra_context' : {'category_list' : Category.objects.all() },

Re: multiple models in object_list

2008-11-04 Thread John M
Thanks for the info. Turns out that I was looking at the wrong bit of code (gr), and wasted 2hrs of my day. John On Nov 4, 2:36 pm, "Matías Costa" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 4, 2008 at 8:37 PM, John M <[EMAIL PROTECTED]> wrote: > > > I&#x

Design question : best way to show 1 .. N different categoried items

2008-11-04 Thread John M
i have a model for status reports:http://dpaste.com/88760/ The report has 1-N bullet Points, each bullet Point has a category. What I want to figure out, whats my best way to display this in a template, given that the category list is flexible. I mean, a report might have 1 or more categories.

Re: Design question : best way to show 1 .. N different categoried items

2008-11-06 Thread John M
ECTED]> wrote: > On 4 nov, 23:54, John M <[EMAIL PROTECTED]> wrote: > > > i have a model for status reports:http://dpaste.com/88760/ > > > The report has 1-N bullet Points, each bullet Point has a category. > > > What I want to figure out, whats my best w

Re: Sort querysets by their data attribute values

2008-11-06 Thread John M
I had a similar need based on a calculated column, you'll have to turn it into a list (i.e. mylist = list(queryset) ) and then sort from there. You can still pass the list to a template a loop through it just like a regular queryset, since the objects in the list are just python objects. J On N

Getting non-related records

2008-11-06 Thread John M
i have a model at http://dpaste.com/88760/ for a particular Report (r), I'd like to get all categories that aren't in it's bulletpoints. For example, If there are four categories: one, two, three, four. there is a report with bullet points for one and two, how can I get a list of three and four.

Re: Getting non-related records

2008-11-06 Thread John M
WOW, I knew it would be easy, but that is ridiculous. Thanks Alex! John On Nov 6, 3:00 pm, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > Hi, John > > Try this: > > Category.objects.exclude(bulletpoint__report=r) > > On Fri, Nov 7, 2008 at 01:54, John M <

Re: Can I use more than one database handle with Django?

2008-11-06 Thread John M
Do you want to use more than one Database? Then NO, it's not available directly right now, that's supposed to be an upcoming feature. J On Nov 6, 4:28 pm, turbogears <[EMAIL PROTECTED]> wrote: > Hi, > Can I use more than one database handle with Django? > and how can I do it? > excuse my englis

Using just one custom manager

2008-11-07 Thread John M
I wanted to get some feedback on how I'm using custom model managers. I've put all my queries into one manager, each in a different method. Is this the right way to go? So for example: CHOICES_TASK = ( ("NO", "None"), ("GR", "Green"),

Re: Using just one custom manager

2008-11-07 Thread John M
Dave, Thanks for the quick reply, yea, I figured out what I needed to do, which turns out just what you said. I will change to the pythonic way of doing things, thanks. John On Nov 7, 11:47 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 7, 7:13 pm, John M <[EMAIL PROTE

Re: Using just one custom manager

2008-11-07 Thread John M
Any ideas? Thanks John On Nov 7, 11:47 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 7, 7:13 pm, John M <[EMAIL PROTECTED]> wrote: > > > > > I wanted to get some feedback on how I'm using custom model managers. > > > I've put all my querie

Model manager not working with related sets of records.

2008-11-10 Thread John M
I have the following model (http://dpaste.com/89869/). The model is for a status report application I'm trying to create at work (so I don't have to do powerpoints). So each report, has several tasks / milestones associated with it. My problem is when I use a related set, the custom manager met

Templates - testing multiple things on IF line

2008-11-13 Thread John M
Does the IF tag allow for OR's or AND's? Thanks John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this

Re: Read/Create Excel xls files using django

2008-11-13 Thread m h
On Thu, Nov 13, 2008 at 2:35 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > > Kurczak wrote: >> On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: >> snip snip > Do you *really* have to create an xls file? If your users just want to > get the data into Excel then creating a csv file is a much easier

Re: Read/Create Excel xls files using django

2008-11-13 Thread m h
On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase <[EMAIL PROTECTED]> wrote: > >> I am trying to detemine if there is a way to read the data from an >> Excel xls file into django. I also need to create an xls file. Does >> anyone know how that would be done ? > > In addition to the other suggestions on t

Re: Read/Create Excel xls files using django

2008-11-13 Thread m h
On Thu, Nov 13, 2008 at 5:21 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > > m h wrote: >> On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase >> <[EMAIL PROTECTED]> wrote: >> >>>> I am trying to detemine if there is a way to read the data from an >>&

Re: polls tutorial question

2008-11-14 Thread John M
What you see is what you get when it comes to templates in the Tutorial. There is no default CSS or anything like that. If you'd like to do CSS from a media file, you'll have to check the docs on serving static files via the builtin server. J On Nov 14, 12:19 pm, prem1er <[EMAIL PROTECTED]> wr

Re: Cron job help..

2008-11-14 Thread m h
Try telling crontab to execute your script with python ;) Or put #!/usr/bin/env python on the first line and chmod appropriately -cheers matt On Sat, Nov 15, 2008 at 12:41 AM, laspal <[EMAIL PROTECTED]> wrote: > > Ok I got the point but I run into some other problem. > > when I run python /home/

What happened to Documentation layout on djangoproject.com?

2008-11-18 Thread John M
I just noticed that the documentation layout change (for the better). Did I miss an announcement. Either way, I love it. John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: What happened to Documentation layout on djangoproject.com?

2008-11-18 Thread John M
Karen, As always, you're the best, thanks. John On Nov 18, 11:33 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 18, 2008 at 2:23 PM, John M <[EMAIL PROTECTED]> wrote: > > > I just noticed that the documentation layout change (for the

Bug? Related manager not working for custom manager?

2008-11-19 Thread John M
I have a model with a custom model manager used for related set filtering, but it's not working as expected. See my models and test at http://dpaste.com/92327/ Can someone explain why my manager isn't doing what I think it should? Thanks John --~--~-~--~~~---~--~---

Re: Using generic view to insert a simple model in the DB

2008-11-20 Thread John M
django writes about 90% of the form part for you. This was also an area for me (being new to HTML apps) that was confusing. You have two choices, you can use the {{form}} object in your html, or you can setup each field from the form individually. (http://docs.djangoproject.com/en/dev/ref/generi

Re: Bug? Related manager not working for custom manager?

2008-11-20 Thread John M
with the fact it's a related manager, cause working with the records as Tasks directly, doesn't seem to have the problem. Thanks again John On Nov 19, 11:52 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-11-19 at 18:21 -0800, John M wrote: > > I have

Re: Bug? Related manager not working for custom manager?

2008-11-20 Thread John M
erent about the SQL. Perhaps some kind of caching is going on > where the manager is caching the results of it's queries? > > On Thu, Nov 20, 2008 at 11:21 AM, John M <[EMAIL PROTECTED]> wrote: > > > I have a model with a custom model manager used for related set > &

Re: Using just one custom manager

2008-11-21 Thread John M
Spoksss, I brought this up as a BUG? subject and got some traction from Malcom. Malcom opened a tracking ticket to get it fixed. I was able to work around it by sending some querysets to my view before, instead of using the related sets in the view. If you'd like to see my work around, please

Re: order_by function

2008-11-21 Thread John M
I wanted the same thing long ago, you have a couple of choices: 1. Use custom SQL functions (but kinda locks u in), 2. Use the python sort function. This basically takes ur queryset, turns it into a list and then sorts it. Since all querysets are just lists in python you can do this: orderedlis

Re: Adding delete button to a form.

2008-11-26 Thread John M
Dominic, Welcome to the django forum :) and welcome to django > Which I've tested and seems to be working ok. (The documentation, by > the way, didn't mention anything about requiring > foo_confirm_delete.html but I guess that's not too hard to figure out > from the error message) Actually, a

admin css, is this still supported?

2008-12-02 Thread John M
I've searched for the admin CSS guide, and found it deprecated (http:// docs.djangoproject.com/en/dev/obsolete/admin-css/?from=olddocs), is there a replacement? Thanks, John M --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: admin css, is this still supported?

2008-12-03 Thread John M
Thanks Malcom, I'll do what I can On Dec 2, 8:05 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-12-02 at 08:21 -0800, John M wrote: > > I've searched for theadminCSSguide, and found it deprecated (http:// > > docs.djangoproject.com/en/dev/obsole

VPS Hosting - Webkeepers

2008-12-04 Thread John M
Anyone tried this for django? http://www.webkeepers.com/index.html entry level is 6.95/mo, great for QA site I would think. Just curious Thanks John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Form stays invalid even after required field has been set

2008-12-10 Thread John M
I had this same issue, and it turned out i was not showing a necessary field. My advice, try to recreate from the command line with the basic form object and see what it says is missing. Good Luck, John On Dec 10, 7:26 am, Berco Beute <[EMAIL PROTECTED]> wrote: > Here's the code: > > http://dp

django Tutorial for NFA has bugs

2008-07-20 Thread John M
Given that the group has figured out that you need to run autodiscover() and register any models you want to show in NFA Admin page, I wanted to point out that the tutorial has the same bug, somewhere in Tutorial 2, it tells you to un-comment the # for admin access, which DOES NOT show anything in

Re: django Tutorial for NFA has bugs

2008-07-21 Thread John M
This has been fixed in the latest SVN release. J On Jul 20, 8:42 pm, John M <[EMAIL PROTECTED]> wrote: > Ticket 7861 created for this. > > John > > On Jul 20, 1:25 pm, "Chris H." <[EMAIL PROTECTED]> wrote: > > > On Jul 20, 3:21 pm, John M <[EMAI

Re: status of unicode support in 0.96?

2008-07-21 Thread John M
Any reason why you wouldn't just use the SVN version, given we're so close to 1.0? Also, not sure if they will update .96 anymore other than security fixes. It's very behind in features compared to SVN version. JOhn On Jul 21, 11:09 am, "Andrew D. Ball" <[EMAIL PROTECTED]> wrote: > Greetings.

Re: django Tutorial for NFA has bugs

2008-07-21 Thread John M
Ticket 7861 created for this. John On Jul 20, 1:25 pm, "Chris H." <[EMAIL PROTECTED]> wrote: > On Jul 20, 3:21 pm, John M <[EMAIL PROTECTED]> wrote: > > > Given that the group has figured out that you need to run > > autodiscover() and register any model

Re: Changing the returned query set in the admin interface 'add' section depending on user permissions.

2008-08-19 Thread John M
I suspect you'll have to intercept one of the many signals django has in it's architecture. Sorry, not sure where to point you other than that. John On Aug 19, 4:19 am, chewynougat <[EMAIL PROTECTED]> wrote: > Hi, > > I have an admin add form that allows users to insert documents. I have > a se

Re: Boosting your productivity when debugging Django apps

2008-08-22 Thread John M
I tried eclipse with pyDev installed and it allows a pretty neat Visual Studio et al look and feel to it. John On Aug 22, 11:20 am, Delta20 <[EMAIL PROTECTED]> wrote: > This question is aimed at those of you who, like me, come from a Java > and C++ background and are used to being able to debug

Re: Custom manager for many-to-many traversal

2008-08-25 Thread John M
Since my_book.auther_set.all() returns a QS, can't you just say something like ...all().filter(author__isalive=True) or something like that? I've never tried, but I thought that django would figure it out? J On Aug 25, 12:11 am, MrJogo <[EMAIL PROTECTED]> wrote: > How do I create a custom manag

Re: exporting apps and db from windows to ubuntu.

2008-08-25 Thread John M
from the command line / console / whatever... ./manage.py dumpdata http://www.djangoproject.com/documentation/django-admin/#dumpdata-appname-appname On Aug 25, 3:25 pm, KillaBee <[EMAIL PROTECTED]> wrote: > ok it is dumpdata and loaddata, but where does it go?  I searched for > *.json but noth

Re: Test Application Fails to Appear in Admin

2008-09-01 Thread John M
I'm assuming your link meant to point to this instead http://www.djangoproject.com/documentation/tutorial02/#make-the-poll-app-modifiable-in-the-admin. did the main admin site work first, but the Poll app doesn't work? Check the group, there are lots of cases where a typo may have caused it. J

Re: getting max(field) with db-api

2008-09-02 Thread John M
i used that for mine and it always worked! Mine was for a list of child records by date, but child.objects.all()[0] always gave me the most recent object. J On Sep 2, 7:23 am, mwebs <[EMAIL PROTECTED]> wrote: > Hello, > > I want to perform a lookup an getting the object with the highest > integ

Re: 'Django in Under a Minute' screencast, requesting feedback before v1-final is ready

2008-09-04 Thread John M
I never thought I'd say this, but it's a little TOO QUICK. Maybe 3min ? It's not long enough to really get me interested, but I don't want to take too much time / detail that I start learning the product. Overall though, the quality and idea are awesome, keep it up. John On Sep 3, 2:07 pm, "I

Re: What do you use for a user manager in Django?

2008-09-05 Thread John M
I think now that the Admin refactor in 1.0 is there, you can just sub- class the user model and use admin that way, no? On Sep 5, 1:28 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > What do you use for a user manager in Django?  When I used Django it > was nice, but I couldn't find a way to use it f

Re: Will the new Django 1.0 work better with IIS?

2008-09-05 Thread John M
I wouldn't say it's built for apache, it's just that non-MS based systems don't work 'as well' as IIS native stuff (go figure). I found two quick articles about doing it: http://forums.iis.net/t/1122937.aspx http://support.microsoft.com/kb/276494 Although, I seem to remember something about a .

Determining the rank of an object with django-voting

2008-09-16 Thread M Godshall
I'm using a modified version of the django-voting app to handle the rating of objects on a site I'm working on. I'd like to figure out a way to display the rank of an object in relation to all other objects in the same model. It would seem that I would have to calculate the average rating of all

Re: keeping counts of verbs (downloads, comments, ...)

2008-09-17 Thread John M
Any reason why you wouldn't override the save() method of the model in question? When the model with the data you'd like to summarize is saved, you could recalc the data then? J On Sep 17, 4:20 am, "Bram de Jong" <[EMAIL PROTECTED]> wrote: > hello all, > > I have objects in the db which are bei

vServer Image - Has anyone tried this?

2008-09-19 Thread John M
I stumbled on this today http://es.cohesiveft.com/ I've built a django server, and am going to try tonight. Has anyone tried this yet? John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django -- very very basic query !

2008-09-21 Thread John M
I would suggest taking a couple of hours to do the tutorial, and it basically runs through most of what django can do. Since 1.0 is out, you just need to download, install and run through the tutorial. It runs on any platform. Have fun. John On Sep 21, 7:20 am, "[EMAIL PROTECTED]" <[EMAIL PRO

update or add object?

2008-09-22 Thread John M
Is there a method I can call in a view that given a key, it checks to see if that object exists and if it does returns that object, or if it doesn't, adds it to the DB and returns the new key? I could have sworn there was a shortcut for this. Thanks John --~--~-~--~~~---

Re: update or add object?

2008-09-22 Thread John M
Dang, I knew there was something there! Thanks R. Gorman :) On Sep 22, 6:10 pm, "R. Gorman" <[EMAIL PROTECTED]> wrote: > get_or_create > > http://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-cre... > > R. > > On Sep 22, 7:55 pm, John M <[E

Re: Anti-spam suggestions (strange case)

2008-09-24 Thread Dan M
> My problem is that for some reason spammers have latched onto this > form, creating a lot of grief when our circulation people are trying > to send out the requests. > > Nearly all of the spammers follow a pattern, giving random strings for > their address, city and email, like this: > City:

Need help with djangosearch app

2008-10-04 Thread M Godshall
First of all, I'm trying to find a simple search solution that will allow me to search specific fields in a model and display the results according to their relevance (I'm using mysql). After much searching it seemed like the djangosearch app would be the best solution (but I welcome other sugges

Re: Need help with djangosearch app

2008-10-04 Thread M Godshall
After a little work, I realized that it IS performing the search, but it only returns objects with fields that match EXACTLY. Is there any way to make it so it does a partial search as well? Like if a field contains part of that query, it still finds it? On Oct 4, 7:07 pm, M Godshall <[EM

Possible to sort query results by relevance?

2008-10-06 Thread M Godshall
I'm trying to find a simple search solution for django that will allow me to sort the results by relevance (in this case, I'm using MySQL). I've been told that djangosearch and django-search aren't very stable at the moment, and django-sphinx is a little too complicated for my needs right now, so

Is there anything like the RailsKits for Django?

2008-10-10 Thread Wayne M
I am currently debating between using Django or Ruby on Rails for a new SaaS web app I'm thinking of making. I've not done a subscription- based site before, so I'm looking for something that provides the basic functionality since I would probably not be able to write my own without it taking a l

Re: Is there anything like the RailsKits for Django?

2008-10-10 Thread Wayne M
e information. > > There is a Google group for satchmo users called satchmo-users. > > On Oct 10, 7:19 am, Wayne M <[EMAIL PROTECTED]> wrote: > > > I am currently debating between using Django or Ruby on Rails for a > > new SaaS web app I'm thinking of making

Keeping track of song play count in django and flash

2008-10-10 Thread M Godshall
Is anyone familiar with any techniques or tutorials that would allow me to keep track of a song's play count using django and a flash player? I realize this might be a question more directed toward flash users, but I figured I'd try here in case any django users have had experience with this. Th

File upload progress bar for Django?

2008-10-20 Thread M Godshall
I've found several file upload progress bar applications, but the source code is usually written in php (like http://www.swfupload.org/ and http://www.pixeline.be/experiments/jqUploader/). Is anyone familiar with a django or python tutorial that shows how to implement some kind of file upload pro

Re: Multithreaded development server

2009-01-24 Thread John M
Some threads on here have used CherryPy's django Plug-in and it's a full server too. You only need to account for Admin files via some well know workings. J On Jan 24, 4:08 pm, Almad wrote: > Hello, > > is there a way to run development server multithreaded, so it can > handle recurring reques

Re: django-smtpd allows you to handle email messages just like Django processes HTTP requests

2009-01-24 Thread John M
Wow, very cool. How will this integrate on a production server? is this a true Mailto: link or something else. I mean it doesn't look like a real SMTP engine. I love the idea though! J On Jan 24, 8:29 am, nside wrote: > Hello, > > I just started a new project that basically allows you to wr

new record - onetoonefield - create related record

2009-01-30 Thread John M
Given the model's below, I'm trying to make it add the related 1-1 record automatically, but it's not working, what am i missing? Thanks John class unixhost(models.Model): name = models.CharField(max_length=50) # short name fqdn = models.CharField(max

Re: new record - onetoonefield - create related record

2009-01-31 Thread John M
hanks John On Jan 30, 8:15 pm, Karen Tracey wrote: > On Fri, Jan 30, 2009 at 4:29 PM, John M wrote: > > > Given the model's below, I'm trying to make it add the related 1-1 > > record automatically, but it's not working, what am i missing? > > Perhaps

simple record output

2009-02-02 Thread John M
I'm trying to use the generic views and templates to get a very simple text output of records. I don't want HTML, but need them available from a command line (via curl). Here's my URL setup. newhosts_dict = { 'queryset' : unixhost.objects.all().filter(hostsetting__userlist = False)

Re: simple record output

2009-02-02 Thread John M
plate effect my output? Thanks On Feb 2, 12:57 pm, John M wrote: > I'm trying to use the generic views and templates to get a very simple > text output of records. > > I don't want HTML, but need them available from a command line (via > curl). > > Here's my

Re: simple record output

2009-02-02 Thread John M
p; carriage returns. > > -jake > > On Mon, Feb 2, 2009 at 3:41 PM, John M wrote: > > > Grrr, I answered my own quesiton, if I remove all the CR's from the > > template, then it's OK. > > > So changing the template to > > > {% if object_list %}{

Re: Coming Soon

2009-02-03 Thread John M
django is probably the most updated doc and program I've used. If you watch the community section for feeds of all the blogs and postings, you'll find tons of great information. This group is your second best place to be. There are tons of django sites, etc. I think if you poke around, you'll

Admin and 1-1 fields

2009-02-05 Thread John M
I tried to find this in the admin code, but was unsuccessful. If I have a model with a 1-1 relationship, and in my admin.py I specify that the 1-1 related model is in an INLINE, I notice that the admin interface is smart enough to add a new 1-1 related record when necessary. I'm wondering in the

Cherrypy and view variables caching?

2009-03-05 Thread John M
I'm having a strange problem with running django on a Cherrypy server. in my views.py, I setup a variable called oneweekago, and set it to today() - (days=7) (it's obviously a date type variable), then in my query, I ask for all records that are __LTE=oneweekago. This code works perfect the day

Re: Cherrypy and view variables caching?

2009-03-05 Thread John M
at 14:54 -0800, John M wrote: > > I'm  having a strange problem with running django on a Cherrypy > > server. > > > in my views.py, I setup a variable called oneweekago, and set it to > > today() - (days=7) (it's obviously a date type variable), then in my &g

Re: Cherrypy and view variables caching?

2009-03-05 Thread John M
7; code into views.py eitherway. J On Mar 5, 6:33 pm, Malcolm Tredinnick wrote: > On Thu, 2009-03-05 at 18:32 -0800, John M wrote: > > Malcolm, thanks for the reply and I figured that was my issue. > > > Which leads me to another question, does everyone put all view code >

manage.py dumpdata app.model doesn't seem to work?

2009-03-06 Thread John M
I tried using the command $ python manage.py dumpdata app.model. where app is the name of my application and model is one of it's models, I didn't actually use the names app and model. I get the following error: django.core.exceptions.ImproperlyConfigured: App with labelapp.model could not be

Re: Username Blacklist

2009-03-17 Thread P M
why don't you use ABSOLUTE_URL_OVERRIDES = { 'auth.user': lambda o: "/*user*/%s/" % o.username, } so username will not collide with application name !!! Greetings. Puneet On Tue, Mar 17, 2009 at 3:14 PM, Andrew Turner wrote: > > Just for the record, I have created the following class (subc

Re: File Upload : Memory consumption

2009-06-24 Thread John M
I've seen quite a few posts on this, and I think it's documented as well. As I recall, there is a certain way of doing large uploads, search the docs and the forum and I'm sure you'll find it. On Jun 24, 3:20 am, alecs wrote: > Hi! I'm trying to upload a large file (700Mb) and something wrong w

Logout in Firefox but not in IE 6!

2009-06-26 Thread Kostas M
I want to use from django.contrib.auth.views the login and logout functions. Following the manual pages, in my views.py I use this procedure: @login_required def homepage(request):... While it works fine in Firefox, and one who logouts is redirected to the login page if one tries to access di

Re: Logout in Firefox but not in IE 6!

2009-06-30 Thread Kostas M
This is what I thought too, and for this I used in all of my templates the commands: but the problem persisted. Finally, the problem was fixed, after I found out that in my development site, I had not set the site name/domain correctly from the Admin Pages. This somehow was breaking the s

Good OneToOneField design?

2009-08-14 Thread John M
Hey everyone, I'm trying to use the 1-1 fields, and love the examples and how it works, once it's created. However, I'm having trouble determining when in my code to create the actual instance of the 1-1 object. What I really want is for the save() method of the 'master' side of the model to cr

DecimalField's and lots of math

2009-08-16 Thread John M
I'm wondering how people deal with the DecimalField in django? I've just discovered the amount of typecasting I have to do to work with this field, example: field1 = models.DecimalField(...) you can't do : y = field1 / 100.0 you have to do y = field1 / Decimal(100) But then you can't do

Re: Django and IIS 7

2009-03-26 Thread P M
IronPython is not CPython , i will be amazed if these two works identically ... On Thu, Mar 26, 2009 at 2:54 PM, Adi Sieker wrote: > > Hi, > > On 26.03.2009, at 14:21, Sergey Petrov wrote: > > > > > I've blown my brains away, trying to make django work under IIS7 on > > Windows Server 2008. > >

Re: File upload: how to validate file type

2009-03-28 Thread P M
servus, there are various ways to check, but best will be to use Python-libmagic interface... it did worked well for me .. mit freundliche Grüß On Sat, Mar 28, 2009 at 10:16 PM, Torsten Bronger < bron...@physik.rwth-aachen.de> wrote: > > Hallöchen! > > I'd like to ensure that people only upload

Re: File upload: how to validate file type

2009-03-28 Thread P M
tip :) libmagic python interface also provide a option to you to feed in stream/part of chunk... so hack that simple interface and you are done ;) greetings, Puneet On Sat, Mar 28, 2009 at 10:37 PM, Torsten Bronger < bron...@physik.rwth-aachen.de> wrote: > > Hallöchen! > > P M w

How to detect changes in ManyToManyField

2009-04-10 Thread M Godshall
When working with foreign keys, it's really easy to detect changes in the field by writing a custom save method. It would look something like this: def save(self, force_insert=False, force_update=False): old_user = None if Project.objects.filter(id__exact=self.id).count(): #the p

Object filtering with a GenericForeignKey field

2009-04-10 Thread M Godshall
I have two models, Comment and Project. Comments are connected to a Project through a GenericForeignKey, and each Project is assigned to a particular user. I'd like to retrieve the latest comments for all the projects that a particular user is assigned to, but according to the Django documentati

Re: how to use several different querysets in one single template(for a single url)?

2009-04-13 Thread John M
You might want to think about using the direct_to_template function instead, it uses the Request Context values, which allows you to take advantage of the login system, where as the render_to_response does not (by default). J On Apr 13, 7:16 pm, jason wrote: > using the common view function(ren

Re: Leopard deploy directory?

2009-04-13 Thread John M
/opt is the typical linux location, my mac has a few things there now. J On Apr 13, 4:12 pm, Shannon wrote: > Hi -- I am working on a django-powered site on Leopard server.  Where > is the recommended/conventional deployment directory?  Every example I > see uses a particular user's home direct

Re: FT Django/Python developer position

2009-04-21 Thread John M
you should also post this on www.djangogigs.com On Apr 21, 7:39 am, HPL wrote: > World renowned company located in the heart of Washington, DC is > looking to hire a Python/Django developer to work on website developed > on Python-based Django  web application framework, Linux environment. > D

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread John M
is it empty like " " or is it null? customer.objects.filter(serial__isnull=True) HTH On Apr 28, 9:16 am, equalium wrote: > Hello, I'm new to django. I want to retrieve a record of Customers > with an empty serial field. --~--~-~--~~~---~--~~ You received this m

Re: Help with schema

2009-05-06 Thread John M
In addition to Malcolms comments, you'll need a way to track if the agent was fired or not, you could do this in several ways: 1. a date fired field (you may want a date hired), a fired boolean field, or a more complicated way, an archive type setup that moves the fired agents to another table (th

Re: disable django cache

2009-05-14 Thread John M
Are you sure it isn't your browser? have you tried testing your concern with curl? On May 14, 12:19 pm, online wrote: > Hi all, > > I have a small project still under development. I don't set any cache > stuff yet. But for somehow django still cache all web pages. > > Why django default uses ca

Decimal format fields in Admin

2009-05-21 Thread Kostas M
I have a model/table with a field declaration: money=models.DecimalField(max_digits=12, decimal_places=2,verbose_name=u'π/υ'). When I see this field in the Admin pages, this field is just a box, without any formatting, e.g. thousand separation marks, which is important for the visibility of the

Decimal format fields in Admin

2009-05-21 Thread Kostas M
I have a model/table including a field declaration: money=models.DecimalField(max_digits=12, decimal_places=2,verbose_name=u'π/υ'). When I see this field in the Admin pages, this field is just a box, without any formatting, e.g. thousand separation marks, which is important for the visibility o

Decimal format fields in Admin

2009-05-21 Thread Kostas M
I have a model/table including a field declaration: money=models.DecimalField(max_digits=12, decimal_places=2,verbose_name=u'π/υ'). When I see this field in the Admin pages, this field is just a box, without any formatting, e.g. thousand separation marks, which is important for the visibility of

Shared connection stuff?

2009-05-22 Thread m...@nysv.org
Hi! I'm using python-processing to run things in parallell based on data in a Django-powered database. I'm also seeing all sorts of funky tracebacks: Traceback (most recent call last): File "utils/X.py", line X, in XX XX = X(, X=X, =) File "XX"

  1   2   3   4   5   6   7   8   9   >