t;
>
> Cheers
>
> tom
>
> >
>
Take a look at formsets:
http://docs.djangoproject.com/en/dev/topics/forms/formsets/
Alex
--
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highes
Hi,
I have many applications in my project. I've carefully translated them
launching manage.py makemessages from within each application
directory, so that each app has its own locale/ directory with
translations.
When it comes to translating project-level strings, and I launch
makemessages from
#x27;]
>
>
>>
>> But both functions returns (None). Why I can do it?
>>
>>
>
>
> >
>
You can't have methods with the same names as fields on your models,
since this would mean an object having two attributes by the same
name.
Alex
--
"I disa
cache which is holding all the rows
> retrieved by the query. Is there any way to turn this cache off? Looking
> at the code leads me to think no, but I thought I'd ask.
>
> -sam
>
>
> >
>
Instead of iterating over the QuerySet itself, use
QuerySet.iterator(), this
On Thu, Aug 27, 2009 at 5:56 PM, Sam Tregar wrote:
> On Thu, Aug 27, 2009 at 5:47 PM, Alex Gaynor wrote:
>>
>> Instead of iterating over the QuerySet itself, use
>> QuerySet.iterator(), this will avoid populating the result cache.
>
> Thanks, works great! This would
You'll have to set something in a table and run a cron to send it
later. Django-mailer [1] has all of this set up for, along with some
other cool features. I've used it in a project before and been happy
with it.
[1] http://code.google.com/p/django-mailer/
On Aug 28, 1:10 am, Shadow wrote:
> Hi
You'll probably want to look into something like this:
http://www.djangosnippets.org/snippets/880/
It allows you to set some urls to redirect so they are always https.
Otherwise those silly users will go to credit card pages without
https.
On Aug 29, 1:04 am, Vitaly Babiy wrote:
> Hey guys,
> W
> return super(HtmlField, self).formfield(**kwargs)
>
> def __init__(self, *args, **kwargs):
> super(HtmlField, self).__init__(*args, **kwargs)
>
>
> >
>
The biggest thing is there is no need to rewrite the __init__ method
if you aren't chang
Also, maybe you aren't submitting all the code, but you could do the
same thing by just passing an attrs dictionary to the text area
widget.
http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs
Not sure that this requires two more classes.
Hope that helps,
gt; (r'^admin/', include(admin.site.urls)),
> (r'^articles/', include('oslaurier.articles.urls')),
> )
>
> --
>
> I noticed that for some reaso
> do this with the Django ORM.
>
> Thanks for any thoughts on this,
>
> Stephen
> >
>
LinkBack.objects.values_list('target_url', flat=True).distinct()
should do what you want.
Alex
--
"I disapprove of what you say, but I will defend to the death your
right to
;field2')
>
> For some reason, I can't get field2 removed from the subclassed form.
> If I subclass AnotherForm from ModelForm, field2 will be removed, but
> then I lose all my customizations from MyForm...
> >
>
The answer is you don't. You change the inheritanc
First, if you aren't running into db performance problems, I wouldn't
optimize. Keep everything as simple as possible, then optimize the
parts that actually demonstrate themselves to be a performance issue.
If this really is a performance issue, you could solve it like this:
If you know that you
tally
going to http://mysite/credit_card_form/ will be redirected to https://
I'm guessing that overriding the wsgi.url_scheme is meant to handle
that, but I don't understand how.
Thanks,
Alex
On Aug 31, 6:02 pm, Graham Dumpleton
wrote:
> On Sep 1, 3:39 am, Francis wrote:
>
I guess the question is when you know the additional keyword argument.
If you already know what that extra keyword is when you are
constructing the form list, you could use a partial[1] to put in the
arguments you know already. Partials are python 2.5+ only, you can use
a lambda instead if you are
class Dek(models.Model):
> ank = models.ManyToManyField(Ank)
>
> How come I got "NameError: name 'Dek' is not defined" when running
> runserver
>
>
>
> >
>
Take a look at:
http://docs.djangoproject.com/en/dev/ref/models/fields/#lazy-relationships
Alex
call .iterator() on the QuerySet and it will hvae it's cache disabled.
Alex
--
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be sim
You might look at http://sandbox.pocoo.org/clevercss/, which is python
based.
On Sep 8, 9:19 am, ThinRhino wrote:
> Hello,
>
> I just came across haml and sass, but looks like it is built for Ruby on
> Rails.
>
> Any implementation that can work on Django?
>
> Though I also came acrosshttp://bit
nces:
> >
> > http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-sav...
> >
> > -- dz
> >
> > On Tue, Mar 24, 2009 at 3:21 PM, Theme Park Photo, LLC
> >
> > wrote:
> >
> > > Error fields were all empty. I checked methods non_field_erro
On Tue, Mar 24, 2009 at 8:15 PM, Michael Glassford wrote:
>
> Alex Gaynor wrote:
> >
> >
> > On Tue, Mar 24, 2009 at 2:51 PM, Michael Glassford wrote:
> >
> >
> > Alex Gaynor wrote:
> > >
> > >
> > > On Tue
oesn't have a public API for mulitple
databases so it could be harder, but there is both private APIs and external
tools like PgPool.
However, what's the real question you're trying to answer? 100% of websites
don't get traffic that approaches facebook.
Alex
--
"I disap
On Wed, Mar 25, 2009 at 12:43 AM, Adam V. wrote:
>
> Curse (http://www.curse.com/) manages to stay up on WoW patch day, so
> that's a pretty good sign.
>
> >
>
Curse is no longer running on Django(it's ASP.net now I think), no idea if
that was a technical
On Wed, Mar 25, 2009 at 1:06 AM, Graham Dumpleton <
graham.dumple...@gmail.com> wrote:
>
>
>
> On Mar 25, 3:45 pm, Alex Gaynor wrote:
> > On Wed, Mar 25, 2009 at 12:43 AM, Adam V. wrote:
> >
> > > Curse (http://www.curse.com/) manages to stay up on WoW p
You don't pass request.FILES to form constructor [1]
[1]:
http://docs.djangoproject.com/en/dev/ref/forms/api/#binding-uploaded-files-to-a-form
On Wed, Mar 25, 2009 at 3:45 PM, Oli Warner wrote:
>
> I'm having a massive headache. I have a Model called companies with
> vaious fields but for one
useful if you could write it up so it's not forgotten.
>>
>> Karen
>>
>
> --
> João Olavo Baião de Vasconcelos
> Bacharel em Ciência da Computação
> Analista de Sistemas - Infraestrutura
> joaoolavo.wordpress.com
>
> >
>
I've closed this as a d
t; Thanks
>
> Andrew
> >
>
Well, you've only put a snippet there, but this is just python so if you
have a syntax error you diagnose it as normal, but I suspect you're missing
the ':' at the end of the line.
Alex
--
"I disapprove of what you say, but I wi
from before the 1.0, when many new
features had gone in. For now, unless you need a specific feature from the
beta, I would reccomend just using 1.0.2.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is
tity mapper isn't appropriate for Django.
2) This one is less clear, and I don't know that there's any consensus
however it's possible to use external connection poolers with Django(like
PgPool).
Alex
--
"I disapprove o
winner, ruling by fiat is
generally not the conflict resolution strategy for the core devs, so none of
them would be included until there is a clear winner.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it.&q
gt;
>
Well there have been external Django application that do schema evolution
for quite some time, what there hasn't been is a consensus on how it should
look, so until we have them including anything in Django would therefore
disappoint a decent percentage of the community.
Alex
--
&quo
net-and-in-cloud.html
>>>
>>> adi
>>>
>>>
>>>
>>
>>
>> --
>> If you spin an oriental man, does he become disoriented?
>> (-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu
&g
le from what already exists?
>
> Thanks!
>
> >
>
You should be able to do it by overiding the get_formsets method on the
ModelAdmin:
http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/options.py#L357
Alex
--
"I disapprove of what you say, but I will defe
ot;src=..." to reach this .js-File.
> Problem of not enough understanding of Djangos-URL-Structure.
>
> Please -give me some hints.
>
> And I know about {% include %} - Tag.
>
> Thx
> Timothy
> >
> Take a look at this:
http://docs.djangoproject.com/en/dev/how
ard referencing ? how do I solve it ?
>
> Thx/Mahesh.
>
>
> >
>
To do references to the same model you do ManyToManyField('self').
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people
On Sat, Mar 28, 2009 at 10:14 PM, mahesh wrote:
>
> Hi Alex,
>
> Solution given by by as worked :) However I wonder how come 'self'
> worked against self (without quotes)
>
> Thank You
> -Mahesh/
>
> On Mar 28, 8:57 pm, Alex Gaynor wrote:
> > O
; >
> > > def queryset_only(self):
> > > i = len(self)
> > > if i == 0:
> > >return None
> > > elif i > 1:
> > >raise Exception("More than one element in this querySet!!")
> > > else:
> > >return
n Tracey wrote:
> > I think you missed get_or_create:
> >
> > http://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-cre...
> >
> > Karen
>
> Alex,
>
> The problem with that is that it's not DRY enough for my taste. Before
> doing that, I
ter|module:10 %}
>
>{% endif %}
>
> Regards,
> Malcolm
>
>
> >
>
Or you can just use the builtin divisibleby filter(basically the same way as
malcolm's minus the negation).
Alex
--
"I disapprove of what you say, but I will defend to the
2009/3/31 ketu.lai
>
> hii want to compare numeric in template. just like less than,greater than
> etc. and how can i do? or other solutions?
> --
> 有没有听过盲人摸象的故事,没有的话大神说给你听!
>
> >
>
Take a look at django-template-utils which has templatetags for all these
things.
Alex
f apache_mod_python:
> do this
>
> Thanks for any hints...
> Ross.
>
>
> >
>
Not that I can think of, your best bet is probably to have a CURRENT_ENVIRON
settings or something that you just set locally to whatever the current
evniroment is(there are tons of articles on d
quot; there's been a lot of
discussion on it and I don't want to repeat it all :) If you have any
questions after reading that feel free to follow up.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people'
o pode
> pertencer a uma subcategoria de si própria. Seleccione Categoria Pai
> diferente.')
> return self.cleaned_data
>
> Help?
>
> >
>
First call the parent class's clean method, then do your own validation.
Alex
--
"I disapprove of what you
On Tue, Mar 31, 2009 at 11:01 PM, Ricardob wrote:
>
> I'm sorry if this is too basic, just starting on django.
>
> How do I call the default clean method? Am I not overriding it by
> defining on ModelForm?
>
> On Apr 1, 3:35 am, Alex Gaynor wrote:
> > On Tue, M
POST:
> st = ""
> for x in request.POST['stat]':
> st = st + x -> same result
> "B" and not "123AB"
>
> How can I get the whole list/string to save it in my database?
>
> Thx
>
nt. Django itself does not provide any
> > localisation of database content. Maybe one day, but not today.
> >
> > Regards,
> > Malcolm
> >
>
Nope, django doesn't handle i18n for any string stored in the DB, there are
a couple of external projects that do it though.
!!!
>
> i don't know exactly what is wrong , which display this error :
>
> " Caught an exception while rendering: The +attribute has no file
> associated with it. "
>
> Any help !
>
> Regards
>
>
> >
>
Are you properly setting the enctype on the HT
On Thu, Apr 2, 2009 at 10:36 AM, Zeal wrote:
>
> Hi, All,
>
[skip]
>
> Does every body know this issue and know how to solve it? Your any
> suggestion or solution will be highly appreciated!
>
> Regards,
>
> Zeal
>
Documentation knows [1]
[1]: http://docs.djangoproject.com/en/dev/ref/models/que
s
> >
>
Yes, the OneToOneField is still the prefered way to extend the user model,
the issue with select related is the subjct of ticket #7270.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the
Have you changed your `Site` model entry to the proper port number?
On Fri, Apr 3, 2009 at 2:23 AM, John Baker wrote:
>
> I have a strange problem with simple RSS feeds. It works fine locally
> on my development machine but when I deploy to the test server running
> through mod_python on port :8
I can't find something similar in django.
>>
>>
>>
>
> >
>
Also take a look at the django-debug-toolbar(on github), it has a panel for
seeing what SQL queries were excecuted(and abut a dozen other things).
Alex
--
"I disapprove of what you say, but I will de
aphorically, that is).
> >
>
2 things. One the get_object_or_404 isn't necessary since request.user is
already the user object, there's no need to query for it again. Second the
reason you always get an INSERT is that you are constructing a new object,
perhaps you should
Hi,
I'm developing a simple site which has 2 basic models: Article and
StaticPage (not using flatpages since i have some custom fields
attached).
Now, I need to create a search form which should search among both
articles and static pages and return the list of matches. I'd like
very much to retu
/', include(admin.site.urls)),
> What can i do? Please help me.
>
> >
>
what version of Django are you running? If you're using 1.0.X you should
1.0.X docs, not the development version docs.
Alex
--
"I disapprove of what you say, but I will defend to the death your rig
On Fri, Apr 3, 2009 at 4:59 PM, Rosemarie Loewe wrote:
> Hi Alex,
>
>
>
> I had the same problem, it must be an error in tutorial. Following works:
>
>
>
> (r'^admin/', include(admin.site.root)),
>
>
>
>
>
> Best Regards
>
> Rose
#x27;, 'content.views.page'),
>
> If i leave of the arg, then it won't match when this is
> present. Are you supposed to have a url line for every single thing
> you want to do to an object?
> >
>
That's how I do it, since I have separate view functions for ea
t's
> some way off into the future. There's pretty much always a workaround or
> better solution.
>
> Regards,
> Malcolm
>
>
>
> >
>
A lazy reverse shouldn't be too difficult to implement in your own code
though:
from django.utils.functional impor
On Fri, Apr 3, 2009 at 9:13 PM, atik wrote:
>
> Thanks both of you.
> @Rosemarie
> It doesn't work.
> @Alex
> I use the latest stable version 1.0.2. Plz do something so i can do it
> successfully.
> I have trying this tutorial
> http://docs.djangoproject.co
On Fri, Apr 3, 2009 at 9:32 PM, Malcolm Tredinnick wrote:
>
> On Fri, 2009-04-03 at 21:07 -0400, Alex Gaynor wrote:
> [...]
> > A lazy reverse shouldn't be too difficult to implement in your own
> > code though:
> >
> > from django.utils.functional impor
THANK YOU SO MUCH. Saved me a lot of time and frustration.
On Feb 8, 6:46 pm, Technicalbard wrote:
> If you are looking for this, I compiled it using MSVC++2008 Express,
> against MySQL 5.0.67 using Python2.6and theMySQLdb1.2.2 source:
>
> http://www.technicalbard.com/files/MySQL-python-1.2.2.wi
y
> -rw-r--r-- 1 xxx xxx 546 2009-04-04 13:31 manage.py
> -rw-r--r-- 1 xxx xxx 2765 2009-04-04 13:31 settings.py
> -rw-r--r-- 1 xxx xxx 529 2009-04-04 13:31 urls.py
> x...@xxx:~/Django/p2$
>
> Doest matter if i run it with sudo rights or not.
>
> Alan
>
> >
>
You
On Sat, Apr 4, 2009 at 3:47 PM, JGAllen23 wrote:
>
> Is there any way to have cascading select boxes in the admin app? The
> second select box depends on what was chosen in the first.
> >
>
There's no automated way to do this, you'd need to write some of your own
ja
? Can i
> validate thee data in the view and manually set the form field errors?
>
> Paddy
>
> >
>
Take a look at number 2 here:
http://collingrady.wordpress.com/2008/07/24/useful-form-tricks-in-django/
basically you'll just store user on your form object and then you can
tools and
> > some undisclosed black magic?
> >
> > AEP has two sample blogs but truthfully they look pretty primitive.
> >
> > What am I missing?
> >
>
Yes, you can absolutely create a views.py that isn't in a application, views
are just python funct
Traceback (most recent call last):
> File "manage.py", line 2, in
>from django.core.management import execute_manager
> ImportError: No module named django.core.management
>
> How can I find the right python version to call? Maybe I can take it
> from PYTHONPATH? If yes, where c
;
> File "I:\Python26\lib\site-packages\django\utils\encoding.py", line
> 70, in force_unicode
>raise DjangoUnicodeDecodeError(s, *e.args)
>
> DjangoUnicodeDecodeError: 'utf8' codec can't decode bytes in position
> 11-12: invalid data. You passed in Datab
n your URLconf. You need to make sure
you have the URLs from both parts in your URLconf.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~--
el and
> perhaps im phrasing the question both wrong here and in my searches,
> because i have not been able to find answer in groups or web.
>
> Alan
> >
>
Your issue here is `lpl` is a QuerySet, not a lang object, when you want
more than one object you use .filter and then iterate
do is combine these into one urlpattern:
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P\d+)/$', 'mysite.polls.view
On Sun, Apr 5, 2009 at 3:30 PM, zayatzz wrote:
>
> Okay.. the problem was what i suspected, but i thought, that if i
> filter the results and get object by its id, then it would be ok,
> since im getting single object.
>
> Alan.
>
> On Apr 5, 10:25 pm, Alex Gaynor wrote:
ocumentation:
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/
http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people
ing said I personally like jQuery because of its simple API.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You re
if so
you're installation wasn't successful.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You r
27;, '__path__',
> > > 'models']
> >
> > > ???
> >
> > That's the result I get if my PYTHONPATH is pointing to a 0.96.x version
> of
> > Django.
> >
> > Karen
> >
>
There is no Django .97, presumably you mean some S
g the other context_processors - since I would not have hit it
> otherwise.
>
> >
>
It's probably easier for you to just write a custom inclusion tag that
renders the nav.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it."
27;module' object has no attribute 'Textarea'
>
> I have tried a few variations but with no luck,
>
> Any ideas ?
>
> Thanks in advance
> >
>
Those are par tof the Django forms library, not the models library, so it
should look like:
from django import forms
>enquiry_date = models.DateTimeField(auto_now_add=True)
>replied = models.BooleanField(default=False)
>def __unicode__(self):
>return self.name
>
> class ContactForm(ModelForm):
>class Meta:
>model = ContactEnquiry
>exclude = ('r
gt; On Apr 6, 7:04 pm, atik wrote:
> > Is there any free hosting site that provide django support?
> >
>
http://djangofriendly.com/hosts/ has reviews for most hosts on Django
support. I doubt very much you will find any free Django hosts.
Alex
--
"I disapprove of what you s
believe in God the chances are your God is too small.
>
> Read my blog: http://joshuajava.wordpress.com/
> Follow me on twitter: http://twitter.com/jpartogi
>
> >
>
There is no other central board that I'm aware of. However anyplace that
lists job postings could have a D
On Tue, Apr 7, 2009 at 11:53 AM, sandravigo wrote:
>
> Hello, I want to know how I can to declarate multiple primary key in
> my model
> >
>
Django doens't support multiple column primary keys. This is the subject of
ticket #373 in Django's trac.
Alex
--
"I
;
> What are they talking about?
>
> >
>
It's relative to wherever you installed Django itself. If you aren't sure
where django is intalled on your system(perhaps a package manager installed
it) you can do import django; django.__file__ which shows the __init__ file
in the dj
27;. My biggest need right now is to get
> an ALTER TABLE generator.
>
> Please let me know if one exists.
>
> Thanks,
> Adam
> >
>
There are several projects for schema evolution, the 2 most popular are
Django-evolution and South.
Alex
--
"I disapprove of what you say,
g(obj)
>
> ... and my RAM usage was below 30 MB at all time.
>
You also executed 350k SQL queries. A better idea would be to start with:
for obj in Model.objects.all().iterator():
do_something(obj)
>
> > Maybe it's getting late and I deserve a nice gin and tonic...
>
ddocs#object-toolsexplains
how to get them there(the part of the page that warns this is no
longer applicable, isn't applicable for this).
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the hi
question
so we can give you better advice.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero
--~--~-~--~~~---~--~~
You received this messa
ning on Linux Fedora 10 X84_64. Please help. Thanks...
>
> >
>
Those refer to the 1.1(dev version now) and beyond way of hooking up admin
urls. Consult the Django 1.0 docs for how to hook up the urls(everything
else is the same).
Alex
--
"I disapprove of what you say, but I will d
ts of
erroneous tickets are filed), as SmilyChris notes it really just needs a
docs fix, because the only other alternative is a bunch of try except blocks
which is both unreasonable, and as Malcolm has stated really indicates that
you should be using a different field type.
Flup is just a proxy library between your Django project and
web-server. It is communicating with web-server through FastCGI
protocol. So you cannot just start FastCGI daemon and visit you
project with browser. To work properly you must set up your
web-server's FastCGI capabilities and direct it t
t;
> Yes, of course I can write it. But isn't a framework supposed to
> relieve us from such a boilerplate code?
> Especially that it was in the framework already. Strange...
>
> Regards
> MS
>
> >
>
Take a look at the values() method on a queryset:
http://docs.d
tion differently under mod_python?
>
> The apache2 error_log only had something about "server reached
> MaxClients setting, consider raising the MaxClients setting."
>
>
> >
>
Where exactly do you have this code? The issue is that this code might be
getting excecuted
rySet with results from multiple models.
What you want to do is best approximated like this:
from itertools import chain
sorted(chain(Model1.obejcts.all(), Model2.objects.all()), key=lambda o:
o.pub_date)
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
say it.
On Fri, Apr 10, 2009 at 7:40 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Fri, 2009-04-10 at 16:44 -0400, Alex Gaynor wrote:
> >
> >
> > On Fri, Apr 10, 2009 at 4:40 PM, veearrsix
> > wrote:
> >
> > This question
On Fri, Apr 10, 2009 at 7:52 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Fri, 2009-04-10 at 19:44 -0400, Alex Gaynor wrote:
> >
> >
> > On Fri, Apr 10, 2009 at 7:40 PM, Malcolm Tredinnick
> > wrote:
> [...]
> >
> >
27;2009-01-01'
> ).filter(mydate__lte='2009-01-31')
> --
> regards
> kg
> http://lawgon.livejournal.com
>
> >
>
You can also do mydate__range=(datetime_obj1, datetime_obj2).
Alex
--
"I disapprove of what you say, but I will defen
There is no such capabilities.
Write your own set of decorators that will be path response object
with needed mimetype - almost DRY solution.
On Sat, Apr 11, 2009 at 10:40 AM, Roman Timushev wrote:
>
> Hello,
>
> My application serves content with different mimetypes: 'application/
> xhtml+xml'
return get_resolver(urlconf).resolve(path)
>
> File "/var/lib/python-support/python2.6/django/core/urlresolvers.py",
> line 179, in resolve
> for pattern in self.urlconf_module.urlpatterns:
>
> AttributeError: 'module' object has no attribute 'urlpattern
ce in those cases.
>
> Regards,
> Malcolm
>
>
> >
>
Even if your application is exclusively for your own usage, it's not
uncommon for the pointy haired boss to come in with requests to change a URL
hierarchy, and there's no reason to create more work for yourself.
A
On Sat, Apr 11, 2009 at 7:24 PM, Malcolm Tredinnick <
malc...@pointy-stick.com> wrote:
>
> On Sat, 2009-04-11 at 19:23 -0400, Alex Gaynor wrote:
> [...]
> >
> >
> > Even if your application is exclusively for your own usage, it's not
> > uncommo
>
As the error message indicates(sort of), the only things that can be put in
request.session are things that can be pickled, most things in Django itself
can be(things like Querysets). When you have your own objects(or other 3rd
party libs) you'll have to make sure those objs can be pickl
On Sun, Apr 12, 2009 at 2:38 AM, ydjango wrote:
>
> How do I find which version of django I have on my server?
> >
>
import django; print django.VERSION
That should have a tuple with the version info.
Alex
--
"I disapprove of what you say, but I will defend to the death
lse Django has a easy solution
> to it.
> >
>
Take a look at django-timezones:
http://code.google.com/p/django-timezones/which uses the pytz module
for this.
Alex
--
"I disapprove of what you say, but I will defend to the death your right to
801 - 900 of 1902 matches
Mail list logo