Mike Lake schreef:
> Hi all
>
> Im trying to place into a list of experiments the number of procedures for
> each experiment.
> From within the views.py I can save the number of procedures in an experiment
> into either a list of tuples (e.id, count) or a dictionary {'e.id': count}.
> But when
On Thu, 2007-02-15 at 04:54 +, akonsu wrote:
> hello,
>
> in my models.py i have two classes related as many-to-many. if i add a
> ManyToManyField to one of the models, and run manage.py reset or
> syncdb, and then move the field to the other model (which functionally
> makes no difference) a
hello,
in my models.py i have two classes related as many-to-many. if i add a
ManyToManyField to one of the models, and run manage.py reset or
syncdb, and then move the field to the other model (which functionally
makes no difference) and run manage.py reset again, it fails to reset
the database
The problem I have with this is that, if I'm correctly understand what
goes on, when I do a select_related all the related objects are
retrieved. In this case, if a user has made, say, 4000 posts plus
other types of contributions, it seems like it's pulling in a lot of
unnecessary data.
Am I misu
AJAX is the better solution, u need to poll the server with a small interval
in your web client.
On 2/15/07, oggie rob <[EMAIL PROTECTED]> wrote:
>
>
> > is there a way to save the request so i can send a response later
> (when the are new items).
>
> You can't send a much-delayed response to brow
Hi all
Im trying to place into a list of experiments the number of procedures for each
experiment.
>From within the views.py I can save the number of procedures in an experiment
>into either a list of tuples (e.id, count) or a dictionary {'e.id': count}.
>But when I come to access them in the
On 2/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> limodou made a script that dumps the data to django ORM format:
> http://groups.google.com/group/django-users/browse_thread/thread/b7423a8944770ec/189c26faa9bd823c
... and ticket #2333 has a database dumping capability that will be
roll
On Feb 14, 2007, at 2:46 PM, James Tauber wrote:
> If the formatting could be applied to different classes, I'd use a
> filter. If the formatting only makes sense for Houses, I'd make it a
> method on House.
And you might even want to make it a __str__() method, I do that for
some of my models
limodou made a script that dumps the data to django ORM format:
http://groups.google.com/group/django-users/browse_thread/thread/b7423a8944770ec/189c26faa9bd823c
the + is that you can move data between databases (like sqlites -
postgres) and you don't have to care about db encoding ;) (for non
la
And please note, this was probably nabbed from some example online and
modified to suit my needs, please don't attribute it to me, it's only
as an example for you ;)
Clint
On 2/8/07, Tipan <[EMAIL PROTECTED]> wrote:
>
> I've been able to create Plain text emails to send to users with an
> authen
Forgot to include my send_mail function:
http://dpaste.com/hold/5682/
On 2/8/07, Tipan <[EMAIL PROTECTED]> wrote:
>
> I've been able to create Plain text emails to send to users with an
> authentication link which work well, however I'd like to improve the
> look of these by outputting in HTML w
Here is a bit of code from a project I did, let me know if I should
explain anything:
http://dpaste.com/hold/5681/
Seems to work just fine for me!
On 2/8/07, Tipan <[EMAIL PROTECTED]> wrote:
>
> I've been able to create Plain text emails to send to users with an
> authentication link which work
Well I made a little script that dump the database content insert
statements of a django application, useful for creating the initial
data of an application. I don't know if this has been done or if it's
a feature of the many tools that django provides, but it have fun
making it.
#!/usr/bin/env p
If the formatting could be applied to different classes, I'd use a
filter. If the formatting only makes sense for Houses, I'd make it a
method on House.
James
On 14/02/2007, at 9:51 PM, Jonathan Ballet wrote:
>
> Hello everybody,
>
> some days ago, my co-worker did some things which keep b
On Wed, 2007-02-14 at 13:51 -0800, Jonathan Ballet wrote:
[...]
> The title is a mix of some fields of a house object : for ex., if the
> number of rooms is not available, it is not displayed, etc.
> (currently, it's a 30 lines function).
> He ends up with a title which looks like this : "House fo
On Wed, 2007-02-14 at 17:00 +0100, Frank Tegtmeyer wrote:
> "James Bennett" <[EMAIL PROTECTED]> writes:
>
> > you had two apps named "payment", it wouldn't just affect templates --
>
> Right. Thanks for all the answers.
>
> My next question is about parameters for applications: how does one do
Hello everybody,
some days ago, my co-worker did some things which keep bothering me.
He has a simple model, which represents, as it's name point out,
err ... houses :
class House(models.Model):
price = models.FloatField(max_digits=10, decimal_places=2)
to_buy = models.BooleanField(defa
On 15-Feb-07, at 1:49 AM, [EMAIL PROTECTED] wrote:
> Django is very good for CMS like apps. I develop Diamanda Wiki and
> MyghtyBoard forum (www.rkblog.rk.edu.pl) and each app has it's own
> folder for code/templates and can be rather easily used in other
> projects :)
if you want a readymade c
Django is very good for CMS like apps. I develop Diamanda Wiki and
MyghtyBoard forum (www.rkblog.rk.edu.pl) and each app has it's own
folder for code/templates and can be rather easily used in other
projects :)
--~--~-~--~~~---~--~~
You received this message becau
CMSes like joomla and drupal have a rich assortment of plugins/modules/
extensions for stuff like: blogs, forums, galleries, news aggregators,
ecommerce, document management, and so on.
How difficult would it be to get that sort of functionallity from
dango?
--~--~-~--~~
I know that building your own blog in Django is almost a rite of passage
but I am building another app and would like to use a blog plus some other
cms-type django goodness for the app website.
I've found a few links for working blog code in Django but not much that
seems to be actively worked on
On 2/14/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
> It's worth noting that to use the MEDIA_URL settings in your template,
> you'll need to either pass it down through the views into the Template
> context, or write a quick little middleware that always pushes it into the
> context (which is what
Help! I have a function that is provided below. When I try the
individual lines of the function through the interpretor (Ipython)
everything works as expected. For example:-
>> qset=PointTransaction.objects.filter etc this works fine!!
However, when I try to run the function as a
I looked through the documentation, and tried a few experiments - it looks
like you can't - but I wanted to make sure I wasn't doing something wrong:
We tried to do something like:
{% if {{trigger_variable}} %}
{% block foo %}
{% endblock foo %}
{% else %}
{% block altfoo %}
{% endblo
Absolutely correct -
I was a bit confusing - if the integer is kept in a "text field" - the
sorting may not be what you expect.
-joe
On 2/14/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
>
> On 2/14/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
> > Certainly - if a field is just an integer, use th
It's worth noting that to use the MEDIA_URL settings in your template,
you'll need to either pass it down through the views into the Template
context, or write a quick little middleware that always pushes it into the
context (which is what I did).
Then you can use:
wrote:
>
>
> * johnny wrote, O
> is there a way to save the request so i can send a response later
(when the are new items).
You can't send a much-delayed response to browser clients. the http
request will time out if it doesn't get a response in time.
I think you need to look to AJAX. Get a response immediately & keep
queryi
On 2/14/07, Joseph Heck <[EMAIL PROTECTED]> wrote:
> Certainly - if a field is just an integer, use the .order_by('fieldname') or
> .order_by('-fieldname') and that should do the trick nicely.
Actually, you should be able to order by any field, not just an integer.
--
"Bureaucrat Conrad, you ar
There's a sort of long-run-pending discussion on adding this functionality
to the Django core - check out
http://code.djangoproject.com/ticket/1541which includes patches that
you can use in your own code to get the job done
in the mean time
-joe
On 2/8/07, Tipan <[EMAIL PROTECTED]> wrote:
>
>
> I
Certainly - if a field is just an integer, use the .order_by('fieldname') or
.order_by('-fieldname') and that should do the trick nicely.
-joe
On 2/7/07, MerMer <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Is it possible to sort a query set based on an integer in one of the
> fields.
>
> MerMer
>
>
> >
>
this is my first web-app, so i didnt know twisted.
looks nice. thx!
--~--~-~--~~~---~--~~
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
Hi,
Try this (http://code.djangoproject.com/wiki/NewbieMistakes):
Django says "Unable to Open Database File" when using SQLite3 ¶
Problem ¶
You're using SQLite3, your DATABASE_NAME is set to the database file's
full path, the database file is writeable by Apache, but you still get
the above erro
"James Bennett" <[EMAIL PROTECTED]> writes:
> you had two apps named "payment", it wouldn't just affect templates --
Right. Thanks for all the answers.
My next question is about parameters for applications: how does one do
that in Django?
Say I want to have two different photo galleries, both
On 2/14/07, Frank Tegtmeyer <[EMAIL PROTECTED]> wrote:
> except that there is no central registry for application names, right?
> So one could have two applications called "payment" where one would be
> for credit cards, the other for anonymous payment. What if he needs
> both and they are made by
Hi Geert,
> - Non name clash
except that there is no central registry for application names, right?
So one could have two applications called "payment" where one would be
for credit cards, the other for anonymous payment. What if he needs
both and they are made by someone else?
Ok, not very like
David Abrahams wrote:
> I just wrote some code that used Model instances as keys in a dict,
> and was surprised to find two instances in the dict that represented
> the same object in the database. Shouldn't that be impossible? If
> you can't guarantee that a given object in the database is alwa
Both suggestions seem plausible, I will have to try it out and see
what makes the most sense for me. I might have to restructure the
layout of the site to be more logical (I knew this would come back to
haunt me). Thanks all, I will post my results soon.
Regards,
Leo.
--~--~-~--~~--
I just use a generic list view and send it
user_dict = {
'queryset': GpUser.objects.all(),
}
GpUser is my model that extends auth.user
On Feb 14, 2:47 am, "Aidas Bendoraitis" <[EMAIL PROTECTED]>
wrote:
> Your profile perhaps is related by a foreign key to the user, which
> means that theore
Hi Frank,
On 14 Feb 2007, at 11:45, Frank Tegtmeyer wrote:
>
> Hi,
>
> I ave a question about the philosophy behind the template loading
> mechanism (my background is Zope2 with the "local overrides global"
> approach).
> If I understand it right, all the (standard) template loaders form a
> nam
I found one small mistake. CommaSeparatedIntegerField doesn't have
auto_now and auto_now_add, so they should be removed from the
appropriate place in the cheet sheet.
Regards,
Aidas Bendoraitis [aka Archatas]
On 2/14/07, Julian Romero <[EMAIL PROTECTED]> wrote:
> On 2/13/07, John Sutherland <[E
On Feb 14, 7:00 am, "samira" <[EMAIL PROTECTED]> wrote:
> we can have two ways to store data in cookie: Session for permanent
> and cookie for temporary. Am I right?
Not exactly. Data stored in session is held on the server. The
session middleware uses a cookie to give the client a session id s
Benedict Verheyen schreef:
I now defined the fields in my custom change manipulator:
self.fields = (
forms.PositiveIntegerField(field_name="Admissionnr", is_required=True),
...
forms.SelectField(field_name="kamer", choices=room_choices),
...
)
This displays the correct list of available bed
Did you tried twisted?
http://twistedmatrix.com/projects/core/documentation/howto/async.html
On 2/9/07, Dill0r <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> i got a producer-consumer class which await new items from the
> clients, does sth with them and provides them to all clients.
>
> the url "getNe
On 2/13/07, John Sutherland <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> Firstly, sorry for the cross-post.
>
> My employer, Mercurytide [1], as some of you may have seen in the
> past, publishes white-papers on a monthly basis. This month it's
> another Django themed one: a Django cheat sheet:
>
>
Hi,
I ave a question about the philosophy behind the template loading
mechanism (my background is Zope2 with the "local overrides global"
approach).
If I understand it right, all the (standard) template loaders form a
namespace for templates that is used for all applications within a
site:
app1
On Wed, 2007-02-14 at 11:26 +0100, Bram - Smartelectronix wrote:
> Malcolm Tredinnick wrote:
> > At the moment, the only workaround is to call out to your own shell
> > script (or other) to do the insert. If you have a look around line 506
> > of django/core/management.py, you can see where Django
I've installed django with mod_python on an apache2 server configured
as below.
When I run /blog/ it works fine but when I try to fire up the /admin/
I get:
OperationalError: unable to open database file
full error below..
I have absolutely no clue how to proceed.
the database is initialized with
Malcolm Tredinnick wrote:
> At the moment, the only workaround is to call out to your own shell
> script (or other) to do the insert. If you have a look around line 506
> of django/core/management.py, you can see where Django emits a
> "post-syncdb" signal after setting up the database, so you can
Your profile perhaps is related by a foreign key to the user, which
means that theoretically one user can have several profiles.
Therefore, in my opinion, you should get the profiles and use
select_related() for related users.
profiles =
UserProfile.objects.select_related().order_by('user__id')[
49 matches
Mail list logo