How can I edit admin's save button, so whenever I click save, I can be
redirected to a page after successfully inserting the values into db?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Sorry for not making it clear. The idea is to use default admin
template and help the admin to enter data from admin interface. I will
enter data via admin's default template. Lets say I have People and
Publications Table in my database. So when I click admin's add button,
it will display some
FWIW, have posted:
http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
This delves into issues as to why Django development server behaves
differently to Apache/mod_wsgi and describes an alternate WSGI script
file which should hopefully narrow the gap and get rid of some of
On Mar 29, 7:12 am, nameless wrote:
> Hi at all,
> I need to create a high performance comet chat for my college project.
> I have found Tornado that is a non-blocking webserver used by
> FriendFeed for real-time features:http://www.tornadoweb.org/
>
> Maybe this is a
On Mar 29, 10:48 am, Russell Keith-Magee
wrote:
> On Mon, Mar 29, 2010 at 12:40 AM, nih wrote:
> > oops sorry, typo in the last paragraph :(
>
> > It only crashes for me with apache, mod_wsgi, new project (no views/
> > models/etc),
I use this way:
at the end of your settings.py:
try:
from settings_local import *
except ImportError:
pass
into settings_local.py
from settings import *
and override all settings you need
in this way you can share common/integration configuration but each
developer is free to override what
Hi,
take a look here:
http://solutions.treypiepmeier.com/2010/01/10/local-django-documentation/
Benjamin
Am 28.03.2010 23:24, schrieb Django Grappelli:
hi everyone,
quick question:
is it possible to download the django docs in html somewhere so that i
don't have to use the rest text ones
Hi all!
my question is: can 'tag' generate another tag/s? if yes, what is the
best practice?
In template e.g. `base.html` i want to have tag: {% area 1 %}, this
tag communicates with database table called `components` and searching
for a components (apps) which are established with area 1,
let's
Hi at all,
I need to create a high performance comet chat for my college project.
I have found Tornado that is a non-blocking webserver used by
FriendFeed for real-time features:
http://www.tornadoweb.org/
Maybe this is a stupid question but I am very newbie and I want to
know how to use Tornado
On Mar 28, 8:40 pm, Asim Yuksel wrote:
> I have two questions.
> 1)I have two tables(People, Publication) and they are not related and
> I want to display the fields of these tables on the same admin page.
> So when I fill all the fields, I want to insert these values
On Mar 28, 6:44 pm, Wiiboy wrote:
> Hi guys,
> I've got a Python website that has to integrate with a forum (i.e.
> when a user registers on mysite.com, they also have to be registered
> automatically on forum.mysite.com). That forum forces email addresses
> to be unique.
On Mar 28, 8:40 pm, Asim Yuksel wrote:
> I have two questions.
> 1)I have two tables(People, Publication) and they are not related and
> I want to display the fields of these tables on the same admin page.
> So when I fill all the fields, I want to insert these values
After struggling with Django's templating language for a while, I
decided I wanted to switch to something with a bit more power. In
particular, I liked what I saw of Mako (being able to instantiate new
variables, and write functions for subroutines like making a row or
something).
After some
It was only recently that I finally learned how Etags work in Emacs and
made myself a tags file for Django's source code -- now that I'm 4/5 of
the way to pure programming leisure I can't rest until the laziness is
complete.
That means making a programmatic map of django class/function import
Goal: produce responses for both ajax and regular requests with a
single render_to_response call and no extraneous templates.
Solution:
1. dynamic extends. mypage.html: {% extends base %}.
base="mybase.html" or "ajaxbase.html"
pros: one render_to_response call.
cons: Have to create extra dummy
I am unsure if this a bug in Django, or django-multidb-router, or
something I've done wrong.
I'm using django-multidb-router from here:
http://github.com/jbalogh/django-multidb-router
With two database definitions, a read_only_user and a read_write_user
(with the intentions of having multiple
I implemented two solutions for this problem. The first one is the solution
already said here: create a template context processor that inserts a
variable in context with the name of the base template ("base.html" for
normal requests and "base_ajax.html" for ajax requests).
The second one is a
Much appreciated :)
M
On 29/03/2010 11:10am, Russell Keith-Magee wrote:
On Mon, Mar 29, 2010 at 8:07 AM, Mike Dewhirst wrote:
Can someone kindly tell me how I can detect which subversion revision of
Django is actually installed on my machine?
I need to re-install the
email = models.EmailField(unique=True)
If it's using django.contrib.auth you can use something like this in the
init of your project:
from django.contrib.auth.models import User
User._meta.get_field('email').unique = True
__
Vinícius Mendes
Solucione Sistemas
> OK. I can also put an hidden field in my form. I will evaluate what is the
> better option for me.
Bear in mind if you exclude it from your form altogether there is
nothing to stop a malicious user setting it by modifying the post
data.
Peter
--
You received this message because you are
Ideally, I want to do:
>
> {% if not ajax %}
> {% extends 'base.html' %}
> {% endif %}
> {% block content %}Content Here.{% endblock %}
Extends can't be optional. Consider the following:
base_template.html:
Foo
{% block foo %}{% endblock %}
Bar
{% block bar %}{% endblock %}
On Mon, Mar 29, 2010 at 8:07 AM, Mike Dewhirst wrote:
> Can someone kindly tell me how I can detect which subversion revision of
> Django is actually installed on my machine?
>
> I need to re-install the exact same revision on another platform.
>
> It is probably staring me
Can someone kindly tell me how I can detect which subversion revision of
Django is actually installed on my machine?
I need to re-install the exact same revision on another platform.
It is probably staring me in the face but I must be looking elsewhere.
Thanks
Mike
--
You received this
On Mon, Mar 29, 2010 at 5:24 AM, Django Grappelli
wrote:
> hi everyone,
> quick question:
> is it possible to download the django docs in html somewhere so that i don't
> have to use the rest text ones when i'm developing offline?
No, but if you install sphinx (pip
On Mon, Mar 29, 2010 at 12:40 AM, nih wrote:
> oops sorry, typo in the last paragraph :(
>
> It only crashes for me with apache, mod_wsgi, new project (no views/
> models/etc), finished project, and rev # 12866+.
>
> They all work normally with the dev server and
Hi!
A few days ago I've post a question about changing the unicode on a form
This was the answer:
one way is to override __init__. Here is a sample:
class Accountaddform(ModelForm):
def __init__(self,head,*args,**kwargs):
super (Accountaddform,self).__init__(*args,**kwargs)
You have to override the from creation in order to create the field
you want with the values
You can get some inspiration on:
http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/
http://www.eggdrop.ch/blog/2007/02/15/django-dynamicforms/
2010/3/29 H.Ibrahim YILMAZ :
>
Use an additional file such "properties.py" or "local_settings.py" and
put the credentials an other programmer specific information there and
import that file on settings.py overriding the values o using:
import properties
VALUE=getattr(properties, 'value', default_value)
properties.py hasn't
any help?
On 28 Mart, 15:00, H.İbrahim Yılmaz wrote:
> Hi,
> I Have a model and ModelForm I want to learn how i can filter areas?
> You can see my model below.
>
> from django.db import models
> from yenicrm.musteri.models import *
> from django.forms import ModelForm
>
Hi,
In one of my tests I set up a couple of users with usernames, emails,
passwords, User.objects.create_user("johndoe", "j...@example.org",
"passwd"). But when I try to look them up later they don't appear to
have the email addresses, i.e.
>>> User.objects.all()
[]
>>>[n.email for n in
On 29/03/2010 7:50am, Guillermo wrote:
Hi,
I'm working on a project with multiple programmers for the first time,
and I'm not sure how I should go about commiting the Django project's
setting file to the public repo. Since it can contain sensitive data,
how's this done usually so everybody
hi everyone,
quick question:
is it possible to download the django docs in html somewhere so that i don't
have to use the rest text ones when i'm developing offline?
thanks in advance,
dg
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Hi,
I'm working on a project with multiple programmers for the first time,
and I'm not sure how I should go about commiting the Django project's
setting file to the public repo. Since it can contain sensitive data,
how's this done usually so everybody works with the same settings
during
See this snippet:
http://www.djangosnippets.org/snippets/1295/
Peter
On Mar 27, 6:02 am, jwils2...@gmail.com wrote:
> I believe the answer is to append a regular Form to the ModelForm) with a
> single ModelMultipleChoice field and use its queryset member to manage the
> selected volunteers
On Mar 28, 9:51 am, common_nick wrote:
> Hello, i am new in Django and i wanted to start with some simple app,
> but have problems with customizing admin panel. Below is my setup
>
> http://pastebin.com/gsXqZWfy
>
> I don't know how to make Mailbox to have single unique
I have two questions.
1)I have two tables(People, Publication) and they are not related and
I want to display the fields of these tables on the same admin page.
So when I fill all the fields, I want to insert these values into
people and publication tables.
2) I also want to insert the id values
oops sorry, typo in the last paragraph :(
It only crashes for me with apache, mod_wsgi, new project (no views/
models/etc), finished project, and rev # 12866+.
They all work normally with the dev server and rev # 12866+, so that
pretty much rules out any of my
code causing it. It could of course
I have created a Django project hirearchy:
project1/
project1/settings.py
project1/urls.py
project1/*
#template dirs
project1/t/app1
project1/t/app2
#app 1
project1/app1/views.py
project1/app1/models.py
project1/app1/*
#app 2
project1/app2/views.py
project1/app3/models.py
Thanks for the quick reply Russ :-)
> Do you only get the problem under mod_wsgi, or do you get it under the dev
> server as well?
A new project and one of my finished projects works fine with the dev
server and rev #12873, so might just be a mod_wsgi issue
Updating to revs #12866 or #12873
No matter how hard I look, I always find the answer after I post the
question:
[v.id for v in new_volunteers]
--
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
Something I tried once: set the 'extends' template variable in your
views (middleware even, maybe) to either an empty string or the path
to your template, based on the result of request.is_ajax.
I'm not sure though whether Django will throw an error if extends has
an empty string.
Suggestion:
Hi guys,
I've got a Python website that has to integrate with a forum (i.e.
when a user registers on mysite.com, they also have to be registered
automatically on forum.mysite.com). That forum forces email addresses
to be unique. How can I force that on Django?
--
You received this message
On 03/26/2010 08:13 PM, David wrote:
>> Are you telling me that there's no way to get this workin without an
>>
> apache in front of django? So, all the questions I'm going to ask you
> at the end of this email have
> only this answer? :)
>
> That's pretty much true although it isn't Apache
On Sun, Mar 28, 2010 at 10:12 PM, nih wrote:
> One of the files modified in django rev #12866 has broken mod_wsgi for
> me, the web app loads perfectly ok in rev #12865, the apache mod_wsgi
> log when using django rev #12866 has:
>
...
> none of the changed files
On Sat, Mar 27, 2010 at 9:29 PM, David Hollander wrote:
> Hello. I am making a restaurant site with some visually candy that
> will load all new subpages via AJAX. And also load pages normally
> without AJAX if javascript is disabled.
>
> Ideally, I want to do:
>
> {% if not
If you want full context of this questions, you can read this blog
post and the first two comments: http://haineault.com/blog/134/
That said, here's the TL;DR version;
I'm trying to rethink the interface design of the search/filter/date
hierarchy in the django admin (with Grappelli, not vanilla
One of the files modified in django rev #12866 has broken mod_wsgi for
me, the web app loads perfectly ok in rev #12865, the apache mod_wsgi
log when using django rev #12866 has:
mod_wsgi (pid=5432): Target WSGI script 'D:/Coding/Working/
django_apps/numbers_/apache/django.wsgi' cannot be loaded
Hello, i am new in Django and i wanted to start with some simple app,
but have problems with customizing admin panel. Below is my setup
http://pastebin.com/gsXqZWfy
I don't know how to make Mailbox to have single unique owner
(HostingUserProfile in this case), but be able to assign multiple
Hi,
I Have a model and ModelForm I want to learn how i can filter areas?
You can see my model below.
from django.db import models
from yenicrm.musteri.models import *
from django.forms import ModelForm
from django.contrib.auth.models import User
class Ziyaret(models.Model):
tarih =
On Mar 28, 2:28 am, Daniel wrote:
> Hi all,
>
> I'd appreciate it if you could help me out with something.
>
> I am trying to build a way to use faceted browsing through a database
> of biological samples.
>
> what I want to model is this:
>
> Sample 1
> race = white
>
>
> c1=Contact.objects.filter(hostid__tablename__in=list_of_names)
>
> The ORM is cool.
Ah. "in". how could I have missed that in the doc. Too much staring
and not enough reading, I guess. Thanks!
--
You received this message because you are subscribed to the Google Groups
"Django users"
rmschne wrote:
> I have a query in Django with returns a queryset.
>
> c1=Contact.objects.filter(hostid__tablename=s)
>
> where "s" is a string holding a tablename.
>
> What I want to do is have Django return a query set where "s" is not
> just a string, but a Python list, e.g.
I have a query in Django with returns a queryset.
c1=Contact.objects.filter(hostid__tablename=s)
where "s" is a string holding a tablename.
What I want to do is have Django return a query set where "s" is not
just a string, but a Python list, e.g. ['01','03','54'].
How do i construct a
Hi
For what i understand of your problem, you are calling tag the fields
of a Model called Sample. From, what you say, it is not possible to
say a lot of things, but it appear that you will have others models,
such as Diseases, Country,
You will need to relate the models with
On Mar 28, 3:35 am, Rolando Espinoza La Fuente
wrote:
> On Fri, Mar 26, 2010 at 7:39 PM, Bjunix wrote:
> > django-extensions[1] brings the shell_plus command which auto-imports
> > all models in installed apps. You can use this or have a look at it's
> >
On Mar 6, 11:41 am, summea wrote:
> But do you know if there is any way to set a ManyToManyField's column
> heading to something besides the function name itself? For example...
> I tried setting verbose_name='authors' in the model... but it didn't
> seem to work as expected.
56 matches
Mail list logo