Re: Debugging local Django app outside server root

2014-10-20 Thread Elliott
Update: The django app and the django server are both using the same Python interpreter. If I try to set a breakpoint in the app, the breakpoint does not exist warning actually is a local file but is in the remote_sources cache: Connected to pydev debugger (build 135.1057) pydev debugger: warn

Debugging local Django app outside server root

2014-10-18 Thread Elliott
Is it possible to debug (e.g. stop on breakpoints) an external Django app when running a Django server in a VM via remote debugging in Pycharm? I am able to run and debug the Django server using PyCharm's remote debugger, and the app runs as expected (changes to the local source code are reflec

Apache Vhosting issue in Ubuntu; one vhost is serving everything

2013-03-16 Thread Elliott Brun
Been at this for a bit today, one vhost file is defaulting and takes over and serves for both my URLs: Example: ( server1 is serving for www.server2.com ??? ) www.server1.com www.server2.com vhost confs: server1 ServerName www.server1.com ErrorLog /.../apache/error.log

Re: Why i can't get the debug informations (in case of error) when i run LiveServerTestCase tests?

2013-02-09 Thread Ron Elliott
On Tuesday, January 29, 2013 2:39:58 AM UTC-6, Alessandro Pelliciari wrote: > > Hi, I'm writing some tests with Selenium. > > When i run my selenium tests (LiveServerTestCase type) and i have some > error in my code (not in the test, i mean in the code executed, like the > homepage view i reach

Re: is django too big for my use case?

2012-09-08 Thread Steven Elliott
I do not think your use case is too big for Django; you are only limited to your imagination and your knowledge of Python really. Check out Django Piston for RESTful APIs On Sat, Sep 8, 2012 at 4:05 PM, LuckySMack wrote: > I am currently st

Re: Can't Syncdb

2012-09-08 Thread Steven Elliott
What's the error message you get specifically On Sep 8, 2012 7:31 AM, "Kollin" wrote: > I create a project. I create app by name "app" in the project. The app > that : > app > __init__.py > models > __init__.py > a.py > b.py > but I can't syncdb the app. I use djan

Re: Step up to the plate

2012-09-06 Thread Steven Elliott
Hi alex I'm down as well email me at srichardelliot...@gmail.com On Sep 6, 2012 6:28 PM, "andrea mucci" wrote: > Hi Alex > > if you need some help contact me to and.mu...@gmail.com > > have a nice day > El 07/09/2012, a las 00:18, Alex Glaros escribió: > > *Dear Django Group, > > Can you spare

messages.sucess question

2012-09-04 Thread Steven Elliott
Hello, Is there an easy way to not display a success message as an unordered list? I have been looking high and low and for some reason cannot find an answer to this. Thank you! Best, Steven Elliott -- You received this message because you are subscribed to the Google Groups "Django

Related Objects

2012-02-19 Thread Jason Elliott
I have a case in which I need to return only 1 field from the related object (table). The docs give an example where I can return the related object in a query, but I need only one field from the related object. For Example: I retrieve all the customers from the 'Customers' table. Each customer

Re: [pinax-users] Learning Django+Pinax - Recommend books and/or tutorials?

2012-01-27 Thread Steven Elliott Jr
> > What would you recommend? > To get started with Python: http://pragprog.com/book/gwpy/practical-programming http://www.amazon.com/gp/product/1590599829/ref=pd_lpo_k2_dp_sr_3/182-5610174-4840816?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=lpo-top-stripe-1&pf_rd_r=1YTG71HMBVWK64HZ2TP2&pf_rd_t=201&pf_rd_p=486

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Steven Elliott Jr
On Jan 25, 2012, at 9:14 PM, JJ Zolper wrote: > > The keywords were 'in production'. The development server (i.e. python > > manage.py runserver) works fine under Windows. But when you want to > > make the website accessible to your audience (the internet, company > > etc.), you should host that

Re: Django for a large social networking or photo sharing site?

