Re: Need to trigger action on 4th Saturday of the month

2023-07-25 Thread Ross Meredith
No need to involve anything asynchronous, if I understand you correctly. Just check when the request is made whether it's the right time. If so process the registration, otherwise show the other page to indicate it's the wrong time. Ross On Tue, Jul 25, 2023 at 7:13 PM M Cain wrote: > U

Re: Combining two subquery counts using ORM

2022-11-09 Thread Ross Meredith
Last time I checked you can't use subquery inside the FROM clause. If you can please let me know how because I had this a while back and got stuck. I ended up using a package called django-cte. On Wed, Nov 9, 2022 at 9:01 PM Matthew Hegarty wrote: > Thanks > > I made some progress, and this

Re: Delivery Status Notification (Failure)

2022-09-17 Thread Ross Meredith
This is the wrong approach. You should use a model form. On Sat, Sep 17, 2022 at 8:54 PM Nishant Sagar wrote: > > Hey folks, > While saving the values to the data to the database I'm getting this Field > 'roof_age' expected a number but got ('1',) > > How can I resolve this? > Here is my

Re: Potential admin bug

2022-08-03 Thread Ross Meredith
It's more likely a set up problem than a bug I'd have thought. If it helps here is the relevant code - https://github.com/django/django/blob/main/django/contrib/admin/options.py#L132 . def response_add is the method which determines what the response to use after a successful addition. On Wed,

Re: Pass or refer parent query value into subquery

2022-07-26 Thread Ross Meredith
Sorry I haven't used the JSONField myself before. On Tue, Jul 26, 2022 at 5:01 PM Sencer Hamarat wrote: > Thanks Ross, > Very appreciated. > That's what I need. > > I'm also having a problem with this query after I implemented the solution: > > I believe, > Q(bundle__co

Re: Blog application with django

2022-07-26 Thread Ross Meredith
to build a blog. On Tue, Jul 26, 2022 at 4:42 PM MAHESH KUMAR wrote: > click above link in mail i want that type of Blog application > > > On Tue, Jul 26, 2022 at 9:04 PM Ross Meredith > wrote: > >> Sorry it's not clear what you are asking. >> >> On Tue,

Re: Blog application with django

2022-07-26 Thread Ross Meredith
Sorry it's not clear what you are asking. On Tue, Jul 26, 2022 at 4:33 PM MAHESH KUMAR wrote: > Hi all > > https://www.health.harvard.edu/mind-and-mood/relaxation-techniques-breath-control-helps-quell-errant-stress-response > > I want this type blog application please help me anybody coding

Re: Pass or refer parent query value into subquery

2022-07-26 Thread Ross Meredith
https://docs.djangoproject.com/en/4.0/ref/models/expressions/#django.db.models.OuterRef On Tue, Jul 26, 2022 at 4:27 PM Sencer Hamarat wrote: > Hi, > > I need to pass the parent query book_id value into the subquery. > Here is the model and the current state of the query I reached. > > class

Unable to log in the user using django channels because "connection is already closed"

2021-09-04 Thread Ross Meredith
or me when I try). This is the full traceback - Traceback (most recent call last): File "/home/ross/.local/share/virtualenvs/chat-A0fEktPe/lib/python3.8/site-packages/promise/promise.py", line 489, in _resolve_from_executor executor(resolve, reject) File "/home/ross/.loc

Re: GeoDjango with SpatialLite on Windows 10

2021-08-12 Thread Michael Ross
> Thank you[image: error.png] Maybe this helps: https://stackoverflow.com/questions/53682315/error-on-libcurl-dll-when-using-gdal-of-osgeo4w-in-django TLDR: IntelliJ loads wrong sqlite3.dll? -- Michael Ross -- You received this message because you are subscribed to the Google Groups "Django

Re: how does Django handle outbound requests?

2021-06-27 Thread Michael Ross
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/20152777-2847-4b94-974c-27be70ee04can%40googlegroups.com. -- Michael Ross -- You received this message because you are su

