hi,
Is there out of the box support for the PRG pattern with Django's new
class-based views? If not, what's a good/preferred way of implementing one?
Thanks
D.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the
t, Nov 19, 2011 at 8:41 AM, dmitry b <dmitry.ma...@gmail.com> wrote:
> > Is there a recommended approach to anti-join queries? Here's the
> > query I'm having an issue with:
>
> > Branch.objects.filter(branchgroup__isnull=True)[:1]
>
> > where branchgroup is a
Is there a recommended approach to anti-join queries? Here's the
query I'm having an issue with:
Branch.objects.filter(branchgroup__isnull=True)[:1]
where branchgroup is a ManytoMany relationship to another model. I
want to get a set of Branch objects that aren't mapped to any
BranchGroups.
Hi,
I just want to make sure I'm not missing something obvious.
I'm writing a command that takes multiple required parameters and a
set of optional parameters and I there doesn't seem to be readily
available support for this use case. LabelCommand can take multiple
labels, but the semantics of
Can I do check-and-set operations using Django's cache api?
Thanks
D.
--
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 this group, send email to
t doesn't. If I try an aggregate query such as
> using COUNT(account_number) without the Where clause, I get a row with
> 0 in it (there are thousands of account_numbers).
>
> Thanks for the suggestion.
>
> On Oct 19, 1:30 pm, dmitry b <dmitry.ma...@gmail.com> wrote:
>
see if a pamaterized query works:
cursor.execute('SELECT account_number FROM vw_billed_summary_fact
WHERE ippa=%s', ['col11-emnj00-1147'])
d.
On Oct 19, 8:25 am, msbuck wrote:
> I'm having another strange problem. I'm executing SQL statements
> directly rather than using
Hi,
For deployment to production, I package my Django app into an RPM
package. The install script is responsible for installing
dependencies, copying files, etc. Now that I've switched to Django
1.3 I also want to run the collectstatic command as part of the
deployment script. To do this, I've
Hi,
With the new way of handling static files in Django 1.3 what would
happen if two applications have identically named static files? E.g.:
|___ app1
| | static
| |_ styles.css
|___ app2
| static
|_ styles.css
thanks, that's what I ended up using.
On Mar 30, 11:58 am, Jason Culverhouse wrote:
> You could use values_list and flat as in:
>
> User.objects.filter(username__in =['jason', 'was',
> 'here']).values_list('username', flat=True)
>
> returns a list:
>
> [u'jason',
Hi,
is there a way to check in bulk for record existence and get back a
map of results similar to what's returned by in_bulk(). In my case, I
need to look up records by a unique field which is not the primary key
and I don't want object instances back, just true or false.
Thanks
Dmitry
--
you need to be also using RequestContext in your view instead of the
regular Context. What does your view method's return statement look
like?
On Dec 28, 7:02 am, Lee Connell wrote:
> I didn't have TEMPLATE_CONTEXT_PROCESSORS at all, I copied the code
> and it did not
Woops, sorry, please ignore. I posted this to a wrong 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-us...@googlegroups.com.
To unsubscribe from this group, send email to
Hi,
Let's say I have several hundred instances of a task waiting in a
queue and this task needs a database connection to complete
successfully. Somewhere along the way the database goes down, so
tasks are starting to fail one after another. When this happens (say
when ), is there a way to
On Dec 18, 1:44 am, Łukasz Rekucki wrote:
>[...]The problem with putting signal handlers
> in __init__, is that it isn't the place you would really expect Model
> related code to live (like post_save). It can also lead to non-obvious
> cyclic imports, 'cause your handler code
Aren't an app's models loaded lazily (upon the first use)?
On Dec 16, 7:16 pm, "W. Craig Trader" wrote:
> I usually register the signals for a given application at the bottom of that
> app's model.py file.
>
> - Craig -
--
You received this message because you are
On Dec 16, 3:28 pm, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> On Friday, December 17, 2010 10:00:55 AM UTC+11, dmitry b wrote:
>
> Are you talking about UNIX process signals?
I'm sorry, I forgot there are two ways to interpret my question. It
is about Django si
Hi,
What is the best place to register a signal handler so that the
registration happens when the app is first initialized into django? I
have an app that needs to listen to signals generated by another app
and fire off celery tasks in response. I've tried placing the
registration code into the
Hi,
I've written a custom Storage that uses WebDAV as its underlying
engine. When I save a file '/foo/bar/file.ext', I want it to be saved
under /foo/bar in the webdav filesystem. However, it seems that
FileField overrides the directory structure:
def generate_filename(self, instance,
Hi,
How do I use Django's FileField with autogenerated files? That is,
these files aren't uploaded by a user, but rather are created on the
fly. I've looked at ContentFile, but this class doesn't seem to have
a way to attach a file name (the name is also computed at run-time
based on some
Hi,
My application has both stateful and stateless (REST) views. Stateful
views primarily back browser-based GUI, while stateless are for
RESTful service requests. Is there a way to disable session
management for the stateless requests?
Thanks
Dmitry
--
You received this message because
Hi,
What's the default transaction mode for django management commands?
Thanks
Dmitry
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send
Hi,
I have the following query:
AnalyzedFile.objects.filter(bug_signature__bug_condition__tracked_change=cr).values("scm__path")
In other words, the result is a list of AnalizedFile.scm.path values.
I'd like to change the query so that the returned value is a
combination of two fields: scm.path
Oops. Didn't see you reply. Thanks, I'll take a look at the command
extension.
BTW, the second link you provided is my own snippet :) I want to
improve it with auto documentation extracted from the actual view
functions.
On Jun 16, 11:40 am, Alexis Roda
So, no one is running automated tests?
On May 24, 4:16 pm, dmitry b <dmitry.ma...@gmail.com> wrote:
> Hi,
>
> I'm in the process of setting up automated selenium tests for a django
> app using Hudson. As part of the build script, I'm starting up a test
> server:
&g
Hi,
I'm in the process of setting up automated selenium tests for a django
app using Hudson. As part of the build script, I'm starting up a test
server:
$> python manage.py testserver --addrport 0.0.0.0:8080 ../../test/gui/
seed_data.json
However, when this line runs, I get the following
26 matches
Mail list logo