2011-11-22 Thread Steven Elliott Jr
Yes > Hello, > > [This is the first time I am using Google Groups and/or mailing lists, > so please bear with me if I do something wrong initially.] > > Is Django web framework apt for a large social networking or photo > sharing site? (Think one that has to easily and seamlessly scale to > the

Re: models.FileField versus forms.FileField

2011-11-10 Thread Elliott Brun
Ah that makes sense a little, so just for html. But to clarify it seems like the forms.fileField can be used in a model in place of models.filefield, as in the code below. I have gotten models.FileField(uploadTo = /somedir) to work just fine in development. Is there some advantage to the formsHand

Re: installing django

2011-09-13 Thread Steven Elliott Jr
What exactly is the problem? Can you provide more detail? Platform, error messages, python version? What have you tried already? On Sep 13, 2011, at 1:21 PM, re64 wrote: > I am having trouble installing django. I cant seem to do it any > suggestions > > -- > You received this message becaus

Re: Django Development environment

2011-08-27 Thread Steven Elliott Jr
On Aug 27, 2011, at 11:17 AM, Simon Connah wrote: > > On 27 Aug 2011, at 04:44, Steven Elliott Jr wrote: > >>> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote: >>>> Mercurial or Git (depends on whether the project is open source or not) >> >> K

Re: Django Development environment

2011-08-27 Thread Steven Elliott Jr
> On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote: >> Mercurial or Git (depends on whether the project is open source or not) Kenneth, I think he means whether or not the repository will be public or private. Github (git) does not offer private repos unless you pay whereas bitbucket (merc

Re: Django Development environment

2011-08-25 Thread Steven Elliott Jr
> Am 23.08.2011 00:07, schrieb Stephen Jackson: >> I am new to the world of Django. I would like to hear from other django >> developers describe their dev environment (tools, os, editors, etc.). Mac OS X Lion PyCharm and TextMate with Python competion and Django bundles Mysql & MongoDB South Pyg

Re: Question about Displaying a Table

2011-06-27 Thread Steven Elliott Jr
Django has about the best documentation out there foe getting started. Walk through the tutorial and see how it goes. Sent from my iPhone On Jun 27, 2011, at 2:25 PM, "Cal Leeming [Simplicity Media Ltd]" wrote: > Forgive me but, the tone of this email sounds like you are asking us to do > th

Re: Django - Verfication of runserver vs browser

2011-01-24 Thread Steven Elliott Jr
Have you tried running it on a different port? Can you post the actual error message you get? -Steven Elliott Jr On Jan 24, 2011, at 2:05 PM, Kimberly Harvey wrote: > I ran the browser in the linux. > > On Mon, Jan 24, 2011 at 12:57 PM, Javier Guerra Giraldez > wrote: >

Re: Django Improper Configuration

2011-01-23 Thread Steven Elliott Jr
2:35:06 PM UTC+11, Kimberly wrote: > it says that the _file_ is not defined. > > On Sun, Jan 23, 2011 at 9:28 PM, Graham Dumpleton > wrote: > > > On Monday, January 24, 2011 2:19:09 PM UTC+11, Steven Elliott Jr wrote: > Copy and Paste the following to replace yo

Re: Django Improper Configuration

2011-01-23 Thread Steven Elliott
> That was already pointed out to them. You're right, sorry my bad -- I just got to my computer and read the thread rather than just using my phone. > The lack of a comma should have resulted in a syntax error, which makes me > believe, unless they modified the content before posting, that they

Re: Django Improper Configuration

2011-01-23 Thread Steven Elliott
Also, what editor are you using? if its not an IDE-type thing remember to save your work in the editor. If you are coming from the Windows programming world generally your programs will save when you build and run something in the IDE. If you're using just an editor like Emacs, Vim, Gedit, Kate,

Re: Django Improper Configuration

2011-01-23 Thread Steven Elliott
Copy and Paste the following to replace your entire DATABASES tuple: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'database.db', 'USER': '', 'PASSWORD': '',

Re: Django Improper Configuration

2011-01-23 Thread Steven Elliott Jr
I remember that the one time I tried sqlite it complained until I put a .db suffix on the name of my database. If you do not specify the full path and just specify a name, then it will just create the database file in your project's root directory. So, under name just put: 'NAME' : 'database.

Re: Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-21 Thread Steven Elliott Jr
> > > While I am sure we can all sympathize with confronting a technical problem > that we don't understand, this OP has the flavor of trolling perhaps. At any > rate this is the wrong list for these pleadings. I don't even see a question You're so right; I don't know why I am wasting my ti

Re: Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-21 Thread Steven Elliott Jr
d rather triple-boot a system than run in a VM. Best, Steven Elliott steve...@me.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this

Re: Expert help needed --LINUX on virtualBox using Windows 7 machine

2011-01-20 Thread Steven Elliott Jr
Why don't you try partitioning your hard drive instead and doing a dual boot installation? Also, it's Debian not Derbian. -Steve On Jan 20, 2011, at 4:59 PM, Kimberly wrote: > This is now a LINUX-Derbian problem I am experiencing. I open the > virtualbox and clicked on the Linux-Windows th

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-20 Thread Steven Elliott Jr
> Ubuntu IS Debian for all intents and purposes. Why does your boss insist that > you use a particular distro? It shouldn't really matter what your development > OS is (at least with *nix systems). Is there an existing Django application > that needs to be supported or is this a new project? >

Re: Django's documention is horrible

2011-01-10 Thread Steven Elliott Jr
Ummm... I think thats the first time I've ever heard anyone say that django's documentation sucks. Sent from my iPhone On Jan 10, 2011, at 4:25 PM, Simon W wrote: > Hey, > For such a good web framework it's a shame that the documention is not > structured well .. at all. It consists of massi

Re: Django on Apache

2010-09-25 Thread Steven Elliott Jr
MAMP can be a bit of a pain I think sometimes to modify, though I haven't used it much in the past few years. You can use the Mac's built-in apache server though with mod_python. Check out http://www.google.com/search?q=mod_python+mac+os+x&ie=UTF-8&oe=UTF-8&hl=en&client=safari Sent from my iPho

Re: Recommend a book

2010-09-23 Thread Steven Elliott Jr
I have found beginning django e-commere as practical django projects to be great. Both from apress. I prefer to use books that go through building real world solutions. The definitive guide to django is a must read though. On Sep 23, 2010, at 9:57 PM, Tim Johnson wrote: > FYI: I'm an experien

Re: Pylons vs. Django

2010-09-05 Thread Steven Elliott Jr
You can use sqlalchemy with django too Sent from my iPad On Sep 5, 2010, at 2:37 PM, Juan Hernandez wrote: > Well, just by using SQLAlchemy makes this framework worth a try > > On 9/5/10, Feross wrote: >> Hey everyone, >> >> I'm a new Python user and I'm looking for a web development framewo

Re: LIMITATIONS of django

2010-09-04 Thread Steven Elliott Jr
This is not really an appropriate question. Django, like many frameworks is a collection of libraries written in some language. Django happens to be written in Python; as such, your proficiency with Python will have an effect on what you can and can't do with Django. Django provides a lot of use

Re: how do you build an html website in python?

2010-04-17 Thread Steven Elliott Jr
@codecub If you are interested in just building an HTML website why not just write it in HTML? Why do you think you need to use Python? What are the requirements of the website? Do you need a database and middleware? If so I would recommend following the django tutorial first: http://docs.djangop

Re: Giving up PHP. ...Can't decide between Django & Rails

2010-04-17 Thread Steven Elliott Jr
etter developer even if you only work professionally with one stack, learning and playing with other things will open up your mind. For me yes I love python and django but I also play with erlang, lua, haskell, xyz framework... you name it. It's good for yer noggin. -Steven Elliott Jr

Re: how do you build an html website in python?

2010-04-17 Thread Steven Elliott Jr
Python won't build a site for you by itself. Do you already know python, HTML, JavaScript, relational databases and the like? All of these things are still important. Python is only one piece of the overall puzzle. -Steven Elliott Jr On Apr 17, 2010, at 9:13 AM, "ge...@aquaria

Re: OS X Server upgrade (10.6.3) can't load psycopg2 from apache2/modpython

2010-04-14 Thread Steven Elliott Jr
Righty. Glad you got it sorted. Cheers mate -Steven Elliott Jr On Apr 14, 2010, at 5:39 PM, John Abraham wrote: It's definitely a system path / python path problem. I did the brute force method of linking psycopg to the django project directories, twice, just to be sure: cd /We

Re: OS X Server upgrade (10.6.3) can't load psycopg2 from apache2/modpython

2010-04-14 Thread Steven Elliott Jr
Hey John, I am running Mac OS X Server(s) as well but have not yet updated to 10.6.3 - I am going to do this now and see if it breaks anything. My apps are all running using the preinstalled version so I'm curious to see if anything breaks. Just curious -- my python version is 2.6.1 and I neve

Re: MySQLdb setup on snow leopard help

2010-04-12 Thread Steven Elliott Jr
Did you run the install as sudo? -Steven Elliott Jr On Apr 12, 2010, at 3:09 AM, Bdidi wrote: I reinstalled XCode to include 10.4 support and tried again, and MySQLdb is now installed, but now I get this: File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/ site-pac

Re: Admin issues

2010-04-09 Thread Steven Elliott Jr
Have you looked at your db? are the tables there that you wrote in your models. Did you run python manage.py syncdb and did you see verification that your tables were created? If you want to see that the sql is being created run python manage.py sqlall app_name to make sure its generating the

Re: Giving up PHP. ...Can't decide between Django & Rails

2010-04-09 Thread Steven Elliott Jr
I think it largely boils down (as many have said) to a python vs ruby debate. I personally hate Ruby... I think its perl with a nice syntax, its very obtuse and just downright hard to maintain as projects get bigger (IMHO, others I;m sure disagree). As far was what is better about Django for me

Re: Setting up Django on snow leopard

2010-04-09 Thread Steven Elliott Jr
Its also a good idea to install the Developer Tools ... You should check which version of Python you are using too. I think be default OS X uses 2.6.1 This is what I get when I type "python" into the terminal: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) On Apr 9, 2010, at 11:38 AM, Lee Hi

Re: Setting up Django on snow leopard

2010-04-09 Thread Steven Elliott Jr
Are you running the install as superuser? I am running leopard too and ran into the same problem but once you run it as: sudo python setup.py install it should work.. Also, dumb question but do you have mysql installed? Its also a good idea to put this: # mysql path PATH=${PATH}:/usr/local/mys

Re: Admin issues

2010-04-09 Thread Steven Elliott Jr
Uncomment: #'django.contrib.sessions', make sure to import admin from django.contrib and turn admin.autodiscover() and yes, error messages would be helpful... if any. On Apr 9, 2010, at 10:32 AM, Stuart wrote: > What you have looks about right. What result are you getting? An error > message?

Re: Admin issues

2010-04-09 Thread Steven Elliott Jr
, include(admin.site.urls)), # ... ) Hope this helps! but you will still need to make sure that you have On Apr 9, 2010, at 9:13 AM, Steven Elliott Jr wrote: > In your urls. py make sure you have: > > from django.contrib import admin > admin.autodiscover() > >

