On Fri, 2010-08-06 at 14:03 -0700, kostia wrote:
> I have a footer on my site. It has to be filled in with data which
> comes from the database. Each view will have to load this common
> footer data. How can I organise such a behaviour in my views.py file?
try templatetags
--
regards
Kenneth Gon
My database is UTF-8, it's fine, doesn't?.
I'm afraid to reinstall everything from ports and start to get a lot 64-32
bits incompatible issues like happened before =/
2010/8/6 Daniel França
> ops, sorry. python 2.7 django 1.2.1 =}
> thanx, I'll look at this
>
>
> On Fri, Aug 6, 2010 at 1:02 PM,
Hello, all;
I wanted to reach out to the list regarding a full-time Front-End Web
Development role that I have with a stealth-mode startup that is
looking to change the way that people are protected online. They’re
well & recently funded, and have a small core group in place, so this
is very good
Hello, all;
I wanted to reach out to the list regarding a full-time Front-End Web
Development role that I have with a stealth-mode startup that is looking to
change the way that people are protected online. They’re well & recently
funded, and have a small core group in place, so this is very go
On Aug 6, 2010, at 8:36 AM, Margie Roginski wrote:
> Could anyone give me some pointers as to how you deal with taking your
> site down for maintenance? Is there some standard thing that people
> do to redirect all page requests to some sort of "Sorry, the site is
> down" page?Do you do this
I have an admin set up with three inlines. I would like to filter the
inline's editable options by a variable that is defined in a settings
file. I can over ride the actual admin pieces for each of the inlines
(they all have full admin screens of their own). But I can't seem to
get the standard d
On 8/6/2010 5:40 PM, kostia wrote:
> Great, it works and is easy to understand. And that is despite an old
> article.
> Thank you, man.
>
No problem. I found out about them pretty much the same way you just have :)
--
I'm no expert.
"ex" == "has-been"; "spurt" == "drip under pressure"
"expert" ==
Great, it works and is easy to understand. And that is despite an old
article.
Thank you, man.
--
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, se
On 8/6/2010 5:03 PM, kostia wrote:
> I have a footer on my site. It has to be filled in with data which
> comes from the database. Each view will have to load this common
> footer data. How can I organise such a behaviour in my views.py file?
>
> I guess it is a separate function, but I'm django n
Hi All,
When I run manage.py sqlall test, I get the proper MySQL create
statements for my models, (Phone,Room).
Room has a ManyToManyField(Phone) field, so I also get the proper
intermediate Room_phones table:
BEGIN;
CREATE TABLE `Phone` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY , bl
To clarify - I get a 404 message with DEBUG on (i.e. DEBUG=True), and
a 500 message with DEBUG off (DEBUG=False), not the other way around.
Regards
Meenakshi
On Aug 6, 1:21 pm, Steve Holden wrote:
> On 8/6/2010 3:59 PM, meenakshi wrote:
>
> > Hi Steve,
> > I do have the DEBUG setting on Fal
I have a footer on my site. It has to be filled in with data which
comes from the database. Each view will have to load this common
footer data. How can I organise such a behaviour in my views.py file?
I guess it is a separate function, but I'm django newbie, so please,
keep your pulse.
--
You r
OK, I appreciate your message. Actually I've already saw some messages about
it, but with no satisfatory answers.
The line in the code that cleans the field raw_post_data when content-type
is "multipart*" screws everything up. But the major problem seems to be do
not handle multipart messages very
On 8/6/2010 3:59 PM, meenakshi wrote:
> Hi Steve,
> I do have the DEBUG setting on False. The reason is that when I
> set DEBUG to True, I get the following message:
>
>
> Page not found (404)
> Request Method: GET
> Request URL: http://127.0.0.1:8000/
>
> Using the URLconf defined i
Hi everybody, I am working on windows XP with django 1.2, I have downloaded
a django web aplication but I continuely get a message error like this:
"ImproperlyConfigured: Error importing middleware django.middleware.csrf:
"No module named csrf" I have not idea why this is happening, could you help
Hi Steve,
I do have the DEBUG setting on False. The reason is that when I
set DEBUG to True, I get the following message:
Page not found (404)
Request Method: GET
Request URL:http://127.0.0.1:8000/
Using the URLconf defined in mysite.urls, Django tried these URL
patterns, in thi
It's always a hazzard to simplify the code because you can make errors
simplifying, causing folks to spend time trying to figure out the wrong
stuff. If the code is big it may be appropriate to excerpt, but other than
sanitizing out sensitive information, it's best not to edit the stuff you
do pas
ops, sorry. python 2.7 django 1.2.1 =}
thanx, I'll look at this
On Fri, Aug 6, 2010 at 1:02 PM, wrote:
> Hi daniel,
>
> I doubt your python version is 1.2.1, maybe it's rather Django version :)
> However, the issue django stated looks pretty clear to me. You created a
> database with a wrong enc
I'm trying to setup Webshell in one of my Django Password protected pages.
Webshell is a python script which starts its own server and your designated
port it displays a shell on ava enabled web browser that connect to
localhost. It tests good when i display it with an Iframe
http://webshellurl.ne
On Fri, Aug 6, 2010 at 12:17 PM, Joshua Russo wrote:
> On Aug 6, 9:57 am, "J. Cliff Dyer" wrote:
> > "Joshua Russo" wrote:
> > >On Thu, Aug 5, 2010 at 10:53 PM, Steve Holden
> wrote:
> >
> > >> On 8/5/2010 7:16 PM, Joshua Russo wrote:
> > >> > On Aug 4, 6:49 pm, Hassan wrote:
> > >> >>> Ok, so
@Bill
Thanks. I just stumbled across that widget. I know models.Model
weren't there, I was trying to simplify thinking we'd all know they
were there. I guess, never assume ;)
Looks like I don't even have to worry about that check_test field
after all. Using initial worked perfectly.
def get_
Hi,
maybe there are some dependencies between this reordered apps? Could
you describe a bit more them?
best regards,
On Fri, Aug 6, 2010 at 6:15 PM, Thales wrote:
> It seems to be a django bug. I changed the apps order in INSTALED_APPS
> in settings.py and everything started to work correctly.
folks -
This is really annoying me. I want to set DEBUG=False for production
and catch all errors logs (in my case, 500) in the servers log file.
Sounds simple enough, but not the case here. DJango seems to only want
to send such errors via email. When I generate a 500 error, then
500.html gets di
On Aug 6, 7:13 pm, lingrlongr wrote:
> Having difficulty getting the check_test to work. Can't find any
> examples out there that help. I'll probably have to give a little
> background. I simplified where able to...
>
> class Cat:
> name = CharField
>
> class Category:
> name = ForeignKey(C
There is a CheckBoxSelectMultiple widget in django.forms, suitable
for use with a forms.ModelMultipeChoiceField, and probably with
other stuff.Doesn't it do what you need? Or are you just reinventing
the wheel.
And, of course, your code as shown doesn't work because Cat and
Category are not b
Thanks, Carlos!
Brian
On Aug 5, 12:59 pm, Carlos Daniel Ruvalcaba Valenzuela
wrote:
> There is an option to default to InnoDB tables on the configuration:
>
> http://docs.djangoproject.com/en/dev/ref/databases/#creating-your-tables
>
> Regards,
> Carlos Daniel Ruvalcaba Valenzuela
>
> On Thu, Au
Forgo the most important part. I want to be prompted with a
checkboxes that show which categories are selected, as well as the
ones that aren't.
On Aug 6, 2:13 pm, lingrlongr wrote:
> Having difficulty getting the check_test to work. Can't find any
> examples out there that help. I'll probably
Also, see
"Maintenance Mode for Django Sites"
http://www.weavingtheweb.com/professional-blogs/78-maintenance-mode
and this related link
http://pypi.python.org/pypi/django-maintenancemode/
HTH,
John
On Aug 6, 9:24 am, Margie Roginski wrote:
> Thank you very much - that all makes perfect sense.
>
okay that's great but is there a way to get the list of fields from a
model instance instead of from the Model class itself?
My thought is that if I pass in the list of model instance into the
template, the order should be still there. so why pass in another
variable which contains the model fields
Having difficulty getting the check_test to work. Can't find any
examples out there that help. I'll probably have to give a little
background. I simplified where able to...
class Cat:
name = CharField
class Category:
name = ForeignKey(Cat)
weight = DecimalField
item = ForeignKey('Item'
On 8/6/2010 1:34 PM, owidjaya wrote:
> is there a way that i can get the a list of dictionaries as a result
> with the dictionary having the same field order as the table?
>
What do you regard as the "field order" of the dictionary? If you are
talking about the order Python iterates over the field
You can't use a dictionary if you expect a certain order of key/value pairs.
Given model A you could get a list of field objects in the same order (I
think) as defined in the model class
A._meta.fields
At least with that information you could programatically produce a list of
data in matching or
On 8/6/2010 1:23 PM, kostia wrote:
> The question of clarity:
>
> What is the best way to do:
> project.pk
> or
> project.id
> ?
>
Well, pk will always work no matter what the field is named, so I tend
to prefer that. It's mostly a matter of style, though.
regards
Steve
--
I'm no expert.
"ex"
is there a way that i can get the a list of dictionaries as a result
with the dictionary having the same field order as the table?
On Aug 6, 10:18 am, Daniel Roseman wrote:
> On Aug 6, 6:08 pm, owidjaya wrote:
>
> > I checked it and the field order still not the same.
> > Just to clarify. I want
The question of clarity:
What is the best way to do:
project.pk
or
project.id
?
--
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
d
Part of my urls.py:
...
url(r'^project/(?P\d+)/event/(?P\d+)$',
views.event, name="event"),
url(r'^project/(?P\d+)/event/edit/(?P\d+)$',
views.edit_event, name="edit_event"),
url(r'^project/(?P\d+)/event/new/$', views.edit_event,
name="new_event"),
...
I see, I need to write this:
{
On Aug 6, 6:08 pm, owidjaya wrote:
> I checked it and the field order still not the same.
> Just to clarify. I want the to do this A.objects.all().values()
> and still get the each list in the result to have the same "field
> order" as the database table defined.
`values()` returns a set of dicti
On Aug 6, 5:46 pm, kostia wrote:
> What is wrong?
>
> My view function:
> def project(request, project_id):
>
> try:
>
> project_id = int(project_id)
>
> except ValueError:
>
> raise Http404
>
> myProject = get_object_or_404(Project, id = project_id)
> events = Even
I checked it and the field order still not the same.
Just to clarify. I want the to do this A.objects.all().values()
and still get the each list in the result to have the same "field
order" as the database table defined.
On Aug 6, 9:57 am, kostia wrote:
> use table = ModelName.objects.all().order
Take a look at django-storages, it's what we use to store audio files in S3.
It's a pretty robust django storage backend with decent community support.
On Aug 6, 2010, at 5:06 AM, almacmillan wrote:
> Hi there,
>
> I am a total beginner to programming and Django so I'd appreciate help
> that b
use table = ModelName.objects.all().order_by("filter_name")
It is ordered by id field apriori.
--
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, s
Hi All,
I was just wondering is there a way to get queryset to return result
of a database lookup
to list the fields in the same order as it is defined in the database
table?
so for example in my
TABLE A
--
A
B
C
the query set result will return
exactly
[ {A: some value, B: some value,
I don't have time to watch your code, but...
Take a look here http://www.tummy.com/Community/Articles/django-pagination/
I set up this cool pagination in 15 minutes without errors!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
What is wrong?
My view function:
def project(request, project_id):
try:
project_id = int(project_id)
except ValueError:
raise Http404
myProject = get_object_or_404(Project, id = project_id)
events = Event.objects.filter(project = myProject)
return rende
Thank you very much - that all makes perfect sense.
Margie
On Aug 6, 9:09 am, akaariai wrote:
> On 6 elo, 18:36, Margie Roginski wrote:
>
> > Could anyone give me some pointers as to how you deal with taking your
> > site down for maintenance? Is there some standard thing that people
> > do to
I can't find a mistake :-(( {{ autopaginate product 2 }} is working,
because of only two products I see, but {{ paginate }} is NOT, its
returns just nothing
Here my template:
{% load i18n %}
{% load pagination_tags %}
{% autopaginate product 2 %}
Delete All | Another Action
{
Hello!
I'm setting up a blog, and for learning purposes I want to make
everything as generic as possible.
My tagging app looks like this
--
class Tag(models.Model):
name = models.SlugField(max_length=30, unique=True)
class TagRelation(models.Model):
tag = models.ForeignKey(Tag)
It seems to be a django bug. I changed the apps order in INSTALED_APPS
in settings.py and everything started to work correctly.
On 6 ago, 11:55, Thales wrote:
> Hi everybody,
>
> I am working in a project using django, which has about 20 apps's.
> There is no tests written and It was decided that
On 6 elo, 18:36, Margie Roginski wrote:
> Could anyone give me some pointers as to how you deal with taking your
> site down for maintenance? Is there some standard thing that people
> do to redirect all page requests to some sort of "Sorry, the site is
> down" page? Do you do this directly vi
Why not use the Messages framework for this?
http://docs.djangoproject.com/en/dev/ref/contrib/messages/
./s
--
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
Hi daniel,
I doubt your python version is 1.2.1, maybe it's rather Django version :)
However, the issue django stated looks pretty clear to me. You created a
database with a wrong encoding type.
You should have a look at:
http://docs.djangoproject.com/en/1.2/ref/unicode/
Regards,
Xavier.
On Fri,
Could anyone give me some pointers as to how you deal with taking your
site down for maintenance? Is there some standard thing that people
do to redirect all page requests to some sort of "Sorry, the site is
down" page?Do you do this directly via apache or do you do it via
django?
I additiona
On Fri, Aug 06, 2010 at 07:26:33AM -0700, Florin wrote:
> When I change the language from any site's page it works like it
> should, but when I go to the homepage (site's root) the
> "django_language" cookie is reset and the language form doesn't work
> anymore; it makes the POST request but it doe
Hi everybody,
I am working in a project using django, which has about 20 apps's.
There is no tests written and It was decided that tests would have to
be written for the whole project.
To start testing, I runned:
"python manage.py test"
And a database was created, tables and stuff... But one tab
FIXED :)
It was an issue with FeinCMS.
On Aug 6, 5:26 pm, Florin wrote:
> Hi there,
>
> I have put the form with a select box with languages in the template
> header:
>
>
>
> {% for lang in LANGUAGES %}
> {{ lang.1 }}
> {% endfor %}
>
>
>
>
> When I change the language from any site's pag
Hi there,
I have put the form with a select box with languages in the template
header:
{% for lang in LANGUAGES %}
{{ lang.1 }}
{% endfor %}
When I change the language from any site's page it works like it
should, but when I go to the homepage (site's root) the
"django_language" cookie is r
Hi, I'm still get error trying to run my project on Mac =(
Now the standalone server is running fine, but when I try to create a new
user I get the error: "Can't adapt type 'US/Eastern", I tried to change my
TIME_ZONE in setting, but no success.
I can simulate this error in console, and here's the
On 8/6/2010 8:13 AM, kostia wrote:
Do we know some alternatives for using popups in python/django?
I bookmarked these a while back but haven't yet used them:
http://trentrichardson.com/Impromptu/index.php
http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-popup-using-jquery/
Mi
On 08/06/2010 03:13 PM, kostia wrote:
Do we know some alternatives for using popups in python/django?
Here is the SqueezeBox from Mootools JS library -
http://digitarald.de/project/squeezebox/
I used it in Joomla / php.
I would like to create a great popup form to prevent the user from
redirec
Daniel, I think it can work incorrectly when user would be filling
more than one form of the same type at the same time. My suggestion is
to use passing get parameters while returning HttpResponseRedirect. It
of course have disadvantage that the address would not be always same
(get params will be
So when returning HttpResponseRedirect django returns 302 status code
for the client, which indicates that the client browser should
navigate to another url. Then you have at last 2 options:
1) before returning save at session data information about form that
you want to thans form - but it's not v
On Aug 6, 1:33 pm, bagheera wrote:
> I have two pages with two different forms. Each, if validated, redirects
> to "thanks" page. I want to customize this behavior, so "thanks" page
> should display different message, regarding witch form was invoked, or
> redirects to "/' if no redirection
On Aug 6, 9:57 am, "J. Cliff Dyer" wrote:
> "Joshua Russo" wrote:
> >On Thu, Aug 5, 2010 at 10:53 PM, Steve Holden wrote:
>
> >> On 8/5/2010 7:16 PM, Joshua Russo wrote:
> >> > On Aug 4, 6:49 pm, Hassan wrote:
> >> >>> Ok, so it appears that (in Python 2.5 at least) there is no way to
> >> capt
Do we know some alternatives for using popups in python/django?
Here is the SqueezeBox from Mootools JS library -
http://digitarald.de/project/squeezebox/
I used it in Joomla / php.
I would like to create a great popup form to prevent the user from
redirecting to the new page. It will be awesome
I have two pages with two different forms. Each, if validated, redirects
to "thanks" page. I want to customize this behavior, so "thanks" page
should display different message, regarding witch form was invoked, or
redirects to "/' if no redirection took place (like user typed in browser
"te
Hi there,
I am a total beginner to programming and Django so I'd appreciate help
that beginner can get his head round!
I was following a tutorial to show how to upload images to an Amazon
S3 account with the Boto library but I think it is for an older
version of Django (I'm on 1.1.2 and Python 2.
2010/8/6 Reinout van Rees :
> The solution: in my ui project I have a ui/realbase.html that is extended by
> ui/base.html. The only code in ui/base.html is the "extends" line! So
> overriding that one is inexpensive.
I've used the same solution, but it would be nice to have a tag to
enable thos
On 08/06/2010 07:54 AM, Henrique Teófilo wrote:
Dear all,
I'm posting a multipart/mixed message to Django 1.1.1 using the
development web server (a binary file and a textual part -- it's not a
Form) and I need to get the Content-Type of the textual part. How do I
accomplish this??
I was trying
On 08/06/2010 12:22 PM, Alessandro Ronchi wrote:
It's useful to have some templates with the same name of another one,
like you can do with YOURPROJECT/templates/admin/base_site.html that
override the base site django default.
but If I want to add a word in the title of my base_site.html I need
t
I haven't dug around in Django enough to know if there is a Django
solution, but from the database side a view might do what you want? I
have not tried this myself.
http://msdn.microsoft.com/en-us/library/ms187956.aspx
So define a view that follows the Django naming convention, backed by
a table t
I have my models declared in this way:
class Person(models.Model):
name = models.CharField(max_length=50, unique=True)
class Pet(models.Model):
owner = models.ForeignKey(Person, to_field='name')
name = models.CharField(max_length=30)
def __unicode__(self):
Dear all,
I'm posting a multipart/mixed message to Django 1.1.1 using the
development web server (a binary file and a textual part -- it's not a
Form) and I need to get the Content-Type of the textual part. How do I
accomplish this??
I was trying to get it from request.raw_post_data but it is com
Django 1.2 In forms
widget=forms.DateTimeInput(attrs={'id':'dateTimeCustom'},
format='%Y-%m-%d %H:%M:%S',
)
This is default django format in widgets.py. When I try to set custom
format, it doesn't work in validation.
--
You receive
Hi,
I'm new to django. I've just installed django-db-log module and ran
the following command. I got the following error. I searched online
and most of the people who encountered the same issue said they had a
postgresql running on port 5433. I did a "nmap localhost" and only
port 5432 is open
"Joshua Russo" wrote:
>On Thu, Aug 5, 2010 at 10:53 PM, Steve Holden wrote:
>
>> On 8/5/2010 7:16 PM, Joshua Russo wrote:
>> > On Aug 4, 6:49 pm, Hassan wrote:
>> >>> Ok, so it appears that (in Python 2.5 at least) there is no way to
>> capture
>> >>> the stdout of subprocess.Popen()
>> >>
>>
Thanks Steve, that was really helpful. I don't have the problem of
scaling yet but one of our clients is looking to sell their product
into another set of companies so I want to be able to give them advice
that will keep the product robust. It will mean new developments for
the product and with mor
It's useful to have some templates with the same name of another one,
like you can do with YOURPROJECT/templates/admin/base_site.html that
override the base site django default.
but If I want to add a word in the title of my base_site.html I need
to copy the entire content of the base_site.html I a
On Thu, Aug 5, 2010 at 10:53 PM, Steve Holden wrote:
> On 8/5/2010 7:16 PM, Joshua Russo wrote:
> > On Aug 4, 6:49 pm, Hassan wrote:
> >>> Ok, so it appears that (in Python 2.5 at least) there is no way to
> capture
> >>> the stdout of subprocess.Popen()
> >>
> >> just do this
> >>
> >> from sub
M the third case coul be this, for example:
|---A-| |--A|
---
|B| |-B|
If I directly apply (his_diff/my_diff) I thi
Hi all,
I have two models (Person, PersonUpdate) with a many-to-many field
(properties). The properties of a personupdate should be initialized
(copied) from that of the corresponding person. But before I can add a
list of properties to a new personupdate, it must have an id, and
therefor
2010/8/6 Reinout van Rees :
> Yes, it is :-) Django-staticfiles is an application that can do it for you.
...
> Note: at djangocon.eu in Berlin, there were voices to make this
> django-staticfiles solution standard in django 1.3.
I'll try that. I think it's the perfect solution, and I hope it wi
Hello,
I have solved this issue. I to put the RequestContext in the
render_to_response call.
Thank you all.
Greetings
On 6 ago, 10:34, "ignacio.arriaga" wrote:
> I have been checking the template that generates the form, and the
> csrf_token is included on it, but when the page is renderized t
I have been checking the template that generates the form, and the
csrf_token is included on it, but when the page is renderized to html
the token does not appear.
Also I have tried to do this:
{% load comments %}
{% get_comment_form for project as cform %}
{% csrf_token %}
{{ cform.as_p }}
On 08/06/2010 09:54 AM, Alessandro Ronchi wrote:
I have always used a symbolic link to deploy with apache all my django
libraries media files.
But now I need a more solid way to deploy those files, without
concerning about symlinks I need to make after libraries install.
What solution do you use
On 08/06/2010 01:15 AM, ignacio.arriaga wrote:
Hello,
I have a problem with django.contrib comments application. I have
installed the applicacion and made the synchronization with the
database. I create a comment form in this way:
{% render_comment_form for project %}
When I push either previ
On 08/05/2010 09:34 PM, bax...@gretschpages.com wrote:
I try to make my apps portable between the various sites/projects that
use them, but I'm running into some problems doing so. I'm hoping
there's some good way to handle this I just don't understand or know
about.
In a nutshell, I've got mult
On 08/05/2010 05:22 PM, kostia wrote:
Yes, Linkedin mostly is written on Java.
Did you see its menu and the search to the right? People, Jobs,
Answers, Groups.
I would like to add something similar to this on my site.
In the end, it are all just database queries. So java or python doesn't
r
Hi Russ,
I opened #14068.
I can not think of an easy fix as those I would choose will have side effects
on other multi database settings.
If the core team can come with a design decision on the fix, I'll be happy to
implement it.
Regards,
Xavier.
Le 5 août 2010 à 13:31, Russell Keith-Magee a é
I have always used a symbolic link to deploy with apache all my django
libraries media files.
But now I need a more solid way to deploy those files, without
concerning about symlinks I need to make after libraries install.
What solution do you use? Apache aliases?
As far as I know, it's not possib
89 matches
Mail list logo