t; from your .wsgi script
for instance.
Just some brainstorming.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
Y
ent_type table that gives you
problems!) should not end up in your special deatabase.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham&q
e server?
On the server, you need to tell apache (or whatever you're using) to
look in the right directory given your STATIC_URL:
# django-staticfiles: STATIC_URL = '/static_media/'
Alias /static_media/ /path/to/your/collected/static/files/
Reinout
--
Reinout van Re
On 23-08-11 01:31, Jim wrote:
django.db.utils.DatabaseError: no such table: django_content_type
Which django version, btw? Early 1.2 beta versions had a bug:
https://code.djangoproject.com/ticket/12999
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein
out
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are subscribed to the Google Groups &qu
all getting the right js/css out of the box.
Handy!
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this mess
I don't know if that also works for
items dragged from outside the browser window.
But get step 1 working first. Step 2 will need that functionality in
place to be able to do something :-)
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.
path. I don't see anything that looks like a
virtualenv dir in there, unless it is the /Users/jianbao/pylib at the end.
I personally don't know how wsgi+virtualenv works together (I use
buildout normally). so you'll have to ask around for that.
Reinout
--
Reinout van Ree
docs: syncdb only managed the main default database
by default. You'll have to call syncdb on the second database separately.
Often the second database is an existing one that django shouldn't
touch, that's why the default is that way.
Reinout
--
Reinout van Rees
ving seems worthy of a real note in
the 1.3 changelog. That note isn't there. Is this bad? Or am I missing
something?
- Serving static_url automatically but omitting media_url is a bit
strange if you ask me. Is this a bug?
Reinout
--
Reinout van Reeshttp://reinout.vanre
recommended!)
Nope, that's not it. Staticfiles works fine with runserver and serves
the static_url stuff just fine.
Only, with this 1.3 change django's 1.2's automatic serving of the
media_url stuff has gone the way of the dodo.
Reinout
--
Reinout van Rees
On 25-08-11 12:08, Reinout van Rees wrote:
Two questions:
- "Breaking" automatic media_url serving seems worthy of a real note in
the 1.3 changelog. That note isn't there. Is this bad? Or am I missing
something?
Yes, I am missing something...
It turns out that django-st
way to
bundle css/js with your application. Works like a charm. Look into that
one first.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul
On 27-08-11 17:22, Karen Tracey wrote:
On Thu, Aug 25, 2011 at 7:21 AM, Reinout van Rees mailto:rein...@vanrees.org>> wrote:
Only, with this 1.3 change django's 1.2's automatic serving of the
media_url stuff has gone the way of the dodo.
Django 1.2 never did auto
with an underscore (lizard_ui, lizard_map,
lizard_shape).
The only reason for the dash/underscore difference is that it makes it
easier to spot in which directory you are (the dash is the one with the
setup.py, the underscore is the directory with the code within that
outer-one-with-the
the last value."
Now you know why only the last item gets deleted. It bit my once, too.
What you need to call is request.POST.getlist('del_id'): that will give
you the list you're expecting.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@
with label
vip_mobile could not be found
Try "manage.py test data". Django doesn't really like those
dot-separated namespace packages, sadly. Only the last part is used.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http:
think of right now:
You mis-typed something in your urls.py. I'd expect there to be a
"polls.view" in there instead of the customary "polls.views...", so
with an 's'.
The module is "views.py", not "view.py".
Just guessing...
probably tell your
webserver to immediately tell visitors to those specific pages that the
page is gone (apache rewriterule, for instance, with a "410 GONE" response).
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://w
d. Why doesn't it
show up? You probably forgot to add it to your INSTALLED_APPS list in
your settings.py. At least, that happened to me a few times. "I can
import it, why doesn't it work?!?"
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...
Perhaps two months ago an OS update also updated the python version? So
that the default /usr/bin/python isn't the same anymore as the version
with the fact.pth in its site-packages folder?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.or
On 01-09-11 15:11, vanderkerkoff wrote:
Thanks for trying though, I will find the problem, eventually:-)
Can you specify "it stopped working" a bit, btw? Do you get a traceback,
for instance?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@v
current URL, |polls/1/|, didn't match any of these.
Such a "^polls/ ^polls/$" regex is incorrect. What's the extra
"^polls/ " doing in front of the actual regex? That's the cause of your
error, I think.
Reinout
--
Reinout van Rees
-c "import sys;print sys.path"
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message becau
t weeks as it didn't
seem to run :-)
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because y
pes. You
might need to add explicit type casts.
Anyone have any advice or ideas?
It seems you haven't installed the postgis database extras into your
postgres database. It depends on your OS how you have to do that.
Reinout
--
Reinout van Reeshttp://reinout.vanr
ories loader is the one that you ought to use most of the
time, so that's good.
What's not good is that apparently only the admin's templates are found.
Is your "polls" app a real app? Is it in your settings.py's
INSTALLED_APPS list?
Reinout
--
Reino
django 1.3,
but available separate for earlier django versions).
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You recei
dlewar such as
http://djangosnippets.org/snippets/421/ . I've used that one for almost
a year. Works like a charm.
But... hurray for django 1.3 for including it in the regular python
logging :-)
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@van
atches all messages, including the ones to the
django.something.error logger.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham&qu
e's an easy solution, mayhap it suggests improvements to the
generic choicefield?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Gra
??
Your get_absolute_url() returns a tuple instead of a url.
You forgot to call reverse():
from django.core.urlresolvers import reverse
...
def get_absolute_url(self):
return reverse('article_detail', (), { 'year':
^^^
ink. So you probably have a start page that lists the
categories and then a category page that lists the items.
A 404 on /non/existing leads people to try /non/ which would also 404.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org
ation / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://localhost:11000;
}
}
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org h
list
than Django's build-in apps?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message becaus
? Depends on how you want to edit.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you ar
"keep forever" option?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are s
three specific values:
Vote.objects.filter(thing=carrot).values_list('thing', 'context', 'vote)
See
https://docs.djangoproject.com/en/1.3/ref/models/querysets/#values-list
for how that last trick works.
Something like that?
Reinout
--
Reinout van Rees
syncdb (it will now contain the
foreign key column).
- Use south for database migrations.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something
arrot).values_list('thing', 'context', 'vote)
should return a list of those lists.
What do you get with a plain Vote.objects.filter(thing=carrot) ?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen
r template.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are subscribed to the Goo
) and modules named
companyname_product (with an underscore).
- You still have the companyname prefix.
- You get the full "companyname_product" in INSTALLED_APPS.
- You visually see the difference between the package dir and the python
module dir.
Reinout
--
Reinout van R
On 06-12-11 06:40, Md,Mehedi Hasan Kabir(Tanim) wrote:
Can anyone give me some suggestion/link for Django E-Commerce Framework?
No personal experience, but the one I see mentioned most often: django
lightning fast shop. http://www.getlfs.com/
Reinout
--
Reinout van Rees
not with a Django query).
In case you want all contexts, you'll have to query for those
specifically. And afterwards grab the results belonging to that context.
So you won't escape a for loop and some manual work, I'm afraid.
Reinout
--
Reinout van Reesht
#x27; and user='Me'
There still might be a way to do it with the ORM; but you can definitely
use raw sql for this.
Till two years ago I didn't touch an sql database for 8 years as I used
zope's luxurious python object database :-) So I'm happily proven wrong
in what
at is the structure
of my files , what to upload ?
mod_python is very outdated and unmaintained for years. Almost everyone
uses wsgi (for apache: mod_wsgi) nowadays. Look a bit at the django
documentation to get an idea.
Reinout
--
Reinout van Reeshttp://reinout.vanrees
documentation or help on this topic if anyone has already
developed in this way
See Tom Evans' reply to your previous email. Your question is way too
broad to give a meaningful answer. You'll have to give us more information.
Reinout
--
Reinout van Rees
times at the top. The last
"from mysite.books import views" is winning :-) You cannot have one
variable point to several things at the same time.
Best thing you can do:
import mysite.contact.views
import mysite.books.views
...
(r'^contact/$', mysite.contact.
ide variables by accident that way.
Better to explicitly import what you need.
In this case the problem was that the original poster imported 'view' a
few times from different places. Doing a "*" import would only make that
problem worse :-)
Reinout
--
Reinout van Rees
t article give you enough hints?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are
Alternative is to upload it to youtube/smugmug/whatever and to just
store a URL in your model, pointing at the correct embed URL.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're
don't have a meaning iirc, but %d means
"render as an integer".). So I'd expect an "TypeError: not enough
arguments for format string".
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuur
the info from those files all the time seems a bit
wasteful: use some low-level django caching and you'll be fine again.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not
s normally impossible. You must have removed something by hand?
Could you look inside the bin/django script? It ought to have a
"sys.path" list in there that shows you where it thinks it can find the
djangorecipe. Make sure it is still there.
Or re-run your buildout, for instance.
Reinout
t enviroment
variable to your settings file pre-set.
So: "bin/django shell".
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul
e
/static/js/libs/modernizr-2.0.min.js
So it is all relative to main.js and it somehow has a | and some number
behind it.
I think you've mis-configured something with that django-mediagenerator
you mention. (or django-mediagenerator is defective, I don't know as I
haven
e latest Django doesn't have this requirement, btw.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this
that takes care of including the csrf token:
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do,
ifferent libraries.
I'd try looking at /usr/lib/pymodules/python2.6/django and figure out
which Django version that is. And if python 2.6 is the same one as was
running before.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http:
dict:
... print my_dict[key]
aaa
bbb
In your case:
{% for itm in somevalue | dic_filter %}
{{ somevalue.itm }}
{% endfor %}
(And I'd replace 'itm' with 'key')
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org
views.
Am I wrong in thinking that the word "generic" is just bad PR (or
unclear documentation)?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, mak
, include('django.contrib.admindocs.urls')),
Did you add 'django.contrib.admindocs' to your INSTALLED_APPS list? Just
to make sure.
And if that doesn't fix it, could you post the traceback? It might
contain hints where it goes wrong.
Reinout
--
Reinout van Rees
use named variables, so
/(?P.*)/
instead of
//
(unless you meant that already in your shorthand form, of course).
The view function then can have keyword arguments:
def search_view(request, country=None, city=None)
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rei
then get a longer url, like
/city/milan
This makes the city-only scenario distinguishable from something that's
a county+city combination. That way your regular urls stay nice and
short. Best of both ways?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein
rule is that most processing should happen in python code,
not in your template.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graha
combination with django? Django can spew out json just fine of
course, but it'll have to relinquish a lot of control to the browser.
And it'll be more "spitting out json" than "using templates".
Reinout
--
Reinout van Reeshttp://reinout.va
thing like that.
In the last part of the traceback that you get, could you click open
that "local vars" triangle button? It might show you what 'pattern' or
'self.url_patterns' is. Perhaps that helps you spot what's wrong?
Alternatively, post your entire urls.
such a website, the most
important parts of the site are not in well-testable python code, but in
relatively harder to test javascript code.
(On the other hand, a colleague told me that with extjs you have write
relatively few lines of javascript: extjs does a lot out ouf the box
turn your code into a python package. Which means
"add a setup.py". Then install that package with pip, too, and you don't
have to do anything with your python path manually.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org
metimes there's a bit of a difference in the query language, but the
generic idea is the same.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make some
k queue and continue
with your form submission. Behind the scenes, celery will take care of
your task.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make some
ster.
I don't know from experience, though, *if* it is faster.
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You re
On 15-08-11 11:01, Andre Lopes wrote:
My question. There are others Apps I can research to take a decision
on what App should I use?
A handy list:
http://djangopackages.com/grids/g/authentication/
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein
g "yourproject.admin" from "manage.py shell"?
Reinout
--
Reinout van Reeshttp://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You receive
101 - 174 of 174 matches
Mail list logo