On 18/12/2010, at 1:03 AM, Dopster wrote:
> This is a question that can be generalized for any other amateur programmers
> looking to get into software development, and specifically startups. I
> specify Django/Python in my own details below, but it can be replaced with
> PHP, Ruby, etc.
>
Hi,
I have a block, included into several pages (for example, in all
sections of my website you can see top rated articles in the right
column). I can include a template, that prints this list into base
template and avoid any copy-paste here.
But I need to provide it with context variable, that con
Hi,
I have a block, included into several pages (for example, in all
> sections of my website you can see top rated articles in the right
> column). I can include a template, that prints this list into base
> template and avoid any copy-paste here.
> But I need to provide it with context variable,
Thanks, Piotr.
It was a solution with custom tag but implementation with database
requests from template looked not too elegant for me.
I'll look into custom context processors.
On Dec 19, 1:25 pm, Piotr Kilczuk wrote:
> Hi,
>
> I have a block, included into several pages (for example, in all
>
>
On Sat, Dec 18, 2010 at 11:06 AM, Mingming Wang wrote:
> From the tutorial of Django, there is the following code in here
> Who knows the mechanism behind a redirect or a direct response? Refer the
> comments below. Thanks a lot!
HttpResponseRedirect returns a 301 or 302 response code to the
brow
On Sat, Dec 18, 2010 at 3:16 PM, JMVmedia.es wrote:
> In the urls.py of one application i decided to use this idea.
>
>
> import os
> APP_DIR = os.path.dirname(os.path.abspath(__file__))
> APP_NAME = os.basemane(APP_PATH)
>
> I'm not sure about the performance implications of using this os
> i
I've had good success with sites like odesk and elance. I think the
key is doing interviews and looking carefully through people's resumes
and work history. Also, knowing enough to spot good programming is
really helpful!
On Dec 18, 5:37 am, mehma sarja wrote:
> I have a project which needs devel
Seasons Greetings,
I joined the list yesterday and just wanted to say "Hi" and introduce
myself.
I'm a frontend dev who was looking for a framework to learn to enhance my
backend skills and django seemed to fit nicely. I'm really glad I did. I
seem to be picking it up quite well, although it's b
Welcome Mate.
I'm sure you'll get so much to learn and also teach.
Best regards.
Sent from my BlackBerry wireless device from MTN
-Original Message-
From: Dave Sayer
Sender: django-users@googlegroups.com
Date: Sun, 19 Dec 2010 12:16:12
To:
Reply-To: django-users@googlegroups.com
Subj
Welcome to the community Dave.
Season's greetings to you too and everyone.
Regards
Anurag
On Sun, Dec 19, 2010 at 5:46 PM, Dave Sayer wrote:
> Seasons Greetings,
>
> I joined the list yesterday and just wanted to say "Hi" and introduce
> myself.
>
> I'm a frontend dev who was looking for a fra
I am doing something similar to Alexay, I have a context processor
repeating the same query for all of my views. Piotr, ( or anyone ) can
you expand more about caching the data? Maybe some ideas of things to
Google for.
On Dec 19, 2:25 am, Piotr Kilczuk wrote:
> Hi,
>
> I have a block, included i
Hello Matt,
On Dec 19, 6:58 am, Matt wrote:
> I am doing something similar to Alexay, I have a context processor
> repeating the same query for all of my views. Piotr, ( or anyone ) can
> you expand more about caching the data? Maybe some ideas of things to
> Google for.
No need to Google unles
Hi again,
Johnny-cache http://packages.python.org/johnny-cache/ is very good at
caching repetitive queries, however I had to disable it in my most-recent
project because of a bug in admin...
Other options are low-level cache (in case of context processor - cache only
the QuerySet) or template fra
I'm trying to determine why our search queries return so slow.
We are not doing anything fancy in our searches, simply searching
for author, or title in a table of about 6000 books.
http://www.rareorientalbooks.com/searchadv/
On the command line using the exact code in the views.py everything
re
Glad to see another Django developer has joined us :)
On Sun, Dec 19, 2010 at 12:16 PM, Dave Sayer wrote:
> Seasons Greetings,
>
> I joined the list yesterday and just wanted to say "Hi" and introduce
> myself.
>
> I'm a frontend dev who was looking for a framework to learn to enhance my
> backe
ah no, now I get it: geo queries requires a GeoManager. so even though the
starting class does not have gis fields, it needs a GeoManager in order to
build queries addressing fields on the other model.
I'm not sure what should happen, the error messaging is very misleading, but
once you know t
Hi all
I was using haystack(xapian) at a Mac, so I moved it to a Linux (Ubuntu
10.10) using python 2.6.6, but now when I try to rebuild the index I get the
following error:
AttributeError: 'ProfileIndex' object has no attribute 'full_prepare'
ProfileIndex is my index, I didn't created a full_prepa
Working on your own projects will give you plenty of opportunities to do
things "the wrong way" (and believe me, it takes a while ;p). It also gives
you the chance to develop your own coding style, and improve upon. There's
nothing worse than using a new framework for a work project, then two years
I need to execute some SQL queries involving joins and it seems like
custom SQL is the way to go. A couple of questions:
1) In the doc (http://docs.djangoproject.com/en/1.2/topics/db/sql/
#executing-custom-sql-directly) there's an example:
cursor.execute("SELECT foo FROM bar WHERE baz = %s", [s
you get array of arrays.
First array contains rows. Every row is just an array of fields, order is
the same as in your query.
On Sun, Dec 19, 2010 at 9:45 PM, Andy wrote:
> I need to execute some SQL queries involving joins and it seems like
> custom SQL is the way to go. A couple of questions
On 12/19/2010 09:45 PM, Andy wrote:
I need to execute some SQL queries involving joins and it seems like
custom SQL is the way to go.
I presume you already tried out to do your JOIN queries using the Django
ORM?
A couple of questions:
1) In the doc (http://docs.djangoproject.com/en/1.2/
On Dec 19, 3:48 pm, Maksymus007 wrote:
> you get array of arrays.
> First array contains rows. Every row is just an array of fields, order is
> the same as in your query.
What if my query is "SELECT * FROM ..."?
In that case what ordering would the fields be in?
--
You received this message
>
> I presume you already tried out to do your JOIN queries using the Django
> ORM?
Is there a way to specify JOIN using the Django ORM? The 2 tables I'm
joining aren't related through a foreign key.
--
You received this message because you are subscribed to the Google Groups
"Django users" g
On 12/19/2010 3:48 PM, Maksymus007 wrote:
> you get array of arrays.
Technically, in strict Python terms what you get is a list of tuples.
Each element of the list is a tuple where each column from the query
provides an element of each tuple.
> First array contains rows. Every row is just an arr
On 12/19/2010 10:20 PM, Andy wrote:
Is there a way to specify JOIN using the Django ORM? The 2 tables I'm
joining aren't related through a foreign key.
Why don't you use a relation field in your models if your models are
related?
--
You received this message because you are subscribed to the
Den 19/12/2010 kl. 22.17 skrev Andy:
> On Dec 19, 3:48 pm, Maksymus007 wrote:
>> you get array of arrays.
>> First array contains rows. Every row is just an array of fields, order is
>> the same as in your query.
>
> What if my query is "SELECT * FROM ..."?
>
> In that case what ordering would
On Dec 19, 5:06 pm, "Jonas H." wrote:
> On 12/19/2010 10:20 PM, Andy wrote:
>
> > Is there a way to specify JOIN using the Django ORM? The 2 tables I'm
> > joining aren't related through a foreign key.
>
> Why don't you use a relation field in your models if your models are
> related?
The table
On 19/12/10 22:44, Andy wrote:
On Dec 19, 5:06 pm, "Jonas H." wrote:
On 12/19/2010 10:20 PM, Andy wrote:
Is there a way to specify JOIN using the Django ORM? The 2 tables I'm
joining aren't related through a foreign key.
Why don't you use a relation field in your models if your models are
On Dec 19, 6:20 pm, Tim Sawyer wrote:
> I think so, yes. Something like this:
>
> You can then do something like
>
> anObjectA = ObjectA.objects.filter(id=1)[0]
> objectBs = ObjectB.objects.filter(object_a=anObjectA)
This requires 2 separate queries, right? I'm hoping to just have 1
trip to t
Everybody knows the default django FileField doesn't allow to remove an
existing file...
This is a good replacement. Just use RemovableFileField instead of
FileField in your models:
http://djangosnippets.org/snippets/636/
I want to implement on it another feature- When there is a file being
uplo
Thanks for the welcomes. Hope I can contribute to, as well as benefit
from the list.
On 19 December 2010 18:43, Cal Leeming [Simplicity Media Ltd]
wrote:
> Glad to see another Django developer has joined us :)
>
> On Sun, Dec 19, 2010 at 12:16 PM, Dave Sayer wrote:
>>
>> Seasons Greetings,
>>
>>
Hi, I'm using Django 1.2.1 and I'm having problems trying to load my
template tags:
{% load mytags %}
TemplateSyntaxError at /myapp/
'mytags' is not a valid tag library: Template library mytags not
found, tried django.templatetags.mytags
It's defined in myproject/myapp/templatetags/mytags.py.
I am not particularly a web guy historically, but when I retired I did
some pro-bono website development for non-profits. One I did six
years ago has had some reported praise and after all this time of
course needs to be redone so I am hanging around a bit looking at
django. Doing this sort of th
On Sun, Dec 19, 2010 at 8:40 PM, Nate Reed wrote:
> When I try to import my module in the shell I also am unable to import it:
>
> >>> from django.templatetags import mytags
> Traceback (most recent call last):
> File "", line 1, in
> ImportError: cannot import name mytags
> >>> from myapp.temp
Karen, thanks for your reply. The module myapp/templatetags does
have an __init__.py file. There is no __init__.pyc file, though.
n...@nate-desktop:~/work/django-projects/myproject/myapp$ ls templatetags/
mytags.py __init.py__
On Sun, Dec 19, 2010 at 8:59 PM, Karen Tracey wrote:
> On Sun, De
My mistake. There was a small typo. It was called __init.py__, not
__init__.py. I fixed it and it works now.
Thanks,
Nate
On Sun, Dec 19, 2010 at 9:20 PM, Nate Reed wrote:
> Karen, thanks for your reply. The module myapp/templatetags does
> have an __init__.py file. There is no __init__.p
Hi
Take a look at this tutorial:
http://www.jansipke.nl/python-soap-client-with-suds
Regards
Bjørn
On 18 Dec., 15:58, Bjørn Høj Jakobsen wrote:
> I would advice you to use the "suds" to create the soap (I presume)
> client.
>
> I spent a lot of time trying to get the ZSI to work but got stuck
Uh - that would be Django Admin ... an app that allows users to add/
delete/update (and search) records.
http://docs.djangoproject.com/en/dev/ref/contrib/admin/
On Dec 19, 2:45 am, Len Conrad wrote:
> phpmyadmin and other such mysql db design/maintain tools do too much, too
> complicated.
>
> I'
38 matches
Mail list logo