Trying to understand duplicate results from related_set

2021-03-31 Thread Michael Ross
esults, get_medium(0), get_medium(1) == 9, 13 but if I don't, I get a duplicate row? get_medium(0), get_medium(1) == 9, 9 -Michael -- Michael Ross -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from thi

Re: multiplying two fields

2021-01-29 Thread Ross Meredith
com> wrote: > tanks Ross, i fixed my error but now only show me this > > >>> data = Articles.objects.all().annotate(F=('cost_buy') * > F('quantity')).output_field=FloatField('result') > >>> print(data) > > >>> > > what do you think

Re: multiplying two fields

2021-01-29 Thread Ross Meredith
Apologies, typo myself! That meant to say "typo" not "type". On Fri, Jan 29, 2021 at 9:52 PM Ross Meredith wrote: > > data = Articles.objects.all().annotate(result=F('coust_buy') * > F('quantity')).output_field=FloatField('result'), > > contains a

Re: multiplying two fields

2021-01-29 Thread Ross Meredith
data = Articles.objects.all().annotate(result=F('coust_buy') * F('quantity')).output_field=FloatField('result'), contains a type for the field "cost_buy" (i.e. not "coust_by"). If that isn't it please give us the traceback. On Fri, Jan 29, 2021 at 8:50 PM jose angel encinas ramos <

Django Accountancy Desktop App Inspired By Xero

2021-01-23 Thread Ross Meredith
Hi guys, I have just finished my first ever full stack web app, which is built with django of course. It is an open source accountancy app based partly on Xero, one of the leading products in the market, but with some differences. It is by no means a complete accountancy system but I hope it

Configuring a StaticLiveTestCase Server In A Docker Container

2019-12-23 Thread 'Ross' via Django users
Hi, I am able to spawn a separate live development server process for a selenium test which inherits from LiveServerTestCase with the following - #globals HTTP = "http://"# ip address of host machine on the default docker network LOCALHOST = settings.HOST_LOCALHOST# port number on host the

Re: Custom Template Tags Render Method

2019-11-24 Thread 'Ross' via Django users
I meant to write "indeed this section of the same article seems to support this - https://docs.djangoproject.com/en/2.2/howto/custom-template-tags/#auto-escaping-considerations " On Sunday, November 24, 2019 at 6:43:44 PM UTC, Ross wrote: > > To create our own custom templ

Custom Template Tags Render Method

2019-11-24 Thread 'Ross' via Django users
To create our own custom template tags we have to define a Node subclass which implements a render method. Example from https://docs.djangoproject.com/en/2.2/howto/custom-template-tags/#auto-escaping-considerations import datetimefrom django import template class

Re: [ANN] Django 1.4.2 and 1.3.4 remedy security issues

2012-10-17 Thread Ross Poulton
Django==1.3.4 doesn't appear to be on Pypi, is it likely to be there soon? On Thursday, 18 October 2012 09:38:49 UTC+11, James Bennett wrote: > > Django 1.4.2 and 1.3.4 have just been released in response to a > security issue reported to us. > > Details are here: > >

Django Generic Class Based Views - Change Content-Type

2012-05-30 Thread Ross C
class based view. Anyone point me in the right direction or know the answer outright? all the best Ross -- 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/dj

Re: Django Deployment Statistics (via djangosites.org)

2011-01-24 Thread Ross Poulton
That was added a few months (or more?) back after some users emailed me asking me to add "wsgi" to the list. Admittedly in hindsight it's a little vague and has probably ended up being a catch-all for "wsgi: other". -- You received this message because you are subscribed to the Google Groups

Re: Django Deployment Statistics (via djangosites.org)

2011-01-24 Thread Ross Poulton
alinks/id attributes to the elements > please? Great idea! You can now visit eg http://www.djangosites.org/stats/#serving-method if you want to deep-link to a particular chart. Thanks for the comments all! Warm Regards, Ross -- You received this message because you are subscribed to