Re: Admin issues

2010-04-09 Thread Steven Elliott Jr
In your urls. py make sure you have: from django.contrib import admin admin.autodiscover() and that you've uncommented the (r'^admin/', include(admin.site.urls)), in the tuple: urlpatterns = patterns. On Apr 9, 2010, at 8:44 AM, Sheena wrote: > Hey hey. I'm a little new to Django so I've bee

Re: Stuck going through tutorial (with def __unicode__(self): bit)

2010-03-20 Thread Steven R. Elliott Jr
Right. 9 times out of ten its the server not restarting which someone already mentioned. If you're new to python try using ecli On Mar 20, 2010 10:22 AM, "Daniel Roseman" wrote: On Mar 20, 1:56 pm, Ed57 wrote: > Hi > > I'm just trying to learn abou... You haven't shown us your code, but my gues

Re: "ImportError: No module named django" with MacPorts

2010-03-03 Thread Steven R. Elliott Jr
Hello Tim, I'm a fellow Mac user but I don't quite understand the problem that you are having installing Django on OS X 10.6. I installed Django today on a new Mac and it took all of 5 minutes and I downloaded the tarball, extracted it and threw it in my home directory. I believe that 10.6 comes

SQL Server 2008

2010-03-03 Thread Steven R. Elliott Jr
#x27;08 (I am using a Mac right now... not real keen on having to bootcamp windows onto my Mac). Has anyone had this type of project before? If so, I'd love to hear how you got started. Thanks in advance, Steven Elliott -- You received this message because you are subscribed to the Google

