I have successfully installed psycopg2 and postgresql, start a project
and app,
in project's settings.py DATABASE_ENGINE = 'postgresql_psycopg2'
but after I run manage.py syncdb, it shows error:
http://pastebin.com/m3538debc
could anyone help me make sure which config is wrong or am I missing
On Sat, 2007-07-28 at 19:44 -0700, Greg wrote:
> I tried to implement the above view. However, I'm having errors.
> Again i think it has to do with the u character in my dict. Here is
> my view:
[... snipped ...]
> This is the error I get:
>
> MultiValueDictKeyError at /rugs/cart/addpad/
>
I tried to implement the above view. However, I'm having errors.
Again i think it has to do with the u character in my dict. Here is
my view:
def addpad(request):
if request.method == 'POST':
pads = request.session.get('pad', [])
pad =
Hello,
I have recently begun testing LimitRequestBody to limit file uploads.
It works but there are some issues. Whenever the uploaded file hits
the limit, I get "Connection reset by peer". Ideally I would like to
be able to redirect the user to an error page but it seems that Django
tries to
On Sat, 2007-07-28 at 19:36 +0300, Andrey Khavryuchenko wrote:
> Russell,
>
> RK> On 7/27/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote:
> >>
> >> Then I've paused and wrote DbMock class for django that uses some black
> >> magic to steal django db connection and substitute it with
On Fri, 2007-07-27 at 05:42 -0700, Gilbert Fine wrote:
> I used django rev. 5559 for some time. After svn up today, I found
> CharField's cleaned_data is unicode. I think it is a good idea.
> Actually, I made this conversion in my source program.
>
> The only question is how to specify encoding
On Jul 28, 1:33 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Yeah I was going to post a sample if that's what he said next :) Here
> is another sample in addition to the link above .. on how to pass the
> menu code via context processors:
That works great! Thanks a bundle Carole!
On Tue, 2007-07-24 at 20:59 +0800, Russell Keith-Magee wrote:
> On 7/24/07, PyMan <[EMAIL PROTECTED]> wrote:
> >
> > Can anyone tell me why Django do this while using save()? :
>
> The behavior comes from the Object relational mapping (key word -
> Object). Since save() is an operation on an
On Mon, 2007-07-23 at 15:20 +0200, Peter Melvyn wrote:
> Hi all,
>
>
> I have a box containing some static texts in different languages and I
> would like to plug-in into few pages as inclusion tag.
>
> But I'm not able to find-out a way how to supply language code for its
> template name
On 7/28/07, Cole Tuininga <[EMAIL PROTECTED]> wrote:
> I could do something like a simple many to many relationship in the
> attendee model, but that doesn't indicate ordering (most preferred to
> least preferred) per timeslot.
You might want to look at thisL
When you use a ManyToMany field, a "private" table (not tied to a
model like other tables) is created in the database with something
like the following (created via the contrib.auth.User's
user_permissions field:
id, user_id, permission_id
If you wanted to create your own table that mirrors this
On Fri, 2007-07-20 at 07:36 -0700, [EMAIL PROTECTED] wrote:
> Hi,
> Can I terminate a connect without receiving all HTTP request
> package? I have to check if there are some important data, if not,
> just terminate it.
No. This doesn't actually make sense for something like Django. By
Copia y pega en tu navegador el siguiente link y empieza a generar
beneficios al instante.
http://groups.google.com/group/grandes-genios-de-la-economia
.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
Hi,
> [...]
> All models etc. are the same in each, but we expressly don't want to
> store same data in same table (i mean all companies bank accounts are
> in different tables)
> We have to create new 'database' dynamically from a web based
> interface seamlessly.
> Did you solve similar
Henrik Lied escribió:
> When you say "installs", do you mean that the plugin is retrieved from
> the external site, and placed somewhere on the users host, or is it
> constantly querying the plugin on a remote computer?
>
> The first of those two options would definitely be the best. But I'm
>
Hi,
> Oh, I do that, but it still requires setting the variable "menu" in
> every single view based on that template.
You may want to check out Jinja [1], a templating engine very close to
the Django one, which enables to set variables in the template. It's
not very much advertised here, but
Hi Anna,
On 7/28/07, anna <[EMAIL PROTECTED]> wrote:
>
> Hello my friends.
>
> I need your help in designing our new based application.
> The goal is to build a kind of backoffice system, which helps to
> organize all data of a specific company.
> No problem with it. Build your models, data
Hello my friends.
I need your help in designing our new based application.
The goal is to build a kind of backoffice system, which helps to
organize all data of a specific company.
No problem with it. Build your models, data structures, input and
output 'screens'.
But...
this application goes
On Jul 28, 12:30 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Why not have a base template that contains the menu variable ( I put
> mine in a session variable accessible to the templates named menu ),
> then have all of your other templates extend from that template?
Oh, I do that, but
Yeah I was going to post a sample if that's what he said next :) Here
is another sample in addition to the link above .. on how to pass the
menu code via context processors:
In your settings.py file ...
Find the line that says (there may be more in there depending on your
setup):
I've tried something like this:
def my_callback(field, **kwargs):
if field.name == 'pub_date':
return SplitDateTimeField(**kwargs)
else:
return field.formfield(**kwargs)
class mySplitDateTimeWidget(SplitDateTimeWidget):
def __init__(self, attrs=None):
I could be wrong, but I think the problem he's having is having to
specify the menu variable in the context for every view, not the
template end of it...
To fix that, you will want to check out context processors:
Hey all - I was hoping I could solicit some help with a model design.
I'm using 0.96 rather than the svn version at the moment.
I'm working on a website for my wife that is intended to help with
taking registrations for a conference. The idea is that each workshop
in the conference has a
Why not have a base template that contains the menu variable ( I put
mine in a session variable accessible to the templates named menu ),
then have all of your other templates extend from that template?
In base.html:
your header code
{% block menu %}
{{ menu }}
{%
I've got a nav.html template that does the menu on every page. The
only trouble is I have to store the menu items in a global variable
and pass it to the page template in every view. Is there any way to
make a view for the nav.html template (which is included in all the
page templates)? I imagine
Russell,
RK> On 7/27/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote:
>>
>> Then I've paused and wrote DbMock class for django that uses some black
>> magic to steal django db connection and substitute it with temporary sqlite
>> in-memory db.
RK> How is this different to the default
Hi,
sorry.. were just two users had fun typing in a wrong age. :-)
--~--~-~--~~~---~--~~
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
Hi Bram,
On 7/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>
>
> http://www.splicemusic.com/
Looks cool, just one thing:
Isn't the age displayed wrong? Every user is about 90 years old. :-)
Kai
--~--~-~--~~~---~--~~
You received this message because
Bram - Smartelectronix <[EMAIL PROTECTED]> writes:
> I would LOVE to use caching for both anonymous and logged in users, but
> the problem is that every page on our site (http://www.splicemusic.com)
> has the typical "hello username | log out | ..." at the top of each page.
>
> Now, how can I
It occurs to me that django-admin looks for a template page in the project
and it it isn't there, it defaults to another admin template. It would seem
as though it might be good for modularity if we had something similar to:
attempts to render app1
/home/dev/django/proj1/template_dir/app1
Ok, so I've been thinking some more.
The model could be something like this:
class Plugin(models.Model):
"""(Plugin description)"""
pointer = models.FilePathField() ## Could work, right?
name = models.CharField(maxlength=200)
description = models.TextField(blank=True, null=True)
Right... because, unless I'm misunderstanding your code... you're
creating a select drop down for each of your RugPad entires with the
RugPad id. So you know that the request.POST is going to have entries
for each id...
But..I think it should be this:
opads = RugPad.objects.all()
for a in
hello everyone,
I would LOVE to use caching for both anonymous and logged in users, but
the problem is that every page on our site (http://www.splicemusic.com)
has the typical "hello username | log out | ..." at the top of each page.
Now, how can I possibly cache both anonymous and logged in
Awesome, sorry about the duplicate reply! Thanks so much, though
-Robert
On Jul 27, 11:11 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/28/07, Robert <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi all-
> > I'm very new to django, so pardon my faulty nomenclature!
> > I'm trying to create
Carole,
So your saying that I should do:
opad = RugPad.objects.all()
for a in opad.id
if request[a] != 0
.#add to session
On Jul 28, 8:43 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Greg... I'm curious as to why you're iterating over the entire
> request.POST when
When you say "installs", do you mean that the plugin is retrieved from
the external site, and placed somewhere on the users host, or is it
constantly querying the plugin on a remote computer?
The first of those two options would definitely be the best. But I'm
having some problems working it out
Bravo Bram!
Looks really cool.
It's one of best sites made with django i've seen.
On Jul 28, 1:19 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> http://www.splicemusic.com/
>
> ( summary: upload sounds, load them into a flash audio sequencer with
> effects and synthesizers + standard
> Dan, ifequal cannot evaluate its arguments. They must be variables,
> numbers or constants in quotes.
Thanks Stefan, I'll remember that in future.
> But you can do this:
>
> {% for item in menu_items %}
> {% if forloop.last%} class="last-item"{% endif %}
> {% endfor %}
>
Thanks Nathan,
Greg... I'm curious as to why you're iterating over the entire
request.POST when you could just use the id of each pad that you've
previously passed to your template to retrieve it from the
request.POST dict, as that is what you've named your select statements
with?
While iterating through all
Nathan,
Thanks for your help...I got it working. This is what I used:
if values != list("0"):
Is that what you were recommending? Because I couldn't convert a list
(values) to a int. Since values was a list I decided to convert my
int to a list and that worked. Can you tell me what the u
hello everyone,
I have a rather "well connected" model like this ( used here:
http://www.splicemusic.com/contests/ ):
class Contest(models.Model):
[ snip of regular fields ]
# the sounds people HAVE to use to enter the contest
required_sounds = models.ManyToManyField(Sound,
http://www.splicemusic.com/
( summary: upload sounds, load them into a flash audio sequencer with
effects and synthesizers + standard community features)
thanks a lot to all the people who have helped me getting this thing up
and running! :-)
cheerio,
- bram
Nike Shoes
Air Force I
Air Jordan 1-10
Air Jordan 11-22
Nike Dunk SB
Nike Dunk SB For Women
Air Max Series
Nike Shox R4
Nike For women
Adidas Shoes
Adi Color
Adidas Campus
Almad escribió:
> Hi,
>
> I'd like to ask how to organize Django application. To me, structure
> of project/app is nice idea, however I have problems applying it in
> practice, so I'd like to ask about best practices.
>
> Problems come, when application structure become deeper and nested. Is
> it
Henrik Lied escribió:
> This is great, Chris, but the fact of the matter is that it won't
> appeal to the "Wordpress crowd".
> That group wants in-browser setup, easy plugin architecture etc.
> contrib.admin wouldn't do the trick. The admin-panel would have to be
> hand made.
>
> For the plugin
To illustrate with the Python shell:
>>> 0 == "0"
False
>>> 0 == int("0")
True
On Jul 27, 11:10 pm, Sean Perry <[EMAIL PROTECTED]> wrote:
> On Jul 27, 2007, at 10:36 PM, Greg wrote:
>
> > AssertionError at /rugs/cart/addpad/
> > [u'0']
>
> > Does that mean that the value is 0? below is my view
2007/7/28, Eloff <[EMAIL PROTECTED]>:
>
> Thinking myself clever I added enumerate as a filter and did:
>
> {% for i, item in menu_items|enumerate %}
> {% ifequal i|add:1 menu_items:length %} class="last-item"{% endifequal
> %}
Dan, ifequal cannot evaluate its arguments. They must be variables,
ifequal can't do filters, unfortunately.
But you can do this:
{% for item in menu_items %}
{% if forloop.last%} class="last-item"{% endif %}
{% endfor %}
Or
class="{{ forloop.first|yesno:"first," }} {{ forloop.last|
yesno:"last," }}"
On Jul 27, 11:42 pm, Eloff <[EMAIL PROTECTED]> wrote:
>
Thinking myself clever I added enumerate as a filter and did:
{% for i, item in menu_items|enumerate %}
{% ifequal i|add:1 menu_items:length %} class="last-item"{% endifequal
%}
To me I expect it to be true only for the last item, I printed {i|add:
1} and it works as expected. However, what
On Jul 27, 2007, at 10:36 PM, Greg wrote:
> AssertionError at /rugs/cart/addpad/
> [u'0']
>
> Does that mean that the value is 0? below is my view function and
> template code:
That little 'u' in front of the '0' means unicode so the value is the
unicode string "0" not the number zero. Very
50 matches
Mail list logo