It is possible to do in current version of Django with two lines of code:mkdir
my_projectdjango-admin startproject config my_projectI have been working for
many companies that use Django and I have seen that each ot them has their own
structure of project. And usually project is created once per
Hi,I am using the same approach, migrations with RunSQL and model and in most
cases it is working well.Introduction of supporting views is easy at a first
glance. But when you think more then it is not so easy. People would see the
view in admin panel, but admin panel is based on an idea that ev
Hi,For class based views there are mixins, LoginRequiredMixin,
PermissionRequiredMixin which give the same
functionality.https://docs.djangoproject.com/en/4.0/topics/auth/default/#the-loginrequired-mixinhttps://docs.djangoproject.com/en/4.0/topics/auth/default/#the-permissionrequiredmixin-mixinWh
Hi Daryl,I agree and disagree with you, it depends on place and context of
using "pk" alias :)I am not sure if it is good in filter and as object
attribute. For our internal use we could use "_pk" or other name.You motivated
me to check one thing.class Car(models.Model): pk =
models.IntegerF
y there is empty QuerySet returned.
Proposal is to raise error instead return empty QuerySet in Foreign Key like
M2M does.
Albert
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from
Thank you for response.Now i see that it is not so easy as I thought.It is used
in many other places in Django and probably also in django rest framework and
other third parties libraries.
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contrib
ed to do extra work to
support it.
I think that "pk" could be only a private attribute of a model
("_pk") and only for internal use or avoid using it at all.
I think it would give us more flexibility to develop/improve orm.
What do you think?
Regards,
Albert Defler
--
You r
> to say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
> "The people's good is the highest law." -- Cicero
> GPG Key fingerprint: 125F 5C67 DFE9 4084
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django d
tion.
Thanks,
Albert O'Connor
On Sat, Oct 5, 2013 at 7:27 AM, Tino de Bruijn wrote:
>
> On Thu, Oct 3, 2013 at 11:09 AM, Tom Christie wrote:
>
>> * If a simpler GCBV implementation along the lines of
>> django-vanilla-views is something we think we should working towards
r vague and could be more helpful, but not if it
requires hacks. You can look into the values of variables in the rather
long stacktrace to figure out what is happening.
Albert
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers&quo
y somewhat
of an up hill battle where the onus is on the contributor at every stage,
not the project maintainers.
Albert O'Connor
On Sun, Mar 24, 2013 at 7:10 AM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:
>
> On Sun, Mar 24, 2013 at 6:28 PM, Omer Katz wrote:
>
>
eader won't know what the get does.
I can imagine use cases exist where CBV make sense, but they seem to
be instances where customization and testing are critical which points
me back to library views explicitly meant for reuse, not every day
business logic heavy views.
Albert
On Tue, Jun 5, 201
s, except
many for the one your provide in your distinct use case.
It should be noted a vast majority of views that developers write
which aren't "generic" will never ever be reused and thus probably
should be CBV.
Albert
On Tue, Jun 5, 2012 at 10:46 AM, Donald Stufft wrote:
> O
ently when it comes
to generic class based view they should be used less.
Albert
On Tue, Jun 5, 2012 at 9:14 AM, Donald Stufft wrote:
> On Tuesday, June 5, 2012 at 9:05 AM, Albert O'Connor wrote:
>
> My feeling is that though some people might have uses for CBV, we
> should
ntext providers would have made more sense than mixins.
If people have uses for CBV, they should be available, but advocating
that more builtin or contrib views should be made class based is
something I would be against personally, unless it really made sense
in a specific use case.
Albert O'
On Sep 25, 10:58 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> ensure there own code is multithread safe, but now again someone is
> saying that Django itself is not multithread safe. :-(
Well, I was just repeating the what I heard from the developers. Not
so long ago a proposal was made th
Django is 0% threadsafe (as in nada, null or zilch)
it is not supposed to be run that way, but if you must keep locking
around every operation.
i.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django develo
I think the OP is correct, if you want the label to end with a
colon ... then add the colon to the label. It doesn't get any simpler
than that. Any other solution just gets in the way.
i.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On Mar 25, 8:06 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> I fear that one day I will achieve that and will then be asked to leave
> the safety of the monastery and journey the world righting injustice in
> episodic television format...
that is quite funny ... one more reason to read t
There is ticket (and a patch) for enabling streaming uploads, but it
seemed a little complicated and until it gets accepted (or reworked)
here is nice workaround to do the same. See patch at the end.
It is backward compatible, the current behavior stays the same, you
can use still request.FILES t
Jeremy Dunck wrote:
> That said, most of the time, this is good stuff. Perhaps a management
> option to turn it off?
My understanding is that no part of basehttp.py is used when Django is
deployed via modpython. If that is correct then this addition would
make no difference in a production envi
There is an easy way to turn on multi-threading for the default server,
see the diff below:
Index: basehttp.py
===
--- basehttp.py (revision 4183)
+++ basehttp.py (working copy)
@@ -7,10 +7,16 @@
been reviewed for security issu
Adrian Holovaty wrote:
> Have you guys checked out the Widget class / capability in newforms?
> That's the part that lets you define how a field should be output as
> HTML. I'm definitely interested in hearing whether/how that doesn't
> let you do what you want to do.
Yes it worked out well.
Bu
>{{ form.message.errors }}
>Message: {{ form.message }}
A very common use case is to format/highlight the error message or
input area upon error. I can already see myself extending the Form
class to include something of the sorts
{{ form.message.errors }}
Message: {{ form.message }}
whe
Never really understood why you needed this in the first place. The
automatic setuptools installation has caused me some grief as it
installs an obsolete version ... I forgot the exact specifics but it
took me quite a while to track down that installing django was causing
all kinds of strange prob
yeah, this is really a huge wart ,
what Django does here - holds everything in memory - works only for the
simplest cases thus makes django unsuited for a whole slew of web
applications
too bad that in a news environment uploading larger files is not a
typical use case, that's why this fix takes
> I don't understand how the traceback module ends up being None
> Adding a check for None will make the warning message go away
fixing up code to make a mysterious error message go away is vey very
suboptimal (ok ... so I've done I it myself a few times as well ...)
--~--~-~--~~--
> just can't imagine any practical application of this...
suppose one wants to return content created by two generators ... they
could wrap it themselves into a single one but why not write it both to
the response and let that iterate thru each,
if your code would support that it would end up be
but it is not an arbitraty iterator one is writing to, it is the the
HttpResponse, why couldn't it handle new content being added just
because some content is present as an interator? once it exhausts the
original iterator it could continue on (if new content was added after
it)
or why not let th
Two observations:
1. It is hard to believe that Django does not already do this ... it is
somewhat depressing to see that trivial behavior such as streaming
output was never implemented
2. I'm commenting here as an outsider, but looking at the patch it
seems that the _is_string attribute is unne
> But I have concerns about performance in the common case.
File upload is inherently a slow process strictly limited by the
connection speed so it is not clear that any kind of performace
problems would be noticable at all (even if there were such problems)
Loading files into memory is *extreme
wonderful2006/2/9, limodou <[EMAIL PROTECTED]>:
I'm very pleased to announce that DjangoInstall package 0.1 released.=Django Install Package=:Author: limodou (
[EMAIL PROTECTED]):Blog: http://www.donews.net/limodou:Date: 2006-02-09What
32 matches
Mail list logo