You're on the right track. As the docs state, you can then override
the site-wide setting:
http://docs.djangoproject.com/en/dev/topics/http/sessions/#browser-length-sessions-vs-persistent-sessions
Steve's comment about requiring a "huge session store" is not really
too much of an issue. It's your
upload_to should not have a trailing slash
On Dec 7, 5:16 am, omat wrote:
> The model is as simple as can be:
>
> class Provider(models.Model):
> name = models.CharField(max_length=100)
> logo = models.ImageField(upload_to='logo/',
> blank=True, null=True)
>
>
This is kind of an aside to your question, but I think you'll find it
useful...
There are two types of static media that you'll want to have served
separately to your dynamic django application:
* project static media
* uploaded media
I like to keep these two separate. My preferred way to do thi
You've also got a shortcut method for the common case of raising 404
if the object doesn't exist:
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#get-object-or-404
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
On Jun 5, 9:38 am, urielka <[EMAIL PROTECTED]> wrote:
> i will try that,but how that should matter?
I'm guessing that the first one matches the start of your url ending
in a slash:
Redirect 301 /archive/detail/3
http://www.urielkatz.com/archive/detail/google-gears-orm/
and then it redirects to
On Jun 11, 1:10 pm, David Priest <[EMAIL PROTECTED]> wrote:
> The Admin interface does it. I haven't been able to figure out where
> it does it, so I can steal its method...
Check out django.utils.datastructures.DotExpandedDict
--~--~-~--~~~---~--~~
You received
On Jun 13, 5:53 am, robo <[EMAIL PROTECTED]> wrote:
> if request.method == 'POST':
> form1 = form_for_model(Order)
> Orders = form1(request.POST, prefix='orders')
This is a bit confusing.
I'd suggest
OrderForm = form_for_model(Order)
order_form = OrderForm(request.POST, prefix='orders')
..
> What you want is "[-A-Za-z0-9_]+".
>
> The reason [-\w] doesn't work is because inside character classes
> ([...]), \w no longer means "alphanumeric characters". It's just a
> character escape.
Alternately, make the string a "raw" one (note the r before the
quote):
r'[-\w]+'
--~--~-~
> Thanks for pointing out this technique, I think I'll go this route
> instead of the Kitten CAPTCHA route.
Here's a snippet for that http://www.djangosnippets.org/snippets/131/
If you do want to run with the captcha method, here's a reCAPTCHA
field implementation:
http://smileychris.tactful.co.n
On Jun 15, 3:50 pm, "Nicholas Ding" <[EMAIL PROTECTED]> wrote:
> but I wanna 'where column1 <> %s and column2 <> %s'
> If I were using exclude, the SQL must be 'where not (column1 = %s and
> column2 = %s), that's different.
I think you want:
objects.exclude(column1=test1).exclude(column2=test2)
On Jun 18, 3:02 am, itsnotvalid <[EMAIL PROTECTED]> wrote:
> That works, but it changes the behavior of all cookies set in the
> site.
> What if I need to have different expiration times for different
> cookies, or if I have to offer the user an option on how long the
> cookies' kept?
There's rece
On Jun 19, 2:07 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2007-06-19 at 01:54 +, rtconner wrote:
> > I followed the instruction at the bottom of this page:
> >http://www.djangoproject.com/documentation/fastcgi/
> > I can't seem to get this running on a shared host. I've als
> I'm obviously missing something basic. I'm 99% sure I should be able
> to say something like:
>
> media="screen" />
Assuming you have SVN...
Make sure you have this enabled in your TEMPLATE_CONTEXT_PROCESSORS
(it is by default):
http://www.djangoproject.com/documentation/templates_python/#dja
I'm not sure. Each Apache instance may have to populate this, so it
could be noticed several times.
Keep investigating!
Thinking more about it, perhaps CachedDnsName should only lazily
loaded if settings.DEBUG==True. It's not really fair to expect an end
user to have to wait for this timeout jus
I'm guessing your model defines a foreign key to User. Use that
instead of User.username (so, for example, self.user.username).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
If you haven't already, check out http://www.aswmc.com/dbmigration/
It's quite a good solution for migration.
I've been writing a wrapper on top of that to handle auto-migration,
which I'm mostly happy with. Just have to tie some loose ends and I'll
put it up somewhere to share.
--~--~-
Or you could do {{ "class1,class2,class3,class4"|split:","|random }}
(you'd need to make the |split filter too, Django only comes with |
join)
On Jul 4, 3:21 pm, Bryan Veloso <[EMAIL PROTECTED]> wrote:
> > If you want to hardcode the availability of the 'classes' variable in
> > every context (s
On Jul 9, 5:17 am, queezy <[EMAIL PROTECTED]> wrote:
> I would like to do this in Django, using two lists that are QuerySet lists:
>
> mylist=mylistWHOM.intersection(mylistWHAT)
>
> When I do it in the Pythonic way above, the django parser complains with:
> 'QuerySet' object has no attribute 'in
On Jul 9, 12:19 pm, Rod <[EMAIL PROTECTED]> wrote:
> 1) I can view the Admin screen but I am still unable to view the poll
> app.
>
> I've added a new class (see below) to mysite/polls/models.py but
> the Admin screen remains unchanged.
>
> class Poll(models.Model):
> # ...
> class Admi
On Jul 19, 2:22 pm, Greg <[EMAIL PROTECTED]> wrote:
> I was wondering how do I send a 'favorite_color' GET parameter? Do I
> have to use a form to do this that sends data by GET or is there
> another way to do it?
http://example.com/url_to_set_colour_view/?favorite_color=Blue
--~--~-~-
On Jul 22, 5:09 am, Greg <[EMAIL PROTECTED]> wrote:
> It's just weird how that line 'del
> request.session['cart'][0]' works fine in the showcart function but
> doesn't work right in the deletecart function.
It sounds like that the session just isn't getting saved. See
http://www.djangoproject.co
On Aug 6, 1:15 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 05-Aug-07, at 6:19 PM, Marco A. wrote:
>
> > >>> p.user
>
> p.User
Umm, this is just as wrong.
Doug's answer summed it up pretty well.
--~--~-~--~~~---~--~~
You received this message because yo
On Aug 8, 4:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> The templates are html...so to comment you would use
The templates are rendered by Django, so {##} should work. I just
tested it and it's working fine for me...
>>> from django.template import Template, Context
>>> content
Your stepping out of what the simple view was there to provide. It's
not difficult to make your own views, you know. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
On Aug 30, 4:28 am, "Peter Melvyn" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've a question, why max. size of User.email field is set to 75 characters,
> if RFC 2821 limits local part to 64 characters and domain to 255.
> With '@' it is together 320 chars.
>
> Should not be this field extended?
I
On Aug 30, 8:19 pm, Bjorn Ruud <[EMAIL PROTECTED]> wrote:
> > > On 8/29/07, Bjorn Ruud <[EMAIL PROTECTED]> wrote:
>
> > > The pool QuerySet gets re-evaluated when the count() in the loop is
> > > run. Since one of the fields in the filter gets changed, the amount of
> > > objects in the QuerySet
On Sep 3, 9:34 am, "Evan H. Carmi" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I ran across a problem today with the list view of my blog. I am using
> markdown to create html tags for my post. In the list view I use the
> template tag truncate to cut off the number of words. This leaves open
> the html
On Sep 3, 5:12 am, "Alfredo Alessandrini" <[EMAIL PROTECTED]>
wrote:
> I'm a newby..:-)
>
> Is Django good for make a web site like this?
>
> These are a web site for playing correspondence chess.
>
> The moves are stored with a database, with information about the players,
> tournament, rating,
On Jan 5, 4:09 am, "Marcelo Sanches" <[EMAIL PROTECTED]> wrote:
> I agree ! After trying to configure the django cache system I notice that
> the online docs are wrong and the django book have the correct information
> about the order of MIDDLEWARE_CLASSES.
>
> ONLINE DOCS YOU WILL FIND:
> ...
>
Hi Peter,
I've been delving around in that code recently. The only thing I can
think of is that your cookies aren't getting received (perhaps a
misconfigured COOKIE_PATH or one of the other related settings?) so a
new session is getting created and sent each request.
As a side note, I've been th
On Jan 5, 6:33 pm, Peter Rowell <[EMAIL PROTECTED]> wrote:
> > only save sessions which have been modified
>
> Actually, the code in the sessions/middleware is:
> if modified or settings.SESSION_SAVE_EVERY_REQUEST:
> so the whole point is to save it whether it's modified or not.
This w
Using the low-level cache [1] sounds like it'd work fine for you.
from django.core.cache import cache
key = 'complex-results-%s' % request.session.id
results = cache.get(key)
if results is None:
results = list(YourComplexQuery)
cache.set(key, results, 60*15)
# then just use pagination to
You can use the django.views.generic.simple "direct_to_template" view
just like you would the render_to_response shortcut - it works the
same except you pass in the request as the first argument:
direct_to_template(request, 'template/index.html')
On Apr 2, 2:42 am, Matias Surdi <[EMAIL PROTECTED
How about this:
Set your model's user field so editable=False
Sub-class ModelAdmin
Override its `save_add` method, setting form.data['user'] =
request.user then calling the super method
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
Hi Josh,
Try:
prev = album.photo_set.filter(id__lt=).order_by('-id')[:
1]
--~--~-~--~~~---~--~~
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
T
On Apr 24, 4:04 am, Tipan <[EMAIL PROTECTED]> wrote:
> I'm seeking advice on how to ensure my form data in hidden fields is
> the same after the user has posted the form.
If it's calculated data (somehow) then why do you need to pass it to
the user? Couldn't you just calculate this data and add i
> You could write a function that takes Django's standard MultiValueDict
> and returns the type of nested structure you are after. Not a change
> worth making in core, but it's only a function you would have to write
> once for your own use.
Actually, there is a function that could do what you w
Assuming you are using an SVN checkout, you may want to look at my
Django Documentation application which provides access to the official
Django documentation as HTML inside of your local Django
administration documentation.
http://smileychris.tactful.co.nz/ramblings/django-documentation/
On May
On May 26, 2:53 pm, oggie rob <[EMAIL PROTECTED]> wrote:
> Probably not an issue, but if you import as:
> from django import newforms as forms
> you may want to watch out for namespace issues.
That's why, like Russ, I also use a forms.py file and do the newforms
import like:
from django.newforms
On May 26, 1:04 am, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> hello everyone,
>
> I'm trying to recreate reCaptcha (http://recaptcha.net/learnmore.html)
> in newforms.
I did this yesterday:
http://smileychris.tactful.co.nz/ramblings/recaptcha/
--~--~-~--~~~
Hi Ramashish,
I haven't tried it, but I think that you could just use regular
expression extension notation to make the regex case insensitive in
your url conf.
So instead of:
('users/add/', 'views.add'),
You'd do:
('(?i)users/add/', 'views.add'),
Try it and let everyone know if that works..
Perhaps:
.../from/2007-02-07/
.../until/2007-03-07/
.../from/2007-02-07/until/2007-03-07/
On Jun 2, 7:40 am, cjl <[EMAIL PROTECTED]> wrote:
> D:
>
> I am in the process of learning Django, and I'm trying to build a very
> simple mapping application similar to chicagocrime or
> newhavencrimelog
That's a spelling mistake. Try '(?:u)' instead
On Jun 5, 3:55 am, Sam <[EMAIL PROTECTED]> wrote:
> Found there :
> Non-ASCII Tag Names in
> URLshttp://code.google.com/p/django-tagging/wiki/UsefulTips
>
> I thought it is used to convert to unicode but it doesn't seem
> effective.
>
> Anyone knows
Oops, getting myself confused now.
(?u) is correct. http://docs.python.org/lib/re-syntax.html
Ignore my ignorance
On Jun 5, 3:55 am, Sam <[EMAIL PROTECTED]> wrote:
> Found there :
> Non-ASCII Tag Names in
> URLshttp://code.google.com/p/django-tagging/wiki/UsefulTips
>
> I thought it is used to
Try change the order of those two Redirects so the second one gets
tried first.
On Jun 5, 7:17 am, urielka <[EMAIL PROTECTED]> wrote:
> i got my blog inwww.urielkatz.comand i got some of my pages index in
> google and now i changed the blog to use slugs instead of post id for
> post url.
> so thi
On Sep 20, 5:53 pm, Dave Lowe <[EMAIL PROTECTED]> wrote:
> I have the feeling I'm missing something. What does everyone else do
> to get around this?
Uh, so remove the slash in your template.
href="{{ MEDIA_URL }}css/master.css"
Side note - IMO, MEDIA_URL should *always* have a trailing slash.
I don't see how it would break on your production server as long as
you have a trailing slash in the server's media_url too.
On Sep 21, 5:05 pm, Dave Lowe <[EMAIL PROTECTED]> wrote:
> I agree by the way, MEDIA_URL should always have a trailing slash.
> Does anyone know why the documentation says
On Oct 13, 4:09 pm, Jason <[EMAIL PROTECTED]> wrote:
> Hey everyone--
>
> I've got a predominantly static site that I need to serve through
> Django, at least until I can convert more of it over properly. Yes, I
> know this is discouraged, but it's the only way I'm going to be able
> to move fo
On Oct 13, 8:35 pm, "Nikola Stjelja" <[EMAIL PROTECTED]> wrote:
> On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
> > fair enough, I'm not happy that I can't get {{for x in y[1:5]}}
>
> What's the problem. You just send the template 'y':range(1,6). It's very
> simple. I don't think the template syste
> Is there a way to get the
> auto_now/auto_now_add feature of DateTimeField to use UTC?
Those methods suck and hopefully will be removed. Use a callable
default instead of auto_now_add (or overridden save instead of
auto_now, like Jarek gave):
from datetime import datetime
class YourModel(model
On Oct 27, 3:36 am, Brightman <[EMAIL PROTECTED]> wrote:
> thank u.
> how can i get it in request.POST?
By changing your form to
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
Sounds like you want something like threading.local
It's not my area of expertise, but you may be able to pick up some
hints on how to use it from
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
On Oct 27, 8:53 am, "William Battersea" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm proba
On Nov 13, 8:08 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> Announcing Django Evolution!
>
>
> http://code.google.com/p/django-evolution/
Good job, Russ and Ben!
The project gets the smiley seal of approval :)
--~--~-~--~~~---
On Nov 18, 6:49 am, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> the docs are
> written in Linux how-to style: "make these magic passes and hope for the
> best and don't try to understand the thing since you never will". Could
> you please clarify why are those things needed and what exact effect
>
On Nov 26, 1:03 pm, LorenDavie <[EMAIL PROTECTED]> wrote:
> Not sure if SmileyChris is this guy, but I've had good success with
> this project:
>
> http://www.aswmc.com/dbmigration/
As Mike H said, dbmigration is his project (my DBEvolution project did
some of the &
On Nov 28, 9:08 am, Eratothene <[EMAIL PROTECTED]> wrote:
> I need to get all blogs that belong to certain user and are empty (do
> not have any articles). I can't figure out how to make it with without
> extra() method.
Since you can't do aggregate methods in the ORM yet, you'll just have
to use
On Dec 16, 2:13 pm, itpaul <[EMAIL PROTECTED]> wrote:
> However, unlike the shell behaviour which lists and deletes messages,
> the template lists and retains the messages resulting in them
> displaying repeatedly on every page.
Most likely, the session isn't getting saved.
http://www.djangoproje
from django.views.generic.simple import direct_to_template
view:
return direct_to_template(request, 'template.htm', extra_context)
On top of that, use a context_processor (follow alex's link)
--~--~-~--~~~---~--~~
You received this message because you are subsc
After reading this thread the other day, I decided to write up a patch
[1].
[1] http://code.djangoproject.com/ticket/6262
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
On Dec 31, 7:03 am, goober <[EMAIL PROTECTED]> wrote:
> The Apache server is setup to look forhttp://localhost. I created an
> index.html soft link pointing to the base.html file in the template
> directory. When I bring up the browser, I get a error message "Page
> not found" even though the in
On Dec 30, 3:43 am, Florian Lindner <[EMAIL PROTECTED]> wrote:
> My problem is that I want to pass the info_dict to the generic view
> and the CommentForm as extra_context.
>
> How can I do this? I think I somehow mix up the dictionaries
Try this:
dict(info_dict, extra_context={'CommentForm'
On Jan 2, 2:06 pm, crybaby <[EMAIL PROTECTED]> wrote:
> I have commented out this from settings.py,
> #'django.contrib.contenttypes',
>
> and syncdb and fixtures are working.
>
> I am running python 2.4.3 on Fedora 6 and django svn revision # 6980.
>
> What impact commenting out contenttypes wou
... and feel free to email me any specific questions about my patch.
--~--~-~--~~~---~--~~
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 unsubs
Actually, exact lookups are the default:
http://www.djangoproject.com/documentation/db_api/#default-lookups-are-exact
Carl, it's likely that you were not using quotes around your strings.
.get(x=a) will get the record where property x matches the defined
variable a (which you probably hadn't defi
Just chiming in,
To clarify, I only have two patches regarding pagination:
- #2575 fixes up some of the messy bits (including a few bugs) and adds
orphaning.
- #2576 makes a PaginatorPage object which is useful for self-contained
pages (IMO usual use on a template)
> Trying to account for everyb
On Oct 17, 6:11 pm, "SmileyChris" wrote:
> - #2575 fixes up some of the messy bits (including a few bugs) and adds
> orphaning.
Oh, and it also makes Paginator work with lists/tuples.
--~--~-~--~~~---~--~~
You received this message because you a
Yep, it's mainly browser-specific here (mostly if you start typing
while you have focus on the box, it'll go to the relevant entry)
However, Javascript can control the selected element of a select box,
so you could write some script. It seems like a lot of effort for
little gain though (but then a
Hi Przemek,
Welcome to the Django community!
As Marcus suggested, run through the tutorial on the offficial django
site (in the documentation section).
Then join the official django IRC channel
(irc://irc.freenode.net/django) - it's pretty active and friendly and
you should get questions answered
It's possible:
Set a variable in the context. Only do whatever the template tag does
if the variable has not been set.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
It's explained in tutorial 2:
http://www.djangoproject.com/documentation/tutorial2/#customize-the-admin-form
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
I'm not certain, but it could be that the status_id of the new object
is returning as a string (because it's most likely come from web
request). Try comparing the str() of each.
Your __dict__ code is a bit messy - you shouldn't really need to use
internal methods like this. How about just using g
> ... There's been
> extensive discussion of this on the developer list and thus far
> no-one's stepped up with a clean implementation that doesn't get in
> the way of some use cases (keep in mind that Django's template system
> is expected to be able to produce more than just HTML ...
I dunno, I
On Nov 8, 12:25 pm, "Oliver Lavery" <[EMAIL PROTECTED]> wrote:
> That's a pretty nice solution.
>
> Implicitness in this case is a desirable attribute, imho. For output
> filtering it would be nice to have HTML escaping be a sitewide default. This
> is just good security practice, deny by default,
On Nov 10, 2:59 am, "Pythoni" <[EMAIL PROTECTED]> wrote:
> As far as I know paginator works with a list that is created from an
> object with
> get_count() and get_list() methods.
> If I already have a list, is it possible to use paginator with that
> list somehow too?
>
> Thank you for rep
http://code.djangoproject.com/changeset/4041
On Nov 10, 8:24 pm, "Pythoni" <[EMAIL PROTECTED]> wrote:
> Thank you for your reply
> Where can I download the patch?
> I still use 0.91 Django version
--~--~-~--~~~---~--~~
You received this message because you are s
The problem is specifically with the development server. Add "import
time" to django/conf/__init__.py and see if it fixes it for you.
Please report if that solves your problem in the above mentioned ticket
(http://code.djangoproject.com/ticket/2315) - if multiple people have
tested and can confir
> {% for choice in shipping_choices %}
> {{ choice[0] }}
> {% enfor %}
You want {{ choice.0 }} and {{ choice.1 }}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
On Dec 21, 11:47 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
I ran into this on my forums, where it didn't take long for someone to
post a duplicate title. I ended up passing both the slug and the id.
Kinda defeats the purpose, but it's bulletproof.
When faced with a similar situation,
[EMAIL PROTECTED] wrote:
How could I combine this into one view (i.e. recent_photos)?
Hi Oliver,
Since you're talking about two separate models, two queries (the way
you are doing it at the moment) makes perfect sense. In a view, combine
them in a list, sort it, then pass that to your templat
Hi there,
Check out:
http://www.djangoproject.com/documentation/db_api/#extra-select-none-where-none-params-none-tables-none
In a nutshell:
Team.objects.extra(
select={
'team_total': 'SUM(tourney_score.amount)'
},
)
You may want to add it as a manager to the model:
http://www.djan
On Jan 23, 8:07 am, "JimR" <[EMAIL PROTECTED]> wrote:
> 1. Can/Should I use multiple forms on one template that will update the
> models? So far, when I've tried this approach the "post" only uses the
> first form on the page.
>
> 2. Should I use one large form containing all of the fields from
The error message itself actually explains the problem quite well:
vote() [your view] got an unexpected keyword argument 'poll_id' [so
your view was passed an argument it wasn't expecting...]
If you look at your urls.py, I think you'll find that you have a line
like this:
(r'^(?P\d+)/vote/$', 'my
http://www.djangoproject.com/documentation/static_files/
--~--~-~--~~~---~--~~
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 t
I haven't launched anything public on Dreamhost yet, but I haven't had
any problems with some test apps I put up.
So that's a tentative +1 success, pending a real app launch :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
According to the docs:
"The semantics of one-to-one relationships will be changing soon, so we
don't recommend you use them. If that doesn't scare you away, keep
reading."
It scares me a bit. Can anyone expand on the "changing semantics" or
point me to an existing discussion?
Thanks
--~--~---
Something like this:
- Task will show up under Project (I removed class Admin, added
edit_inline)
- Tasks don't need a client link probably, since they are linked to a
project already
class Client(models.Model):
name = models.CharField(maxlength=255)
[...]
def __str__(self):
This may be similar to the fact you can't clear a file field.
See http://code.djangoproject.com/ticket/22
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Try models.STACKED then.
I'm guesing the task doesn't need to change the client, just show it?
If so, you could make a method that gets the client (return
self.project.client.name) and add that to the fields to list in admin
view.
Read up on
http://www.djangoproject.com/documentation/model_api/#ad
I noticed http://code.djangoproject.com/ticket/2131 was marked as a
wontfix today with the comment, "Django isn't meant to serve static
files".
I don't want to go reopening the ticket, but couldn't this still be
useful functionality?
What if I wanted to limit access to a static file to certain us
Sorry, this was supposed to go in the Django developers group... :-|
--~--~-~--~~~---~--~~
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 unsubs
> I just write hotel.settings or I need to finger out the full
> path like'c:\hotel.settings'?
Yep, just hotel.settings - if you add your projects folder (the one
which the hotel folder is sitting in, eg C:\Django\Projects) to
PythonPath, then Django knows where to look.
> second:PythonPath "['/
Hi Martin,
Django works alright with FastCGI, so if you can get that installed it
looks like your best bet. Check out this page for some installation
info for a shared environment:
http://wiki.dreamhost.com/index.php/Django
--~--~-~--~~~---~--~~
You received this
I don't think GROUP BY is part of the Django ORM, but you can easily
use raw SQL in a custom method to achieve this:
http://www.djangoproject.com/documentation/models/custom_methods/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
This does bring up an interesting point that .is_anonymous would
probably be better as something like .not_anonymous so we don't get
false-positives in templates if user is not found.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
I don't indent .not_anonymous to solve this problem. But it wouldn't
mask it any more than .is_anonymous either.
The reason I suggest this way, is that I'd rather have a template
default to the "not logged in" section rather than just assume a logged
in user when actually the user may just not be
Ivan Sagalaev wrote:
> Sure. This whole pluralization problem can be divided into two:
>
> 1. Enhance pluralization filter to accept language specific set of
> terminations and peek the right one by language-dependent algorithm.
> There a human is responsible for providing the exact values for
>
I think what you're after is:
Ingredients.objects.filter(label_ingredient__baked_good = self.id)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-user
Hi Matt,
Your playlist app can use the models in your schedule app by just
importing them.
from schedule.models import Show
Of course, it depends on your directory structure, but you get the idea?
--~--~-~--~~~---~--~~
You received this message because you are
http://www.djangoproject.com/documentation/static_files/ says:
Using this method is inefficient and insecure. Do not use this in a
production setting. Use this only for development.
I'd guess that you just needed to symlink the media and admin media
directories to your site root.
--~--~
Tyson Tate wrote:
> Inefficient and insecure? Blast. I'm using FCGI, so it looks like
> I'll have to add a subdomain that points to my media files and,
> subsequently, hunt down every single place that I've had to hard-code
> the URL in.
Hi Tyson
Regarding MEDIA_URL, check out that link that Jo
1 - 100 of 138 matches
Mail list logo