Django Deployment Statistics (via djangosites.org)

2011-01-22 Thread Ross Poulton
these statistics are useful for you. Feedback is welcome via email (r...@rossp.org) or Twitter (@RossPoulton). I would love to hear what you have to say! Cheers, Ross -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: URL grows in address bar with each click

2010-11-19 Thread Ross
Aha! Thanks Shawn. I'd left a forgotten "http://localhost:8000/ moreInfo" in there. I was so hung up on Django urls.py I forgot about simple html mistakes and leftovers. Thanks for the pointer! -Ross. On Nov 19, 10:16 am, Shawn Milochik <sh...@milochik.com> wrote: > Wh

URL grows in address bar with each click

2010-11-19 Thread Ross
Similarly other urls get appended occasionally in other situations. My searching isn't turning anything up about appended URLs or growing URLs. Does someone know what causes this and how I can just make it stop growing? Regards, Ross. -- You received this message because you are subscribed to

Re: Halting large form-based file uploads

2010-10-14 Thread Ross
docs/1.3/mod/core.html#limitrequestbody). Okay - yes, I'm using apache, so I'll read up on that. Thx for the pointer... > > hth, > Jonathan -Ross. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Halting large form-based file uploads

2010-10-13 Thread Ross
called, I assume it would tie up my service and eat up a pile of disk space as it goes past the 2.5M memory limit. I hope there is some way to avoid such a denial of service attack. Thanks, Ross. -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Generate a daily serial/batch/lot number

2010-10-07 Thread Darryl Ross
On 06/09/10 19:09, kmpm wrote: Regarding UUIDs, one of the business requirements (which I don't control) is that the identifier that is to be used on barcodes and what not is to be in the format "YYMMDD" where is the number we are talking about. So UUID would be great and unique, as

Spammer named 'Ashley J. Sands' who harvested everyone's email from djangopeople.net

2010-05-15 Thread David Ross @ Wolfeon
Disregard the email coming from the individual and I don't recommend doing business with such a leech. This guy wrote a program to harvest emails and mass spam using Google Gmail, the access method of SMTP. How I know the guy is a leech: 1) There's no User-Agent header 2) He negligently used the

Re: Django App and Memory Mgmt

2010-05-10 Thread Ross
On May 6, 7:04 pm, Graham Dumpleton <graham.dumple...@gmail.com> wrote: > On May 7, 4:40 am,Ross<scrodch...@yahoo.ca> wrote: > > > I have a Django app that selects one of many possible XML documents, > > parses it with minidom.parse(), finds

Re: Django App and Memory Mgmt

2010-05-10 Thread Ross
Thanks for that Bill. I was wondering if that was the case, as my SAX knowledge is purely anecdotal and I haven't played with it. Thanks for the summary. I'll read up on that... Ross. On May 6, 4:41 pm, Bill Freeman <ke1g...@gmail.com> wrote: > You may want to consider using a

Re: Django App and Memory Mgmt

2010-05-06 Thread Ross
that's a messy link :) On May 6, 3:14 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote: > On Thu, May 6, 2010 at 1:40 PM, Ross <scrodch...@yahoo.ca> wrote: > > Your thoughts appreciated. Is there a better way?  I wouldn't want to > > stuff the XML-file resid

Django App and Memory Mgmt

2010-05-06 Thread Ross
and disappearing and it would become a huge background activity for another program. Ross. -- 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,

Re: Scammer / Job fraud rehash - Do NOT perform any business with Eike Post

2010-01-24 Thread David Ross @ Wolfeon
- I don't solicit Django on my website nor have I ever. - I don't give out this email address to people who I perform work - I give my fur name to people, not this one. - This email address is only for contact for automation with websites - Everything else is spam - I've only emailed the django

Scammer / Job fraud rehash - Do NOT perform any business with Eike Post

