On Thu, 2009-04-16 at 18:20 -0700, Thierry wrote:
> Let's say I have a list of words in my database:
>
> ['bbb', 'aaa', 'zzz', 'ddd']
>
> How can I retrieve a list of the above excluding the following words
> ['aaa', 'zzz'] by using __in? I can do the above with:
>
>words_list = Words.obje
On Wed, 2009-04-15 at 15:42 -0700, Eddified wrote:
> Are there up-to-date java-doc style api docs like this:
> http://djangoapi.matee.net/
> anywhere on the official django site? I've looked high and low and
> can't find it...
No. They don't exist there. Intentionally.
If anybody wants that sor
This doesn't seem to have been resolved at all, so a couple of questions
that might help things out...
On Tue, 2009-04-14 at 19:06 -0700, Emma F wrote:
> I feel like there must be something very elementary that I'm missing
> here, but I've been all through the documentation and can't figure it
>
On Fri, 2009-04-24 at 13:21 -0700, bshaurette wrote:
[...]
> My preference would be just to add an 'id' column to the table, but
> we're trying to keep db changes to a minimum (changing one means
> changing the same table in at least a dozen more - not optimal, but it
> is what it is). Without i
On Mon, 2009-04-13 at 01:39 -0700, Iqbal Abdullah wrote:
> Thanks Alex and matehat,
>
> Concerning this issue of mine, I've decided to remove the images and
> save the objects without the ImagingCore in them, which fixed the
> whole thing.
>
> On a different note, other than actively testing dat
On Sat, 2009-04-18 at 21:22 -0700, meppum wrote:
> I noticed that there is a unique constraint and maybe that infers an
> index, but if it doesn't, why isn't an index on this column needed?
The unique constraint does provide an index. Otherwise inserts would be
very inefficient for the database,
On Thu, 2009-04-16 at 00:01 -0700, Margie wrote:
> Ah - ok, cool, good to know. I am on 1.1 pre-alpha SVN-9814.
Hmm .. then maybe there's an actual problem there. The ability to use
nested querysets was added in r9701 (with a few bug fixes in subsequent
patches). I only said 1.1-beta as a rough
On Wed, 2009-04-15 at 23:13 -0700, Margie wrote:
[...]
> # PROBLEM IS HERE
> # Find all pdtasks that have an entry in tiles that is in slice 0:4 of
> Tile.objects.all()
> # I think this should return bar as well, but it returns an empty
> list. WHY???
> (Pdb) PdTask.objects.filter(tiles__in=Tile.
On Sun, 2009-04-12 at 20:41 -0700, Sean Neilan wrote:
> I'm building a large web application & I'm trying to figure out ways
> to organize my business logic (just the queries). I figure I should
> either put all my queries inside Model functions or ModelManager
> functions. I've searched all over
On Sun, 2009-04-12 at 17:22 -0700, Joshua Partogi wrote:
> Thanks Malcolm,
>
> What I'm looking after is sending my custom validation error message
> that is not covered by django.
But what does this mean? How is it different from passing any other
piece of information to a template via the cont
On Sun, 2009-04-12 at 17:15 -0700, ydjango wrote:
> What is the best way to provide multiple Time zone support?
>
> The registered user visiting the website should see all times and
> dates as per his/her time zone and not as per time zone in
> settings.py?
If I were doing this, I'd create a tem
On Sun, 2009-04-12 at 14:06 -0700, jrs_66 wrote:
[...]
> On a broader level, is Django's ORM intended for people who don't know
> how to write SQL? It seems that many hoops have to be jumped through
> to get basic SQL results...
I think that impression is probably only because you're still learn
On Sun, 2009-04-12 at 06:39 -0700, Continuation wrote:
> I can't find any info on that in the doc.
>
> Does that mean DB connections are not reused? If so, why? Seeing how
> establishing DB connection is a pretty expensive operation I'd think
> it makes sense to reuse them.
One connection per re
On Sun, 2009-04-12 at 23:37 +1000, Joshua Partogi wrote:
> Dear all,
>
> I want to send and display validation error message from the view to
> the template, how do I do this in Django? I tried searching on the
> documents but could not find any topics on error message. Could anyone
> give me a h
On Sun, 2009-04-12 at 00:40 -0700, Margie wrote:
[...]
> Let's say that my Publisher and Book classes are in one app, and that
> app doesn't know anything about the readers. Is there any simple way
> to find all related object fields that point to book and clear them
> out, without having to know
On Sat, 2009-04-11 at 23:29 -0700, Margie wrote:
> I am having some trouble with the deletion of related objects that are
> multiple levels away from the object being deleted. I've read a bunch
> of stuff written on deletion of related objects, but nothing on this
> particular problem - hoping s
On Sat, 2009-04-11 at 18:56 -0700, nixon66 wrote:
> I have a legacy database that I used inspectdb to create the models.
> I cleaned up the models, set primary keys, foriegn keys etc. But when
> I tried to create a view I get an "unknown column activity.fp_id_id
> in field list". I'm not sure wh
On Sat, 2009-04-11 at 17:40 -0700, adelein wrote:
> Hi Zain,
>
> The thing is that I was able to access the main page before I changed
> the urls.py file, so I think that means that the port isnt being
> blocked. Something to do with the urls.py file is messed up : (
Then go back and try things
On Sat, 2009-04-11 at 17:09 -0700, adelein wrote:
>
> Hi,
>
> Sorry, I meant to say urls.py of course. So, given I did put the code
> in the right file, the problem still remains.
If you're following the tutorial, then you will be running the
development server. So all "server log" style output
On Sat, 2009-04-11 at 21:10 -0300, Marcello Parra wrote:
> Hello Malcom,
>
> Thanks for your help...
> I think of a frontend as the user part of the site... where I will
> provide users pages with proper layout and the admin site, is the one
> provided by django admin where I would manage some ta
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
> 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.
Wh
On Sat, 2009-04-11 at 17:49 -0500, James Bennett wrote:
> On Sat, Apr 11, 2009 at 5:13 PM, codecowboy wrote:
> > I've followed some examples from around the Django community and that
> > is why I use the reverse() method at all. What is the point of using
> > the reverse() method?
>
> Well, the
On Sat, 2009-04-11 at 07:52 -0700, pkenjora wrote:
> Malcom,
Well, I'm not "Malcom" (sic), but I'll reply anyway.
>Google, FaceBook, and LinkedIn have been using email authentication
> for how long now? With the default constraints you've put on Django a
> developer would have to "work arou
On Sat, 2009-04-11 at 12:40 -0700, Kless wrote:
> I would to pluralize into a translation block [1] but I also want to
> apply the 'apnumber' template filter [2]
> ---
> {% load humanize %}
> {% load i18n %}
>
> {% blocktrans count list|apnumber as number %}
> There is {{ number }} object
On Sat, 2009-04-11 at 11:51 -0300, Marcello Parra wrote:
> Hello,
>
> I'm planning a site with django.
> It need to have some functionalities that are very similar to Django's
> admin (like CRUD in some tables, with validations, etc...). But I
> would not like to have two sections (frontend and a
On Sat, 2009-04-11 at 06:09 -0700, nitr...@gmail.com wrote:
> I'm using the pytwitter module written by Niall Sheridan http://www.evil.ie/
[...]
There doesn't seem to be anything Django related in this post. Please
help us keep things on-topic here -- it's high enough volume already.
Regards,
Ma
On Fri, 2009-04-10 at 23:40 -0700, Roman Timushev wrote:
> Hello,
>
> My application serves content with different mimetypes: 'application/
> xhtml+xml', 'application/xml', 'application/json'. Specifying mimetype
> for every view is not DRY. Is it possible to define default mimetype
> for url gro
On Sat, 2009-04-11 at 01:02 -0700, nikita kozlovsky wrote:
> On Apr 11, 3:11 am, Malcolm Tredinnick
> wrote:
>
>
> > Django's SQL is going exactly what you suspect and not using any outer
> > join here. Using a simplified version of the original two models:
On Fri, 2009-04-10 at 21:24 -0700, patrickk wrote:
>
>
> On Apr 11, 6:03 am, Malcolm Tredinnick
> wrote:
> > On Fri, 2009-04-10 at 20:17 -0700, patrickk wrote:
> > > anyone?
> >
> > *sigh* If somebody had an answer, they would have answered already. It
On Fri, 2009-04-10 at 20:17 -0700, patrickk wrote:
> anyone?
*sigh* If somebody had an answer, they would have answered already. It's
kind of self-fulfilling prophecy!
[...]
> >
> > is this intentional? the docs doesn´t explain this and my assumption
> > is that different adminsite instances are
On Fri, 2009-04-10 at 20:36 -0700, nixon66 wrote:
> The meta option is already there. And the myproject_country table is
> still created.
I seem to remember there have been some problems where querying the
existing tables in the database returned them with different casing of
the name to what the
On Fri, 2009-04-10 at 18:15 -0700, chris wrote:
>
>
> On Apr 10, 6:55 pm, Malcolm Tredinnick
> wrote:
>
> > However there could be, and likely are, many TextChar objects with the
> > same edition value, so it would be ambiguous as to which particular
> > o
On Sat, 2009-04-11 at 08:47 +0800, Russell Keith-Magee wrote:
> On Sat, Apr 11, 2009 at 5:53 AM, Poromenos wrote:
> >
> > Hello,
> > I created a model that has a ForeignKey to ContentType, but now I
> > can't use my test fixtures, since the IDs they point to are random
> > every time the test dat
On Fri, 2009-04-10 at 19:44 -0400, Alex Gaynor wrote:
>
>
> On Fri, Apr 10, 2009 at 7:40 PM, Malcolm Tredinnick
> wrote:
[...]
>
> Particularly with iterators, storing the (next head item, rest
> of
> iterator) pair in a heap leads to
On Fri, 2009-04-10 at 16:04 -0700, M Godshall wrote:
> I have two models, Comment and Project. Comments are connected to a
> Project through a GenericForeignKey, and each Project is assigned to a
> particular user. I'd like to retrieve the latest comments for all the
> projects that a particular
On Fri, 2009-04-10 at 14:46 -0700, Mr. T wrote:
> Sorry, a QuerySet eval question. Yeah, I'm dumb I know.
>
> My view is creating a query set, XXX.objects.all(). Stale data is
> being served up all the time. Read the docs about generic views, when
> sets are evaluated, some old posts in this grou
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 seems to have been asked a few times, but never
> answered
> fully.
Not quite true. It's been answered fully a lot of times: querys
On Fri, 2009-04-10 at 12:16 -0700, Adam Fraser wrote:
[...]
> The problem I'm running into is that the value that comes into render
> for the ManyToManyField is a list of the id's for the selected stains
> and not the stains themselves. I assume I should be getting them
> somehow through the djan
On Fri, 2009-04-10 at 12:01 -0700, Joe Sr. wrote:
[...]
> That's a good idea I will check on, but it wouldn't explain why it
> works with the development server and not mod_python.
It might well explain that. There's no guarantee about import order and
certainly no guarantee that it will be the s
On Fri, 2009-04-10 at 13:25 -0400, Alex Gaynor wrote:
[...]
> Take a look at the values() method on a queryset:
> http://docs.djangoproject.com/en/dev/ref/models/querysets/#values-fields
Since the original poster was explicitly asking about custom SQL
situations, this isn't a valid solution. Sure
On Fri, 2009-04-10 at 10:24 -0700, MS wrote:
> Hi Malcolm!
>
> > > then is there any good (built-in) way
> > > to write custom SQL queries wich would return dicts instead of tuples?
> >
> > You know the order the values will be returned in and you know the names
> > of the columns. So you can cr
On Fri, 2009-04-10 at 05:45 -0700, nikita kozlovsky wrote:
> On Mar 9, 3:21 am, Malcolm Tredinnick
> wrote:
>
> Hello, Malcolm.
>
> > > Again, the correct syntax would be:
> > > Message.objects.filter(student__isnull=True)
>
> Why ORM uses LEFT OUTER
On Fri, 2009-04-10 at 05:41 -0700, AndyB wrote:
> Hi,
>
> I've got a model called Courses and a model that inherits from it
> called SpecialCourses that has some extra fields.
>
> It seems that any SpecialCourses I add also show up in the changelist
> for Courses which will be confusing for cont
On Fri, 2009-04-10 at 04:50 -0700, MS wrote:
[...]
> If it's not available any longer
Which it isn't.
> then is there any good (built-in) way
> to write custom SQL queries wich would return dicts instead of tuples?
You know the order the values will be returned in and you know the names
of the
On Fri, 2009-04-10 at 04:41 -0700, John Baker wrote:
> I have a form that validates the size of a file and it works in one
> page but not another. This is very strange. The only difference
> between the two templates is that the working one has only a single
> form (below) and the non-working one
On Fri, 2009-04-10 at 02:34 -0700, herr.klein...@googlemail.com wrote:
> Thanks Malcom.
>
> All right lets see if i could put my real problem simpler. Lets say
> you are the tutor of a programming course and you want to check the
> programming assignments semi-automatically.
> So you would set up
On Fri, 2009-04-10 at 02:05 -0700, chris wrote:
> Hi there,
>
> Here I am trying to use the aggregate functions available in SVN trunk
> (I am not sure if they have been released). The following is a
> simplified version of the models involved:
>
> class Edition(models.Model):
> edkey = mod
On Fri, 2009-04-10 at 00:48 -0300, emonk wrote:
> I understand your point, but how i do if i dont want to show the %s in
> my custom error message? :S
I mentioned that in my original reply in this thread: Use CharField or
RegexField.
Regards,
Malcolm
--~--~-~--~~~
On Fri, 2009-04-10 at 00:07 -0300, emonk wrote:
> I do not understand that these messages are not working as if the
> other
> Who care if i talk about lenght, what happen if i talk about range of
> numbers?
I wrote that you need to accept a format parameter in the error messages
(the "%s"). Have
On Thu, 2009-04-09 at 23:23 -0300, emonk wrote:
> Hi,
> I have this form:
> class registerForm(forms.Form):
> aNumber = forms.IntegerField(
> label='Some Integer Field',
> max_value=,
>
> m
On Fri, 2009-04-10 at 00:28 +0100, Daniel Watkins wrote:
> Hello all,
>
> I'm currently working on an implementation of the server-side of an
> already-defined protocol. So, no, I can't do things differently. :)
>
> The protocol performs authentication by passing a token which is
> "md5(md5(pas
On Thu, 2009-04-09 at 15:48 -0700, herr.klein...@googlemail.com wrote:
> Hi!
>
> I have cages filled with animals. All animals can move, but they do it
> all differently. Some animals even have attributes the others don't.
> Now i want all the animals in a cage to move.
>
> How do i implement th
On Thu, 2009-04-09 at 04:27 -0300, emonk wrote:
> Hi people.
> This is my doubt
>
> I need make a form field with this restrictions:
>
> _field content must be only integers numbers and postive.
> _filed content must have a max lenght, for example 8 characters.
>
> I am confused beacuse models.
On Wed, 2009-04-08 at 12:35 -0700, mettwoch wrote:
> Thanks a lot Malcolm! I'll start moving the TurboGears hand-written
> admin to the Django admin and keep MySQL.
>
> I've one more philosophic question: The model in Django should hold
> the business rules, right?
Not really. Firstly, I'm kind
On Wed, 2009-04-08 at 10:37 -0700, PipeManMusic wrote:
> I'm working on a project that handles Discography's and I am having
> trouble figuring out the relationships.
>
> Artist: Can belong to more than one Group play more than one Instument/
> Production Role on more than one Album and could var
On Wed, 2009-04-08 at 08:03 -0700, cfiles wrote:
> Is it possible to force a base model to have a sub model? Consider the
> following model...
>
> class Account(models.Model):
> user= models.ForeignKey('auth.User')
> name= models.CharField(max_length=100)
> description
On Wed, 2009-04-08 at 05:36 -0700, Praveen wrote:
[...]
> i am very much familiar with django-registration and django-profile
> but it really wiered to display extra fields on Registration Form for
> that we will have to customize the from django.contrib.auth.forms.
I feel you might be over-think
On Wed, 2009-04-08 at 04:50 -0700, rslee wrote:
> I have dict named "servers". With in it, there is a key called "num
> of cpu". In Python, I can access this as servers["num of cpu"]. In
> Django, how can I access this dict item. I tried the following but
> they do not work: {{servers.num of c
On Wed, 2009-04-08 at 08:43 +0100, Andy Baker wrote:
> Wow! So Python will eat RAM until restarted? That changes the way I am
> thinking about this problem.
Well, that's not really accurate, as you realise further down. The
maximum amount of RAM used will not decrease. However, it won't increase
On Wed, 2009-04-08 at 00:07 -0700, Harish wrote:
> Hi Folks,
>
> I want to know the advantage / features of django 1.0.x over pre 1
> version..
>
> Can any one have a list of advantage / features or url which will be
> helpfull for me to evaluate...
A very significant consideration here is tha
On Tue, 2009-04-07 at 23:25 -0700, zayatzz wrote:
[...]
> I understand that i have to create poll as one module, question as
> second module and answers as 3rd module(or 3rd, 4th and 5th as they
> need to be of different kind). But how to handle the problem that
> questions (or their answers) have
On Tue, 2009-04-07 at 23:18 -0700, zayatzz wrote:
> Thanks for the lengthy answer.I already started looking into that
> session application. Ill read through the other pages also... If i
> only had time for all this. Thats the main reason why i asked those
> questions - i needed someone to point m
On Tue, 2009-04-07 at 21:47 -0700, Hostile Fork wrote:
[...]
> Okay, thanks. Perhaps a good place to document this would be on the
> first page of the tutorial
Not really, no. At that point in the first tutorial, subtleties like
this are not of paramount importance. It's the beginner's tutorial,
On Tue, 2009-04-07 at 20:10 -0700, Iqbal Abdullah wrote:
> Hi guys,
>
> I'm a bit confused on inserting new data into the db via the models,
> i.e in the docs
> http://docs.djangoproject.com/en/dev/topics/db/queries/#topics-db-queries
> a given example to add new data into a table is:
>
> from
On Tue, 2009-04-07 at 20:06 -0700, Rit wrote:
> James Bennett mentioned "django registry" in this talk
> http://www.youtube.com/watch?v=A-S0tqpPga4
I'll guess that he actually mentioned django-registration, which is an
application he's written and distributed via Google code. A quick search
will
On Tue, 2009-04-07 at 16:15 -0700, Hostile Fork wrote:
> Hello djangoists!
>
> Code has been coming along pretty well in my first django project.
> But I hit a snag with a one-to-many relationship in my model.
>
> When I do something like this:
>
> f = Foo()
> b = Bar(foo=f)
> f.sav
On Tue, 2009-04-07 at 19:30 -0700, rvr wrote:
> Is there a way to specify a field in an abstract base class, but have
> the corresponding column appear last in the table's column list?
>
> class A(models.Model):
> ts = models.DateTimeField(default=datetime.now())
> class Meta:
> a
On Tue, 2009-04-07 at 18:29 -0700, Thierry wrote:
> I'll be referring to the example in the Django documentation here. I
> will extend on the "books" application in the "mysite" project by
> creating a new app called "music" so that the structure looks like the
> following:
>
> mysite/
> boo
On Tue, 2009-04-07 at 14:57 -0700, thedja wrote:
> Good day to you all,
>
> Im using
> q = Person.objects.filter(pk=query)
>
> and i have this inside a FOR statement. So every time the loop starts
> again q gets rewritten instead of adding the new objects.
>
> for stuff in box:
> for th
On Tue, 2009-04-07 at 14:31 -0700, mettwoch wrote:
> Hi,
>
> I've been watching Django and other Python frameworks a few years ago
> and stopped at version 0.96. Last year I started to look at a web
> framework to move an old M$ Access Inventory application to a more
> stable and universal archit
On Tue, 2009-04-07 at 17:28 -0700, Jim wrote:
> Hello,
>
> I have this form.
>
> class SearchForm(forms.Form):
> search=forms.CharField(widget=widgets.SearchWidget)
> search_type=forms.MultipleChoiceField
> (widget=CheckboxSelectMultiple,choices=[('a','A'),('b','B'),])
>
> In the templa
On Tue, 2009-04-07 at 15:20 -0700, andybak wrote:
> I've got no really huge tables - the entire db is under 6meg and the
> site isn't even public yet so traffic is minimal. Memory just doesn't
> seem to go down. (until the process get's restarted by maxchild or by
> me killing it).
That's complet
On Tue, 2009-04-07 at 10:26 -0700, Magus wrote:
> I agree with Lee. There should be a way for a developer to store NULL
> into a char field. At the moment null flag has no effect for a
> CharField. Generally saying an empty string is not the same a not
> defined value = NULL. It's pity that the ac
On Tue, 2009-04-07 at 10:16 -0700, pkenjora wrote:
> Hi,
>
> Why not remove the '@' filter and allow the specific project
> developer the freedom to use email as username? What was the
> reasoning behind this?
One reason is that usernames can be made to be unique, since you're
selecting a new
On Tue, 2009-04-07 at 06:55 -0700, pault wrote:
> I want to run an action from my admin when I press the GO button
> without having to select any objects.
>
> But it seems actions are only triggered when at least one object is
> selected. Does anyone know a workaround for this.
What you're after
On Tue, 2009-04-07 at 06:46 -0700, zayatzz wrote:
> Hello
>
> Im mainly thinking bit ahead here, while im still in the beginning of
> writing my first real project/application with django.
> If someone could answer all or some of those questions and perhaps
> provide examples, then i would greatl
On Tue, 2009-04-07 at 04:36 -0700, kRON wrote:
> Hello everyone. I've only recently started developing app with Django
> and in Python as well. I have a fair experience in developing web apps
> on frameworks in PHP and I'm really trying to make a commitment on
> doing my first Django app properly
On Tue, 2009-04-07 at 03:04 -0700, Chris Dew wrote:
> Here's a newbie question:
>
> Is there a way of rendering (a single block of?) a Django template,
> without it loading in it's parent template(s).
>
> My purpose is to use a single template to render both a component of a
> page as an html sn
On Mon, 2009-04-06 at 23:58 -0700, Harish wrote:
[...]
> If salary is found negative it displays the error message in beginning
> of the form(that is after the message 'Please correct the error below.
> '). Actually it should display the error message in the 'Salary'
> section
>
> I think, I am m
On Mon, 2009-04-06 at 23:31 -0700, Coonay wrote:
>
>
> On Apr 7, 12:54 pm, Graham Dumpleton
> wrote:
> > On Apr 7, 2:33 pm, Coonay wrote:
> >
> > > i want to get a WebOb Request ASAP when the WSGIHandler is called,such
> > > as retrieve the SERVER_NAME and SERVER_PORT meta information from the
On Mon, 2009-04-06 at 21:22 -0300, Marcello Parra wrote:
> Hello,
>
> I started to play with Django some weeks ago. I'm very impressed with
> it and making some tests with an application I have already running...
>
> The problem is that I need to connect to two databases using two
> different en
On Mon, 2009-04-06 at 13:27 -0400, Karen Tracey wrote:
[...]
>
> Multi-column ordering has been requested before, you might try
> searching the list and tracker for details on why it's not being done
> now.
One of the big reasons this isn't available is that it's quite a
challenging UI problem
On Mon, 2009-04-06 at 07:05 -0700, Anssi Kaariainen wrote:
> I ran to an problem when playing around with Postgresql deferred
> constraint triggers. While deferred constraint triggers themselves are
> not too important for Django, the consuming of on-commit DB errors
> is.
>
> I will go through t
On Sun, 2009-04-05 at 06:27 -0700, Zeal wrote:
> Django's auth is pretty good, however, I need some row-level
> authorziation mechnism, like in which department and function that the
> certain user could access, so my needs on authrization are pretty
> different than default auth model. Thanks!
I
On Sun, 2009-04-05 at 18:03 -0700, Joshua Partogi wrote:
>
>
> On Apr 6, 12:25 am, Antoni Aloy wrote:
> > In your render_to_response don't forget to add
> > context_instance=RequestContext(request)
>
> Thanks. So I have to add this everytime I return render_to_response? I
> thought I only add
On Fri, 2009-04-03 at 17:56 -0700, TheIvIaxx wrote:
> I have an object that will be viewed, edited, or added. I would like
> to give a url for edit/add but default to view if nothing is given.
> For example:
>
> http://www.example.com/page/edit --> Goes to edit page template
> http://www.example
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 import lazy
> reverse_lazy = lazy(reverse, str)
This would have to be "unicode", not "str", since reverse() really
retu
On Fri, 2009-04-03 at 21:54 +0200, Alex Rades wrote:
> 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 stat
On Sat, 2009-04-04 at 00:22 +0200, Marcus Weseloh wrote:
> Hello again,
>
> I think I solved my problem (at least for the development server) by
> monkey patching django.core.servers.basehttp.ServerHandler. Does
> anybody know of any horrible side effects this might have, or can
> suggest a more
On Fri, 2009-04-03 at 01:24 -0700, robin wrote:
> It seems like you cannot use reverse within urls.py
>
> url(r'^add/$','items.views.add_item_wizard',name='add_item_wizard'),
>
> url(r'^add/complete/
> $','django.views.generic.simple.direct_to_template',{
> 'template':'message.html',
>
On Fri, 2009-04-03 at 04:39 -0700, Praveen wrote:
> def queryset(self, request):
> qs = super(EventAdmin, self).queryset(request)
> if not request.user.is_superuser:
> qs = qs.filter(city=request.user.get_profile().res_city)
> r
On Fri, 2009-04-03 at 01:14 -0700, Zeal wrote:
> Thanks Malcolm, I think I've find the issue. I set time.time() to
> test several steps in my program, retrieving data is pretty fast, the
> entire function spent 6s to finish the task. However, at the final
> stage on template rendering, seems Exp
On Fri, 2009-04-03 at 01:41 -0700, Zeal wrote:
> I'm a newbie, I've been using Django to develop an application. The
> entire application need to be based on an authorization mechnism. As
> of my current programe, I just put user's id in session when they log
> in, and there is a authorization dec
On Fri, 2009-04-03 at 09:35 +0100, Mic Pringle wrote:
> Hi,
>
> I've been googling this for a while but can't seem to find any
> relevant information.
>
> Is it possible to utilise the admin interface without requiring
> authorisation ? Is it as simple as not including the authorisation
> module
On Thu, 2009-04-02 at 22:34 -0700, Joshua Partogi wrote:
> On Apr 3, 11:23 am, Malcolm Tredinnick
> wrote:
> > On Fri, 2009-04-03 at 00:26 +1100, Joshua Partogi wrote:
> > > Dear all,
> >
> > > In django admin we can give permission to user to edit, delete or
On Thu, 2009-04-02 at 19:04 -0700, Timboy wrote:
> What's the best way to add users with an auto generating username? ie:
> Taub.John, Smith.Tim, Smith.Tim2
You can do it however you like, since the user will never see it.
Something as simple as taking the email address, replacing "@" with "AT"
a
On Thu, 2009-04-02 at 18:29 -0700, Dave Fowler wrote:
[...]
> Profile.objects.all().select_related()
>
> But it seems weird to base everything around the object that isn't
> used for authentication. Is that what most people do?
"Seems weird" isn't a particularly strong technical reason (and is
On Fri, 2009-04-03 at 00:26 +1100, Joshua Partogi wrote:
> Dear all,
>
> In django admin we can give permission to user to edit, delete or
> create certain model. But what I want to do now is a user can only
> edit or delete the data that he/she created.
>
> Is there any way we can do this in dj
On Thu, 2009-04-02 at 00:46 -0700, Zeal wrote:
>
>
> On 4月2日, 下午2时39分, Alex Koshelev wrote:
> > On Thu, Apr 2, 2009 at 10:36 AM, Zeal wrote:
> >
> >
> > Documentation knows [1]
> >
> > [1]:http://docs.djangoproject.com/en/dev/ref/models/querysets/#id4
>
> Hi, Alex,
>
> Really appreciates you
On Wed, 2009-04-01 at 14:13 -0700, christian.oudard wrote:
> I have made a page for admins to set a user account to inactive, but I
> noticed that the user's session continues if he is logged in. It
> appears that the is_active field is only checked when the user logs
> in, not when each request i
201 - 300 of 3936 matches
Mail list logo