Re: Django in the enterprise?

2010-02-24 Thread Steven Elliott Jr
y, thanks for the insight; I appreciate it. Steve On Feb 24, 2010, at 2:31 PM, Eric Chamberlain wrote: > > On Feb 24, 2010, at 6:23 AM, Steven Elliott Jr wrote: > >> Dear friends, >> I apologize for writing this type of question to the community but I would >> apprecia

Re: Django in the enterprise?

2010-02-24 Thread Steven Elliott Jr
@Philip Thanks for information -- very good advice. I appreciate all the input from everyone else as well. I intend to start using Django for almost everything going forward. Thanks, Steve On Feb 24, 2010, at 2:06 PM, Phlip wrote: > Steven Elliott Jr wrote: > >> Right now we h

Re: Django in the enterprise?

2010-02-24 Thread Steven Elliott Jr
Thank you to all for your comments. It has been most helpful. On Feb 24, 2010, at 11:05 AM, Andy McKay wrote: > > On 2010-02-24, at 6:40 AM, Steven Elliott Jr wrote: >> Right now we have Java and ASP.NET doing most of the work for us but the >> systems are old and need updati

Re: Django in the enterprise?

2010-02-24 Thread Steven Elliott Jr
@Shawn Sorry if I was not clear with my question. It seems like a lot of sites that I have seen on djangosites are news sites, or content-driven sites like blogs, personal web pages, social networking-type sites like fluther.com, etc. I was just curious if anyone has every sat down and wrote a