2009-12-11 Thread David Ross @ Wolfeon
w the person and are near them to ask why they're taking so long to complete the project. Sincerely, David Ross wolfe on Freenode -- 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...@googlegr

Re: django generic views w multiple models

2009-11-09 Thread Ross
and write my own view? On Nov 8, 5:56 pm, Ross <ross.j...@gmail.com> wrote: > 'm new to Django and programming in general. I'm trying to make a > simple site that allows players of a sport sign up for leagues that > have been created by the admin. In my models.py, I created two

django generic views w multiple models

2009-11-08 Thread Ross
'm new to Django and programming in general. I'm trying to make a simple site that allows players of a sport sign up for leagues that have been created by the admin. In my models.py, I created two models: `from django.db import models from django.forms import ModelForm class

Re: forms vs modelforms

2009-11-03 Thread Ross
(in other words, should League and Info be seperate tables or one big table?) or is the problem with how I set up my urls? On Oct 31, 6:45 pm, Mike Ramirez <gufym...@gmail.com> wrote: > On Saturday 31 October 2009 15:34:07 Ross wrote: > > > I'm new to Django and web programming

forms vs modelforms

2009-10-31 Thread Ross
I'm new to Django and web programming in general and I'm trying to write a simple page that will allow users to sign up for different leagues. The sign up form will have multiple fields (name, phone, address, etc). I've read over the forms documentation and the modelforms documentation, but I'm

generic views vs writing my own

2009-10-29 Thread Ross
For which cases would a user wish to write their own views rather than using generic views? I'm new to Django and would like to build a page that prompts the user to enter information into a form to sign up for a league. Upon submitting the form, they can see the updated league roster. I'm

poll question

2009-10-28 Thread Ross
I've gone through and successfully made the poll application and I've begun to play around and tried to change a few things. The first thing I would like to do is have the poll such that the index view still displays the name of all the different polls, but the detail view displays a field where

generic views 404 error

2009-10-25 Thread Ross
I just neared the end of the poll application and converted everything to generic views according to the tutorial. Once I started up the server though, I could only find my admin page. I tried using the newly named urls but I keep getting Page not Found 404 errors. Same thing happens when I type

Re: decoupled url confs- can't reach admin page now

2009-10-04 Thread Ross
views for everything that the urlconf references? Because I'm struggling to find an error in any of my syntax in the urlconfs. On Oct 4, 8:51 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Sun, Oct 4, 2009 at 3:39 PM, Ross <ross.j...@gmail.com> wrote: > > > I was go

decoupled url confs- can't reach admin page now

2009-10-04 Thread Ross
I was going through the tutorial and following directions (I think) when it instructed me to decouple the url confs near the end of part 3 of the Django Tutorial. After I did this, I was no longer able to reach the admin page. Now, whenever I try to reach the admin, I get this error message:

SPAM/FRAUD WARNING: Do NOT open the email with subject "Django enquiry"

2009-08-10 Thread David Ross @ Wolfeon
I received an email a few minutes ago with the subject "Django enquiry." My email address in relation to django was phished from djangopeople or the mailing list. There is a 1x1 image contained in the email which is possibly used for verifying addresses. Don't take the spam seriously, the

Re: python 2.5 --> 2.3, now imagefield error

2009-07-27 Thread Darryl Ross
Cody Django wrote: > ImageFields worked just fine until I moved to a new server. Now I get > error messages "Upload a valid image". I know the images are fine, > the media root and www_url are correct, so what else could this be? > Ideas are greatly appreciated! Do you have PIL installed on the

Re: What do you think about here lambda function to configure TEMPLATE_DIRS with relatives values ?

2009-06-30 Thread Darryl Ross
Hi Stephane, I think it is a great idea. The lambda trick means I don't have to make any changes at all to switch between my development environment and production. A real life example from a current project: - from os.path import abspath, dirname, join APP_PATH = lambda *x:

django-cloudfiles

2009-06-24 Thread Ross Dakin
, hows about voting for it? http://bit.ly/ORf2q Cheers, Ross --~--~-~--~~~---~--~~ 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 unsubs

decoupling urlconfs

2009-06-04 Thread Ross
I've been working my way through the Django tutorial and everything has gone fine until I came across the part near the end of section 3 about decoupling the urlconfs. I did as follows: I copied urls.py into my polls directory (C:\mysite\polls\urls.py). It now looks like this: from

Re: Ignoring Definite/Indefinite Articles when Sorting

2009-05-21 Thread Darryl Ross
On 22/05/2009 12:12 PM, Sam Chuparkoff wrote: > On May 21, 10:10 pm, Darryl Ross<dar...@afoyi.com> wrote: >> I have searched around but not really found an answer to this. For a >> project I am working on the customer wants a list of publications to be >> sorted a

Re: Ignoring Definite/Indefinite Articles when Sorting

2009-05-21 Thread Darryl Ross
Forgot one thing, this is on Django 1.0.2. Regards Darryl On 22/05/2009 11:40 AM, Darryl Ross wrote: > Hi All, > > I have searched around but not really found an answer to this. For a > project I am working on the customer wants a list of publications to be > sorted

Ignoring Definite/Indefinite Articles when Sorting

2009-05-21 Thread Darryl Ross
s a method of doing it for MySQL: http://expressionengine.com/wiki/Sort_Entries_by_Title_Ignoring_The_A_An/ -- Darryl Ross, VK5LBJ AFOYI, Information Technology Solutions e: dar...@afoyi.com p: +61 8 7127 1831 f: +61 8 8425 9607 --~--~-~--~~~---~--~~ You received th

Re: ..... in templates

2009-04-20 Thread Darryl Ross
On 17/04/2009 11:26 PM, Christian Berg wrote: > Sorry if this sounds harsh, but it is useless to learn how to drive a > Truck, if you can't drive an car. Slightly tangential, but not true! My Grandfather learned to drive a truck in the army before learning to drive a car and failed his civilian

Re: how to organize favorites in template?

2009-04-20 Thread Darryl Ross
video in video_list %} {% if video.key in favorites.keys %} ... offer to remove {% endif %} {% endfor %} Regards Darryl -- Darryl Ross AFOYI, Information Technology Solutions e: dar...@afoyi.com p: +61 8 7127 1831 f: +61 8 8425 9607 --~--~-~--~~~---~--~~ You re

Re: Django Deployment Methods: Survey (via DjangoSites)

2009-04-09 Thread Ross Poulton
if one has issues I'd assume the rest would be on shaky ground too. Cheers, Ross --~--~-~--~~~---~--~~ 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@googl

Re: Django Deployment Methods: Survey (via DjangoSites)

2009-04-09 Thread Ross Poulton
angosites.org/ ? Sorry you've having problems - if you can provide any more information I'll see to it that it gets fixed up. Cheers, Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django Deployment Methods: Survey (via DjangoSites)

2009-04-08 Thread Ross Poulton
you. Alternatively, you could convert it to Django again ;) Ross --~--~-~--~~~---~--~~ 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

Django Deployment Methods: Survey (via DjangoSites)

2009-04-07 Thread Ross Poulton
There are quite a few different ways to deploy Django applications so that the big wide world can see them. I'm on a mission to find out which methods are most popular, which web servers people are using, and what RDBMS is storing the data of Djangonauts world-wide. Last night I put some changes

Re: Best Convension for dealing with variables needed in every view.

2009-04-05 Thread Darryl Ross
Catching up on my mailing list folders. On 30/03/2009 10:10 AM, IanR wrote: > So if I created my own I could just add it to this list and it would > do what I need. Once my context_processor is made how would I add it > to this list? Something like >

Re: Determining server identity from views.py?

2009-03-31 Thread Ross
So I could test for the existence of underscore in the meta tags I guess. But perhaps using an enviro variable is a more elegant approach. Thx for the info... Ross. On Mar 31, 3:31 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, Mar 31, 2009 at 3:29 PM, Ros

Determining server identity from views.py?

2009-03-31 Thread Ross
Is there a means by which I can programmatically tell whether I'm running behind apache + mod_python or the django dev server? I want to do something along the lines of if dev_server: do this elif apache_mod_python: do this Thanks for any hints... Ross

Re: Can I alter a JS file with Django

2009-03-27 Thread Ross
Excellent - that gives me new enthusiasm to keep trying. Thanks for the link too. I'll play around with mime-types to see if I can get it to work! Ross. On Mar 27, 4:07 pm, Andy Mckay <a...@clearwind.ca> wrote: > On 27-Mar-09, at 11:44 AM, Ross wrote: > > > > > >

Re: mod_python and Dev server compatible coding

2009-03-24 Thread Ross
that clarifies how to use SCRIPT_NAME properly - I guess that's really what my whole question was. Any suggestions where to find examples for that? Ross. On Mar 23, 9:03 pm, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: ...snip... > > If the dev server doesn't meet your n

mod_python and Dev server compatible coding

2009-03-23 Thread Ross
ppreciated.. -Ross --~--~-~--~~~---~--~~ 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 d

auth.views.logout has pointless code

2009-03-21 Thread Ross Dakin
ion has been cleared. return HttpResponseRedirect(next_page or request.path) Am I missing something? Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: best way to organize models that store businesses/hours?

2009-03-17 Thread Darryl Ross
Alex Gaynor wrote: > I guess technically you could just have 14 fields on the mode(open and > close for each day of the week), which is fine since days of the week > are a static number of things but that felt bulky to me(though it's > probably more preformant). The first issue that comes to mind

Re: How to create new User with Profile in elegant way

2009-03-10 Thread Ross Dakin
rom .models import UserProfile def create_profile(sender, **kwargs): UserProfile(user=kwargs['user']).save() user_activated.connect(create_profile) You could perhaps hook into user_registered instead, if errors pop up between the time that a user regis

Re: Aggregating Ignores Slicing?

2009-03-03 Thread Ross
; > > > select sum(price) from (select price from product order by price desc > > > limit 100) as q; > > > > (That's postgres; your DB may vary.) > > > > I could be completely off-base here, as I haven't delved very far into > > > the aggregate c

Re: Aggregating Ignores Slicing?

2009-03-03 Thread Ross
d. On Mar 3, 10:08 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, Mar 3, 2009 at 8:55 AM, Ross <real...@gmail.com> wrote: > > > I have started using aggregation, but it seems to ignore any slicing I > > do on a QuerySet before calling aggregate. This is what I

Aggregating Ignores Slicing?

2009-03-03 Thread Ross
I have started using aggregation, but it seems to ignore any slicing I do on a QuerySet before calling aggregate. This is what I'm doing: Product.objects.order_by("-price")[:100].values("price").aggregate(Max ("price"), Min("price")) I want the maximum and minimum price for the products with

Prepopulate username in login form

2009-02-24 Thread Ross Dakin
Would anyone else be interested in this? http://dpaste.com/hold/1272/ Ross --~--~-~--~~~---~--~~ 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@google

Re: PREPEND_WWW

2008-12-15 Thread Ross
@jmat I have never tried Django's PREPEND_WWW, but it can easily be handled by Apache. Some of the features involving URLs, paths, etc. are possibly better left to Apache. Apache has a rewrite guide that has all the information you should need. I found a good link a while ago with exactly what

Re: Passing values to template

2008-11-18 Thread Ross Dakin
> Others already gave you practical answers, so this will be mostly a > more general ('conceptual' ?) advice: don't mix heterogenous data > (objects, whatever) in a list. If you have a compelling reason (ie : > ordering) to have heterogenous data, wrap them all in a same 'meta' > data structure.

generic create_object field for related 'parent' object

2008-11-09 Thread Darryl Ross
Hi All, In my application I have a list of students. Each of those students has a quite a few other models related to them via a foreign key. Eg: > class Student(models.Model): > name = models.CharField(max_length=64) > surname = models.CharField(max_length=64) > dob =

Re: How to setup django-apache-mod_wsgi without killing existing php site?

2008-10-31 Thread Ross Dakin
to Apache via nginx or alternative. Ross --~--~-~--~~~---~--~~ 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,

Re: Different settings.py files for server and development

2008-10-24 Thread Ross Dakin
I do it like this: # settings.py [ ... ] try: from settings_dev import * except ImportError: pass # settings_dev.py import os DEBUG = True DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'dev.db' MEDIA_ROOT = os.path.abspath('../') + '/public/media/' MEDIA_URL =

Re: Django Hosting Survey

2008-10-08 Thread Ross Dakin
files, etc.). This is actually a work in progress that seems to change every time I realize there's a better way to do something than what I'm doing. Ross --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Why does Django generate HTTP 500 errors for static media when Debug is set to False?

2008-09-24 Thread Ross Dakin
Graham, I am using Apache and mod_wsgi, and I have experienced that issue before (500 errors for 404, et al.). I fixed it with some tinkering, but don't remember how. Would you mind explaining this problem a little? Thanks, Ross On Sep 23, 5:08 pm, Graham Dumpleton <[EMAIL PROTECTED]>

Re: javascript

2008-09-19 Thread Ross
http://docs.djangoproject.com/en/dev/howto/static-files/ The Django dev server can serve static files per the link above, but be sure to let your real web server (like Apache) handle serving static files outside development. On Sep 19, 9:03 pm, yozhik <[EMAIL PROTECTED]> wrote: > Hi all, > >

Re: IE Hell. Blank Page

2008-09-19 Thread Ross Dakin
On a related note, IE also chokes on trailing commas in arrays and such, e.g.: foo = [1, 2, 3,] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: invalid literal for int() with base 10 trying to access uploaded image

2008-09-18 Thread Ross
The error looks like you are passing '1/photos/desktop.png' to int(), which converts a string to an integer. How are you creating the link to the picture? Your urls.py could be capturing that entire string and passing it as a parameter that you are trying to cast to an integer. A bigger stack

Re: Chaining custom filter methods

2008-09-17 Thread Ross
I am going to try to connect my Django app to several different databases, so I found this discussion talking about it: http://groups.google.com/group/django-developers/browse_thread/thread/9f0353fe0682b73 The very first post mentions how to define a custom get_query_set function, though it is

Re: Inconsistent urlresolver errors

2008-09-15 Thread Ross
Can you paste the urls.py from your project as well as the one from the app you are having problems with? On Sep 15, 11:00 pm, catsclaw <[EMAIL PROTECTED]> wrote: > On Sep 15, 10:51 pm, Ross <[EMAIL PROTECTED]> wrote: > > > You can always fall back to {% url myapp.u

Re: Get times of day with most entries

2008-09-15 Thread Ross
http://graphite.wikidot.com/ Graphite is a very cool open source graphing utility that was actually written purely in Python and Django. It has its own persistence back end, so you would actually have very little work to do for what it sounds like you are trying to do. There's no sense in

Re: Inconsistent urlresolver errors

2008-09-15 Thread Ross
You can always fall back to {% url myapp.users.login %} unless you need to reuse a view but have several different URL patterns for it. On Sep 15, 6:39 pm, catsclaw <[EMAIL PROTECTED]> wrote: > On Sep 15, 5:53 pm, Ross <[EMAIL PROTECTED]> wrote: > > > Are you usin

Re: restart apache every time I make a modification?

2008-09-15 Thread Ross
There was a thread on this a couple days ago that I starred. Here ya go: http://groups.google.com/group/django-users/browse_thread/thread/f44eefb21b7e675c# On Sep 15, 10:27 pm, Cequiel <[EMAIL PROTECTED]> wrote: > Hi all. > > I installed Django with Apache in my Windows. It was a little >

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-15 Thread Ross
Check out the description of the {% url %} tag in the Django documentation: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url It does not expect the project name to be in the URL. Try dropping "gpp" and just use "weblinks.views.view_links". On Sep 15, 9:19 pm, Brian Neal <[EMAIL

Re: Inconsistent urlresolver errors

2008-09-15 Thread Ross
Are you using Django 1.0? URL naming patterns (http:// docs.djangoproject.com/en/dev/topics/http/urls/#id2) were not introduced until 1.0. From the looks of the exception, Django is trying to build the path to your view by appending the argument in the {% url %} tag to your app name. python

Re: How to render a static html page and keep processing after?

2008-09-15 Thread Ross
> A web server itself is not a good place to do > long-running work that isn't being served directly to a browser. I agree with Ned on this one. If there is some intensive work that needs to be done, it would best be done by a process separate from the web server. The web server should write

Re: Deleting and creating a model

2008-09-13 Thread Ross
I think you would either have to assign the antenna's phone: antenna.phone = phone or refetch the antenna from the database so Django creates the object with the newly-created reference. The antenna you are looking at is only coming from memory when you do antenna.phone, not from the database.

Re: Database Security

2008-09-13 Thread Ross
http://docs.djangoproject.com/en/dev/ref/databases/#connecting-to-the-database Putting your database in the DMZ is probably a very bad idea... You don't want to give the entire internet access to your database. The standard Django setup expects your database to be accessible on the same local

Re: How to prevent URL HTML encoding?

2008-09-13 Thread Ross
am going to go with the optional slash in my regexs to get around APPEND_SLASH. On Sep 13, 1:25 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Sep 13, 2008 at 1:36 AM, Ross <[EMAIL PROTECTED]> wrote: > > > The URL encoding is not causing

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
there was an option to do just that. On Sep 12, 10:15 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 6:06 PM, Ross <[EMAIL PROTECTED]> wrote: > > > The problem is it looks bad! It makes the URL unreadable, which is > > what I want to preven

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
/Goo%2BGoo%2BDolls, however, is far tougher to pick apart by a human reader. My short answer is I want to keep my URLs human readable. On Sep 12, 1:14 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 1:49 PM, Ross <[EMAIL PROTECTED]> wrote:

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
in URL-speak, it conveys the right meaning for what I am trying to do. Is it possible to prevent APPEND_SLASH from percent encoding URLs? On Sep 12, 12:08 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 12:31 PM, Ross <[EMAIL PROTECTED]> wrot

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
Sorry, Julian, I misunderstood what you wrote. I see the Django HTML escaping doesn't change the '+' symbol, which makes this even more confusing... Even more strangely, this only happens intermittently. On Sep 12, 11:04 am, julianb <[EMAIL PROTECTED]> wrote: > On Sep 12, 4:22 pm, "Norman

Re: How to prevent URL HTML encoding?

2008-09-12 Thread Ross
http://www.w3schools.com/TAGS/ref_urlencode.asp http://en.wikipedia.org/wiki/Percent-encoding The URL percent encoding for '+' is '%2B'. Norman, I understand how to mark variables as safe inside templates, but the problem I am having is with the URL in your browser bar after hitting a URL like

Re: how to cache form request in Django?

2008-09-12 Thread Ross
http://docs.djangoproject.com/en/dev/topics/cache/#the-per-site-cache The cache documentation says, "The cache middleware caches every page that doesn't have GET or POST parameters." If you create restful URLs that your forms forward to, the restful URLs could be cached. (I'm not sure if

How to prevent URL HTML encoding?

2008-09-12 Thread Ross
I setup a URL that accepts any number of characters and the '+' symbol, which works just fine. /search/pets/dog+cat /search/pets/turtle /search/pets/turtle+cat+mouse All of those URLs go to the same view. The view splits the third argument on the '+' symbol and uses the list to do some work.

  1   2   >