You are right, thanks.
2011/10/28 Russell Keith-Magee :
> On Fri, Oct 28, 2011 at 12:49 AM, Leonardo Giordani
> wrote:
>> This is a problem related to Innodb and MyISAM. Django uses this
>> latter,
>
> Incorrect. Django doesn't have any built in preference for InnoDB or
> MyISAM -- it uses the sy
I've been scouring Google and the Django documentation and I can't
figure out how to do this. I'm working on an inventory management
system for my shop. My inventory models.py similar to the following:
class ItemType( models.Model ):
def __unicode__( self ):
return "blah bl
I have extended the User model as explained here and in many other
sites.
However, when defining the User Profile Inline in admin.py, no matter
what values I use for max_num or extra, in the admin site it will
always show one inline for the user profile I have already created and
another blank one
Thank you all for your help and suggestions. Last time I installed
Django it took a full two days and I was nearly in tears at the end.
Most of the time was spend trying to solve the problems that Kurtis is
talking about, with the MySQLdb package. Although I am usually not a
person who takes shortc
On Fri, Oct 28, 2011, Russell Keith-Magee wrote:
>On Fri, Oct 28, 2011 at 12:49 AM, Leonardo Giordani
> wrote:
>> This is a problem related to Innodb and MyISAM. Django uses this
>> latter,
>
>Incorrect. Django doesn't have any built in preference for InnoDB or
>MyISAM -- it uses the system defau
On Fri, Oct 28, 2011 at 9:47 AM, Jose wrote:
> I have extended the User model as explained here and in many other
> sites.
>
> However, when defining the User Profile Inline in admin.py, no matter
> what values I use for max_num or extra, in the admin site it will
> always show one inline for the
PostgreSQL is great, you will have no regrets!
Cheers,
AT
On Fri, Oct 28, 2011 at 6:13 AM, angelika wrote:
> Thank you all for your help and suggestions. Last time I installed
> Django it took a full two days and I was nearly in tears at the end.
> Most of the time was spend trying to solve th
On Fri, Oct 28, 2011 at 7:50 AM, Alex wrote:
> I've been scouring Google and the Django documentation and I can't
> figure out how to do this. I'm working on an inventory management
> system for my shop. My inventory models.py similar to the following:
>
> class ItemType( models.Model ):
>
I'd give PostgreSQL a shot and see if it magically works for you. It's an
awesome database. If you have any problems with it though, here's the "easy
way out" I took. I just installed Mac Ports and never had another problem.
Of course, you'll have to make sure you're using the Mac Ports tools you
i
Hey Guys,
I'm trying to create a "router" as recommended in IRC for several
different views. My Views are UpdateViews, so they are the new CBVs. I
don't mind my router being a simple function based view, though.
Basically, a User can edit some data. This data changes based upon the
user's "class"
Nevermind! Thanks to FunkyBob, I have a solution. I didn't realize you could
do this so easily, so I'll share it with others.
# views.py
def my_router(request):
view = MyCBV.as_view(template_name = 'foo.html')
return view(request)
Of course, I actually have logic in my function -- but I'm
Hello Leonardo,
thanks your your answer.
> n = Company(name=my_name, country=my_country, isin=my_isin)
> n.save()
> n.indices.add(my_indices)
This causes that the company object has all indices in my_indices
(such as Dow Jones S&P 100, Dax, ...) as *choices*. I.e. someone who
manipulates these
Hi Tom,
Thanks for your reply.
Yes I want to have just one user profile.
And yes I have tried both OneToOne field and ForeignKey with
unique=True but it makes no difference in both cases I have this
problem
Regards,
José
On Oct 28, 11:41 am, Tom Evans wrote:
> On Fri, Oct 28, 2011 at 9:47 AM
How can i call changelist_view from my_app.views ? I'd like to save the
render html into the datebase.
i need sth like that: http://paste.ofcode.org/MVDJR2RhjnNL5QCBDVK3w6
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion
The add() method of a ManyToMany field adds the indexes of the given
objects to the field.
If you add a list, each index in the list is added to the field.
In the admin interface, when you edit a Company object, you see a
convenient automagically-created
menu which lists all Index object in your a
Hi all,
I'm trying to add a bit of jQuery to a page in a Django site. It seems
that my jQuery scripts are simply not loaded, while JS scripts work
perfectly.
Evan Firebug does not see the jQuery file as loaded.
This is what I do in base.html
{% block javascript %}{% en
Hello, Leonardo
First, which django version are you using? I recommend using the contrib
staticfiles app to handle your static files [1]. Once you get the hang of
it, it will pay off.
Second, see that you aren't getting 404 errors in the js URL. Using the dev
server, you can easily read through t
Hi, thank you for your detailed answer.
1. I'm on Django 1.3 (1.3.0-final). I'll take a look at staticfiles
for sure, thanks.
2. I'm getting no errors at all, other JS files in that directory load
perfectly. Firefox can reach them in source view.
3. I'll try it, but it seems to me strange not bein
I'm sorry if I'm not understanding you, but regarding 2 and 3, if jQuery
isn't being loaded, shouldn't you be getting a 404 error for the
jquery-1.6.4.js file?
Cheers,
AT
On Fri, Oct 28, 2011 at 11:30 AM, Leonardo Giordani <
giordani.leona...@gmail.com> wrote:
> Hi, thank you for your detailed
You are right, sorry.
jQuery is loaded, I can see it in Firefox and in Firebug.
If I write this statement
$(document).ready(function() {
}
in a working JS file, that file stops working, can be reached through
Firefox (it is loaded) but not by Firebug.
2011/10/28 Andre Terra :
> I'm sorry if I'
Sorry Andy and thank for your patience,
as I though the problem is simply simply bad JQuery.
$(document).ready(function() {
$('li').addClass("active");
}
what about some ");" to close statements?
Thanks
2011/10/28 Andre Terra :
> I'm sorry if I'm not understanding you, but regarding 2 and 3
Alright, I'm gonna give PostgreSQL a try over the weekend, I'll let
you know how it works out.
Thanks, guys!
/Angelika
On Oct 28, 12:49 pm, Kurtis Mullins wrote:
> I'd give PostgreSQL a shot and see if it magically works for you. It's an
> awesome database. If you have any problems with it though
Hello Angelika,
On Friday, October 28, 2011 2:13:20 AM UTC-7, angelika wrote:
creecode, I tried the commands you suggested first. No matter which
> version I switched to, it still said No module named django, which
> seems weird but there it is.
If your curious about where the old Django inst
Oh, that's right! Too often I miss the closing );, especially when *reading*
code.
It's very unfortunate javascript didn't have someone like Guido van Rossum
as BDFL. Life for web developers would surely be easier if it too were
developed with "be as readable as English" as a goal.
Glad to know y
Hi,
I've modeled a Book that has Chapters, with each Chapter having an ordering
'sequence'.
So when someone decides the first chapter in the book should become the
third, they can just change the sequence number.
That's fine, but when that happens, I want the other chapters to
automatically cha
Hello,
I am building a model which shares a relation with another model
using a ManyToManyField. What I need to do, is find out which models
are on both on two seperate ManyToManyField lists. Here is a simple
example of what I am trying to do:
Person:
friends=ManyToManyField(self)
To find
On Fri, Oct 28, 2011 at 2:35 AM, Daniele Procida wrote:
> COuld it still be the case that the issue is the result of the older Django
> database having used one engine by default, and the new one the other?
>
>
That is possible -- in a MySQL shell, run "SHOW TABLE STATUS", and you can
see the eng
Okay, I think I've got the exact steps down needed to get this running
right. If these are actually it, I'm not sure if I had any other
prerequisites I can't think of at the moment, then it's a matter of
copying and pasting 3 lines into your terminal. (Less than 5-10
minutes total)
1. Install "Bre
Just thought I'd add another example using Python script:
Person0 = Person()
Person1 = Person()
Person2 = Person()
Person0.friends.add(Person2)
Person2.friends.add(Person0)
Person2.friends.add(Person1)
Person1.friends.add(Person2)
Now, I would like to do the following, but it seems to fail:
Pers
Hi,
In my application, I have fixed groups (like admin, staff, subscribers)
etc, and this data in auth_groups is not intended to change in the program,
so I am loading them in initial_data.json. I also want to load data into
auth_group_permissions as the application is not expected to change i
On Wed, Oct 26, 2011 at 3:00 PM, Kurtis Mullins wrote:
> Check out userena as well. But a custom authentication back-end was the
> approach I originally took. And to answer your question, yes -- your chances
> of finding people w/ email addresses longer than 75 chars are less than
> finding people
Try this:
for friendof0 in Person0.friends.all():
for friendof1 in Person1.friends.all():
if friendof0 == friendof1:
# Person 0 and Person 1 share a friend.
else:
# They have no shared friends.
Brett
On 10/28/11 12:59 PM, "Kevin" wrote:
>Just though
Hi Tim,
The problem is your use of the self keyword when trying to get at the
ChapterMembership manager. Instead of:
chapters = self.objects.filter…
Try:
chapters = ChapterMembership.objects.filter…
Hope that helps,
Brett
From: Tim mailto:jtim.arn...@gmail.com>>
Reply-To: mailto:django-use
Thanks. Is this way good for database optimization though? I guess I
could use select_related(). I was hoping there was a QuerySet I could
run.
I made this one, although I'm not sure if it works correctly:
Person.objects.filter(name='Person1').filter(friends__friends__name='Person0')
This outp
I think the filter I used does work to detect related friends, here is
a Pythonic example of the same code, but done differently without
filters:
Person.objects.get(name='Person1').friends.get().friends.all()
Instead of returning back 'Person1', when using filters, this returns
back 'Person0'.
P
Hi Django guys,
I want to customize an admin form. I heard that we can customize django
admin template by putting template file called template change_list.html in
template folder. My model is like this cms.model.application. So for the
application model how can i create custom templates in admin.
Hi Brian,
That helps indeed! The code is working now; seems like I need to work on
the logic, but now I'm getting somewhere.
thanks,
--Tim
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups
I'm going to guess that my version is slow since a new query would be run
for each row returned by the initial one.
Check out an app called django-debug-toolbar. It has a view that will
show you all of the SQL queries generated as a page is built. It will
also tell you how long each query took t
Hi all,
I'm trying to implement a generation-style caching system with django
[1]. I found django-jimmypage [2] which implements an alternative
version of @cache_page, and it uses johnny-cache [3] for an "infinite"
cache timeout. However, most of the code in django-jimmypage appears
quite simila
Hi Django folks -
I'm new to Django, and I just want to use the template system now,
independent of the rest of Django. But I can't get it to see a
template. Even the system templates as was suggested when I started
Googling for my error.
>>> import django.template
>>> django.conf.settings.config
40 matches
Mail list logo