Django in the enterprise?

2010-02-24 Thread Steven Elliott Jr
ughts? Thank you very much for your time. Best, Steven Elliott -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Steven Elliott Jr
oject as a whole. Let's not start bickering amongst ourselves... Best, Steven Elliott Sent from my iPhone On Feb 20, 2010, at 7:19 PM, Russell Keith-Magee wrote: On Sun, Feb 21, 2010 at 4:11 AM, Sithembewena Lloyd Dube wrote: I wonder what Atamert the peacemaker has to say now,

Re: Django IDE

2010-02-15 Thread Steven Elliott Jr
TextMate! On Feb 15, 2010, at 5:45 AM, Anton Bessonov wrote: > http://www.vim.org/ > > dj_vishal schrieb: >> Hello >> >> Hi to all am new to the Django Framework.am learning django >> Which IDE is suitable for Django ..plz help me in right way >> >> Thanks in Advance >> vishal >> 20

Re: Using email instead of username in extended "User" model?

2009-08-03 Thread Elliott
Another way to do it is to create subclasses of all the relevant classes and forms. It's easy enough to create middleware that replaces django's default user object with your own, and it's also very easy to set the admin up to use your user model instead of the default. On Aug 3, 3:15 pm, Dana w

Re: Problem with performance on a django site

2009-05-29 Thread Elliott
On May 29, 3:48 am, motard wrote: > Hi! > > Thanks for all your suggestions. I've been able to solve the issue. > Now the page reports to be executing roughly 80-90 SQL queries and is > performing well. > > The problem was mainly in two places of my code where I was looping > through all the re

Re: get_or_create not atomic?

2009-05-13 Thread Elliott
On May 12, 12:47 pm, Phil Mocek wrote: > On Tue, May 12, 2009 at 02:25:41AM -0700, Daniel Roseman wrote: > > No, [get_or_create is] not atomic. You can see the code in > > django.db.models.query - it tries a db lookup, and then creates > > a new object if one is not found. > > It seems that this

Re: A way to specify different template code for every 6th item in a list?

2009-05-03 Thread Elliott
If it's as simple as a color change or bold or something, you can use {% cycle "red" "red" "red" "red" "red" "blue" %} On May 2, 3:14 am, Daniel Roseman wrote: > On May 2, 7:28 am, "Chris O'Donnell" wrote: > > > I'm using the Blueprint CSS framework and need to be able to have > > every 6th lis

Re: Form wizard - previous step

2009-04-06 Thread Elliott
On Apr 5, 4:24 pm, eli wrote: > No, how to add  functionality to back to the previous step without > deleting current step's data. > > regards. That can't be done with the current form wizard. A session-based formwizard that would have allowed this was on the list for django 1.1, but nobody real

Re: Generic foreignKey model: Category

2009-02-11 Thread Jake Elliott
if i follow your question - you'd want a ForeignKey in CategoryItem to your Category model, so you can add both your News object and Product object to the same category through CategoryItem. then you'll be able to iterate through all of the items in a categoroy with something like `mycategory.cat

Re: Generic foreignKey model: Category

2009-02-11 Thread Jake Elliott
hi dan - a little further down on the contenttypes doc page you link to there is documentation on the generic foreign key mechanism bundled with the contenttypes app: http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1 pretty similar to what you describe ;) On Wed, Feb 11, 2009 a

Re: signals in 1.0 problem: nesh django utils & django 1.0

2009-02-09 Thread Jake Elliott
hi robocop - is it enough to add the '**kwargs' syntax to your receiver function? or is that already present? like: def _save(self, **kwargs): ... and def delete(**kwargs): ... -jake On Mon, Feb 9, 2009 at 12:15 PM, Robocop wrote: > > Hello, > I've recently been porting many projec

Re: simple record output

2009-02-02 Thread Jake Elliott
hi john - you can use the 'spaceless' tag in your template: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#spaceless to filter out spaces & 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 t

Re: Dreamhost now supports Django

2008-07-17 Thread jake elliott
On Jul 17, 3:15 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Can anybody who is in a position to check this out please look at one > thing in particular: assuming the default database is still MySQL, which > version of the python MySQLdb wrapper are they using? If > >         >>> import M

Filtering data by foreign key.

2008-01-30 Thread Elliott
In part of my database, I have a Planet model and a Base model, and the two are closely related. There can only ever be one Base per Planet, but some (most, actually) planets don't have Bases. In one of my views, I need to get a list of Planets that don't have bases on them. If I were using OneToO

Sharding with Django

2007-11-15 Thread Brett Elliott
How can I 'shard' with Django? What I mean by sharding is accessing multiple databases to combine data from multiple databases. This would require access to the database connection API so that the view has access to multiple database connections. Perhaps I could add code to a filter to set up the

Re: Sharding with Django

2007-11-15 Thread Brett Elliott
On Nov 15, 4:39 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-11-15 at 16:04 -0800, Brett Elliott wrote: > > How can I 'shard' with Django? What I mean by sharding is accessing > > multiple databases to combine data from multiple databases. T

Re: Oh boy, I've gone and done it now.

2007-11-05 Thread jake elliott
hi baxter - On Mon, 2007-11-05 at 10:35 -0800, [EMAIL PROTECTED] wrote: > OK, I attempted to install patch 2070, and failed miserably, messing > up /core/handlers/modpython.py among other things. When I realized I > had done so, I tried updating and then reinstalling django to get back > to a cle

Re: generic views

2007-10-22 Thread jake elliott
On Mon, 2007-10-22 at 14:12 -0500, jake elliott wrote: > this is probably another really simple view. you can use > HttpResponseRedirect - or if you really want to end up using a generic > view remember that you can call them within your own views also. > > #

Re: generic views

2007-10-22 Thread jake elliott
hi bernd, On Mon, 2007-10-22 at 18:40 +0200, Bernd wrote: > I want to use a generic view with an url that had a parameter. This > parameter should filter my queryset. > How does this work? I don't now what to write in the filter-option? > - > e = { > 'template': 'foo.html

Re: template and array like template variable access

2007-10-17 Thread jake elliott
hi johnny, you can use dot syntax for indices also, ie: {{ a_tup.0 }} {{ a_tup.1 }} -jake On Wed, 2007-10-17 at 08:20 -0700, johnny wrote: > > {% for a_tup in rs %} > > {{ a_tup[0] }}/ >{{ a_tup[1] > > {% endfor %} > > Exception Type: TemplateS

Re: generic views

2007-10-11 Thread jake elliott
Marty Alchin wrote: > You'd replace "what goes here" with what you put in > "template_object_name": "author" (only without the quotes). Of course, > it'd be a little more readable if you use the plural "authors", since > you're getting a list of more than one author. actually you'll use "author_l

Re: Problem with nesh.thumbnail

2007-10-04 Thread jake elliott
hi divan, Divan Roulant wrote: > "'myproject.thumbnail' is not a valid tag library: Could not load > template library from django.templatetags.apparto.thumbnail, No module > named myproject.thumbnail" here's the change that's tripping you up: http://code.djangoproject.com/wiki/BackwardsIncompati

Re: How to keep track of iterations through a for loop in my template?

2007-10-01 Thread jake elliott
hi greg Greg wrote: > Hello, > I have a table in my template that will contain an x number of rows > depanding on what I get back from the view. I want my table row > background color to rotate between red and white. As of now, I don't > know how to keep track of each iteration through my for l

Re: change list in admin

2007-09-27 Thread jake elliott
hi jose Lic. José M. Rodriguez Bacallao wrote: > how can I limit items in "change list" of the admin interface? the admin will use your model's default manager (the first specified manager) to filter results. more information here: http://www.djangoproject.com/documentation/model-api/#modifying

Re: Sorting product

2007-09-26 Thread jake elliott
hi francis - Francis Lavoie wrote: > I have a page that list products. These products are in different > categories, some belongs to other products (like addons). But I need to > sort them as the most important product is at the top. The problem is > that I can't come up with a good solution. I t

Re: Union/join of two queryset?

2007-09-24 Thread jake elliott
hi francesco cesco wrote: > I have two QuerySets and I need to join them to pass them as first > parameter to the ObjectPaginator class. > How can I do that? > The "+" operator doesn't work (like it does for lists) and there is no > a method like the list one "extend()". you can use the bitwise

Re: elsif in templates?

2007-09-24 Thread jake elliott
hi a. A. Reppel wrote: > does the template language have a elsif clause for if and if{not}equal? nope, you'll have to go with {% if %} {% else %} {% if %} {% endif %} {% else %} {% endif %} best, jake --~--~-~--~~~---~--~~ You received this message becaus

Re: How to call a .htm page without going to the views.py file?

2007-09-21 Thread jake elliott
hi greg - you're looking for this: http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-direct-to-template best jake Greg wrote: > Ok, > Very easy question here. Is there anyway that I can directly call > my .htm file from within my urls.py file? > > Now, I ha

Re: General site organization

2007-09-20 Thread jake elliott
hi florian - Florian Lindner wrote: > I have the site xgm.de with a blog, an abbreviation database and some static > pages. > How would a organize such a site with Django? > Create an app for the blog, an app for the DB and the static pages as > templates of the project? you really have a lot

Re: Can't update my django source via svn

2007-09-19 Thread jake elliott
hi jeff - django devs are in the process of moving servers so i think this is probably just a temporary issue. fwiw i am able to 'svn up' right now with no problem :| best, jake jeffself wrote: > I've never run into this problem before but all of a sudden its not > working. My source is locat

Re: Add Support for Hex numbers is Admin

2007-09-19 Thread jake elliott
hi kevin, you could convert to int in the model's save() method class MyModel(models.Model): def save(self): self.hexval = int(str(self.hexval), 16) super(MyModel, self).save() or whatever hex->decimal method you need for how you have the hex val stored. but then how to get it

Re: ifequal function not working?

2007-09-13 Thread jake elliott
hi john - John M wrote: > {% ifequal selected_id recordset.id %} never seems to work. > > where selected_id = 1 > recordset has ID from 1 - 10 just a guess - are selected_id and recordset.id really the same type? {% ifequal %} will not match for example '1' == 1 best, jake --~--~-~-

Re: 404 Page Help

2007-09-11 Thread jake elliott
hi ryan, how about a context processor? http://www.djangoproject.com/documentation/templates_python/#writing-your-own-context-processors -jake Ryan K wrote: > Hi. All URLs in my templates are preceded by variables I added to the > settings file so I could easily deploy my site on many differen

Re: Help me understand the error of my ways...

2007-09-07 Thread jake elliott
hi atendo - i think you may have some misunderstandings about what template context is and what it's doing here. maybe another look at this page: http://www.djangoproject.com/documentation/templates_python/#basics will help clear this up for you. best, jake Atendo wrote: > I think I see what

Re: Help me understand the error of my ways...

2007-09-07 Thread jake elliott
hi atendo, Atendo wrote: > If I do that, I get this error: > > > KeyError at / > 'link' > Request Method: GET > Request URL: http://localhost:8080/ > Exception Type: KeyError > Exception Value: 'link' > --

Re: Form field deletion

2007-09-07 Thread jake elliott
Oleg Korsak wrote: >> Sure - use the 'fields' option to specify the subset of model fields >> you want to use on the form. >> > form_for_instance() got an unexpected keyword argument 'fields' > this argument to form_for_instance() and form_for_model() is only available in the SVN version of dj

Re: Help me understand the error of my ways...

2007-09-07 Thread jake elliott
hi atendo, Atendo wrote: > And then in the homepage index.html I've got this: > > {% load industry_widget %} > sorry if i miss the mark here but are you actually invoking the templatetag you've load

order by m2m field?

2006-05-06 Thread Brian Elliott
Hello, Is it possible to order a query by a ManyToManyField? For example, in the models below, I'd like to select all Entries and order by the Author's name. Something to the effect of Entry.objects.all ().order_by('authors__name')? Thanks, Brian class Author(models.Model): name = m

Re: querying for an empty set in m-r?

2006-04-12 Thread Brian Elliott
Russell, Just wanted to thank you for responding to my post. You did interpret my question correctly, though I was obviously hoping to avoid using raw SQL. Anyway, thanks again. Brian On Apr 12, 2006, at 1:10 AM, Russell Cloran wrote: > > Hi, > > On Tue, 2006-04-11 at 21:20 -0400, Max Ba

Re: querying for an empty set in m-r?

2006-04-12 Thread Brian Elliott
Max, Just wanted to thank you for responding to my question. You are correct that the list comprehension is pythonic, though I was ideally looking for a efficient method from a database perspective. Thanks, Brian On Apr 12, 2006, at 2:16 AM, Max Battcher wrote: > > Russell Cloran wrote: >

querying for an empty set in m-r?

2006-04-11 Thread Brian Elliott
Suppose I have the following two model objects: class Tag(models.Model): name = models.CharField(maxlength=10) class Article(models.Model): tags = models.ManyToManyField(Tag) Each Article can be associated with multiple Tags and vice versa. How can I query the Tag model to o

[no subject]

2006-03-29 Thread Brian Elliott
Hey folks, Is there a recommended way to do logging in a production environment? Should I just use Python's logging module or is there a built-in way to do this? (I am using the M-R branch.) Thanks, Brian PS: I'm a new user, so forgive me if I'm asking the obvious... --~--~-~--