You could take a look at
http://wadofstuff.blogspot.com/2009/08/requiring-at-least-one-inline-formset.html
On Feb 8, 6:46 pm, Gabriel Reis wrote:
> Hello guys,
>
> I have the following situation:
>
> class FooInline(TabularInline):
> model = Foo
> extra = 1
> max_num = 1
>
> class My
On Tuesday 09 Feb 2010 12:29:48 pm Karen Tracey wrote:
> > simplest validation possible is giving me an error - if the data is
> > valid, no
> > error, but on invalid data I get the traceback appended below. Am I doing
> > something wrong or is it bug no
> > http://code.djangoproject.com/ticket/126
On Tue, Feb 9, 2010 at 1:47 AM, Kenneth Gonsalves wrote:
> hi,
>
> I am using the latest revision 12398. I am trying model validation - but
> the
> simplest validation possible is giving me an error - if the data is valid,
> no
> error, but on invalid data I get the traceback appended below. Am I
Given a model such as:
class Country(models.Model):
code = models.CharField(max_length=2, primary_key=True)
name = models.CharField()
class Region(models.Model):
name = models.CharField()
country = models.ForeignKey(Country)
with an admin option:
class RegionAdmin(admin.ModelAdm
hi,
I am using the latest revision 12398. I am trying model validation - but the
simplest validation possible is giving me an error - if the data is valid, no
error, but on invalid data I get the traceback appended below. Am I doing
something wrong or is it bug no http://code.djangoproject.com/
> I want to convert a given regular object to json object. i.e. I want
> to create a function which takes the class object as parameter and it
> should return the json object.
Have a look at the built-in Django "serializers" module:
http://docs.djangoproject.com/en/dev/topics/serialization/#topic
Hi all,
I want to convert a given regular object to json object. i.e. I want
to create a function which takes the class object as parameter and it
should return the json object.
If anybody know please help me how to approach to get this.
Thanks and regards,
--chiranjeevi
--
You received this mes
Hi all,
I just found a new Python IDE that supports django, named pycharm
(http://www.jetbrains.com/pycharm). I was wondering whether anyone
else has used it? If so, what do you think about the django support in
it? Do you think it's good or useless?
Kind regards,
--
http://twitter.com/scrum8
On Tue, Feb 9, 2010 at 1:32 AM, gvkalra wrote:
> "django-admin.py startproject xyz" opens my default text editor viz.
> Notepad++ and opens the file django-admin.py in it for editing...What
> could be the reason? I am not able to create a project
>
I guess you are on Windows? Apparently the .py
"django-admin.py startproject xyz" opens my default text editor viz.
Notepad++ and opens the file django-admin.py in it for editing...What
could be the reason? I am not able to create a project
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
On Mon, Feb 8, 2010 at 1:10 AM, br...@instantdirectmarketing.com
wrote:
> I'm completely confused about why _meta.local_fields returns more
> fields than the database table contains. The User model inherits from
> contrib.auth.models.User.
...
> I wonder if the User.add_to_class would be interpret
Yet Another Noob here...
I've searched f the prblem I have. I found some but no post helped.
I followed the tutorial step by step. I had no problem until generic
views.
(Windows XP - Django 1.1.1 - python 2.6.4.8 )
Here's the directory hierarchy
E:\djanggoHttpDoc\mysite - settings.py, manage.p
Alright, let's see if I can explain this:
I have an Artist model and artists get positionally ranked. It has a
GenericRelation to another model that stores scores from that ranking.
I wanted to be able to sort Artists by their score using that
GenericRelation. Here's an example (ran this in the in
I feel like I'm missing something obvious. Another set of eyes would
be greatly appreciated.
I'm trying to add an image to the change_list form in the admin.
Doesn't seem to work.
Here's a snippet I found that gets me most of the way there:
(from models.py)
def image_img(
well I'll be damned, it worked
usage:
apt = Apt()
# old is coming via multi-db connection to mysql
# apt is saved in postgres
apt.id = old.id
# the seq name is {app}_{model}_id_seq
legacy_save(apt,'nsproperties_apt_id_seq')
# after all apts are imported then set the seq correctly:
set_max_seq
You can override the template for a specific app by first copying it
to a template folder respectful to that app
See this:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates
On Mon, Feb 8, 2010 at 8:16 AM, djangonoob wrote:
> Hi all.
>
> If someone could please h
There's a bug in PyAMF: http://dev.pyamf.org/ticket/694
On Mon, Feb 8, 2010 at 5:54 PM, WC wrote:
> Hi Everyone,
>
> I have a ForeignKey field that is always null on the Flex client. I
> have tried using select_related(), but it's still null. Any idea what
> I am doing wrong? In the following
I'm trying to setup my first cron job and I think the reason my script
is not running is because I don't have DJANGO_SETTINGS_MODULE defined
for my environment i.e., .profile script. I'm using mod_wsgi so my
DJANGO_SETTINGS_MODULE is defined in the respective wsgi file for each
site, so my question
Hello -
I'm migrating a large site (mysql/php to postgres/django) and would
like to keep the primary ID of one of the tables. The id is public as
in people call other people on the phone and say "hey what about that
#9843 ?" all the code already refers to the ID for URLs etc.
I'm thinking that
On Tue, Feb 9, 2010 at 2:08 AM, Mathieu Pillard wrote:
>> It may indeed be that the MAX clause is using "mat_foo" instead of the
>> assigned correlation U0. What happens if you paste the two SQLs into a
>> query window in PgAdmin 3 and execute them. If the 1.2 query fails
>> with the same error me
I think really I'm better off redesigning my model structure for
this. Even trying to do it in pure SQL or with the extra attribute
it's ungodly messy. What I really need is a Ticket model and a
TicketHistory model. Keep the most rescent ticket information in
Ticket and versions of tickets in Ti
Do you have appropriate NameVirtualHost directive anywhere in your
Apache configuration? This must match pattern used by VirtualHost
definitions. You would also normally use '*:80' and not just '*'.
Thus:
NameVirtualHost *:80
..
..
Graham
On Feb 9, 11:57 am, WeissBlitz wrote
Hello all!
I setup an Ubuntu Server 9.04 running Apache c2.2.11 and Django v1.2.
I basically have two sites installed using WSGI.
While under development I'm using the following domain names for the
sites:
articlehub.dnsalias.com and jobsbot.gotdns.com, both pointing to my
home IP.
So I created
> It appears you have not run manage.py syncdb after adding
> 'django.contrib.redirects' to INSTALLED_APPS.
>
> Karen
Ah, I don't know if I have that in there yet (yes, it's hard to
check), but I DO have this...
'django.contrib.redirects.middleware.RedirectFallbackMiddleware'
...in test_setti
Thanks Shawn. I put the name of the production site instead of the
local test site, hence the page not found error. :(
Thanks again for your help,
Thanks,
Sincerely,
Sonal.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Hi folks,
I'm curious how people are managing complex forms in their django
applications these days. As an example, let's say we're editing an address
book entry, where someone can have multiple e-mail addresses and phone
numbers. Ideally, I'd want to do something like:
class AddressBookEntry(F
Bingo. The value should have been invitation_key and not
invitation_key.key. Good catch!
On Feb 8, 3:41 pm, Karen Tracey wrote:
> On Mon, Feb 8, 2010 at 6:24 PM, adambossy wrote:
> > I'm trying to install the django-invitation app on bitbucket, but I'm
> > running into an error I've been seeing
On Mon, Feb 8, 2010 at 6:56 PM, Phlip wrote:
> > It appears you have not run manage.py syncdb after adding
> > 'django.contrib.redirects' to INSTALLED_APPS.
>
> Even when testing into sqlite3 :memory:? I thought that obviated all
> syncdb considerations...
>
>
No, for tests if the app is listed i
> It appears you have not run manage.py syncdb after adding
> 'django.contrib.redirects' to INSTALLED_APPS.
Even when testing into sqlite3 :memory:? I thought that obviated all
syncdb considerations...
--
You received this message because you are subscribed to the Google Groups
"Django users" g
On Mon, Feb 8, 2010 at 6:24 PM, adambossy wrote:
> I'm trying to install the django-invitation app on bitbucket, but I'm
> running into an error I've been seeing repeatedly with urls. I've
> googled this and various permutations have occurred to various people,
> but not this one in particular. T
Check the actual URL you're receiving in your e-mail. See if it matches any of
the patterns in your urls.py.
One thing that looks odd to me is that your pattern for forgot-password ends
with '?$," which doesn't look right to me. But it seems like you're saying the
problem is after that point. I
I'm trying to install the django-invitation app on bitbucket, but I'm
running into an error I've been seeing repeatedly with urls. I've
googled this and various permutations have occurred to various people,
but not this one in particular. The general problem occurs when I try
to include a url confi
Thanks Shawn!
After changing the domain name in admin, I could get the subject
right. however, the page not found problem still persists.
I have provided my urls.py earlier. And I have the following files in
the directory mentioned in TEMPLATE_DIRS setting.
registration/password_reset_complete.ht
Go into the admin and edit the entry in the Sites application for your site.
It's using example.com as a placeholder.
Shawn
--
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
Hi all,
I am implementing "Forgot your password" feature using following
tutorial.
http://www.rkblog.rk.edu.pl/w/p/password-reset-django-10/
My email for password gets sent. but once I click the URL in the mail
get page not found error.
My urls.py is
urlpatterns += patterns('django.contrib.aut
On Mon, Feb 8, 2010 at 4:51 PM, Phlip wrote:
> Djangoids:
>
> I get this error message whenever I really need client.get() to run,
> in a test. Different apps and configurations show the problem in
> various situations.
>
> The only Google hit for the error message with sqlite3 is some lone
> web
On Mon, Feb 8, 2010 at 4:06 PM, adambossy wrote:
> Hey folks, thanks for the responses. Your questions alone helped me
> find the answer. Apparently, it was a problem with my apache2
> configuration. I basically copied the directives from the django
> website, with one small modification:
>
>
> h
I have a model called 'Ticket' with several fields 'number',
'milestone', 'status', 'resolution', 'estimate', 'last_updated'
These are just multiple entries for the same support ticket that I'm
pulling from another system. I keep multiple entries of a ticket so I
can trac changes in estimation an
You can use a jQuery UI Dialog. It can be modal, and you can easily use some
jQuery AJAX to submit your login view and receive the response.
Shawn
--
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..
My previous mex got with wrong identation: the last 4 lines need to
start at the same level:
if request.method == 'POST':
form = GoalForm(request.POST)
if form.is_valid():
goal=form.save(commit=False)
goal.user=request.user
goal.save()
form.save_m2m()
--
You received this messag
Djangoids:
I get this error message whenever I really need client.get() to run,
in a test. Different apps and configurations show the problem in
various situations.
The only Google hit for the error message with sqlite3 is some lone
webpage dumping the problem. Get the full trace there!
http:/
On 7 Feb, 22:26, kamilski81 wrote:
> I am trying to set a user on a model, on the back-end.
>
> u = request.user
> g = Goal()
> g.user = u
> form = GoalForm(request.POST, g)
>
> I am getting the following error:
> goal.user_id may not be NULL
hello
you can try wit
Hi all,
I am the developer of the search engine djangosearch.com. I am
supporting this project for several years. There are articles about
django for the last four years, the search is available in 10
languages.
I strictly supervise the quality of articles and news, I check all of
them myself for
I want to use greybox to show a login form. My question is what is the
best way to do this?
Here is the line I am using in m template
Login
Should I directly link to the form, or use {% url xxx %}, or is there
something else I should do?
Also can I send it back up if I get errors? Any advice much
El 08/02/10 18:04, gregory.para...@gmail.com escribió:
> Does anyone know of any good email list managers in Django? Even just
> a simple app for a coming soon page that would take users email
> address and let you email them with updates would be great.
>
You may want to take a look at Lamson[
Hey folks, thanks for the responses. Your questions alone helped me
find the answer. Apparently, it was a problem with my apache2
configuration. I basically copied the directives from the django
website, with one small modification:
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#
Does anyone know of any good email list managers in Django? Even just
a simple app for a coming soon page that would take users email
address and let you email them with updates would be great.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Dave,
Just wondering how you managed to get Django and MySQL to work on
Leopard 10.5.
I've spent 2 days on it and still stuck on the same error - described
here:
http://groups.google.com/group/django-users/browse_thread/thread/178bd307b9551e2b#
Which versions of Python, MySQL and MySQLdb do you
Hi there,
Fancy joining a great team on a django community project?
http://eu.techcrunch.com/2010/02/07/startup-to-launch-after-secret-london-facebook-group-amasses-18/
We'll be hosting a dev session this weekend - in a location somewhere
in london. We have some great designers, a few css/js
> It may indeed be that the MAX clause is using "mat_foo" instead of the
> assigned correlation U0. What happens if you paste the two SQLs into a
> query window in PgAdmin 3 and execute them. If the 1.2 query fails
> with the same error message, I'd report a bug.
>
> If it doesn't fail, it's still
It may indeed be that the MAX clause is using "mat_foo" instead of the
assigned correlation U0. What happens if you paste the two SQLs into a
query window in PgAdmin 3 and execute them. If the 1.2 query fails
with the same error message, I'd report a bug.
If it doesn't fail, it's still a Django is
By the way, all I really need is the parentBlock_id.
On Feb 8, 11:54 am, WC wrote:
> Hi Everyone,
>
> I have a ForeignKey field that is always null on the Flex client. I
> have tried using select_related(), but it's still null. Any idea what
> I am doing wrong? In the following sample code, pa
Aaargh! I knew it had to be something like that!
Thanx Karen.
On Feb 7, 5:20 pm, Karen Tracey wrote:
> On Sun, Feb 7, 2010 at 4:27 PM, Brian wrote:
> > Hi all,
>
> > I'm putting together a Django application from scratch and have
> > created my models. I'm trying to activate the admin site now
Hello All,
I am trying to get my admin pages work but failed. I have several
django apps on the same hosting. For the latest I dopped in the latest
brand new django 1.1.1 and mentioned it via PythonPath directive.
Everything works but admin pages - they miss link to base.css.
-- settings.p
Hi,
I have been testing the 1.2 beta1 and think I found a bug, but since
the query I'm using is a bit complicated I wanted to run it through
the list first.
The model I'm using:
from django.db import models
from django.contrib.auth.models import User
class Foo(models.Model):
subject = model
Thanks for your reply, Chris. And thanks for the links.
However, the Stack Overflow example seems to be talking about cloning
and a tendency of developers to exaggerate their ability to understand
the complexity of a piece of software and how long it would take them
to do it. My point is not abo
On 2010-02-06, at 4:08 PM, adamjamesdrew wrote:
> Does django have the ability to do a callback when a session time out
> occurs?
No, there is no session time out. Its just that a session isn't valid anymore.
--
Andy McKay, @clearwind
http://clearwind.ca/djangoski
--
You received this mess
Try using the django-debug-toolbar and see if that tells you anything useful.
--
Andy McKay, @clearwind
http://clearwind.ca/djangoski
--
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...@googlegro
I would also like a way to monitor if there are any active connections to a
certain web page ie domain.com/h.view
Sent from my Verizon Wireless BlackBerry
-Original Message-
From: cootetom
Date: Sun, 7 Feb 2010 15:21:58
To: Django users
Subject: Re: Callback method on session timeout
W
As far as I can see, there are two approaches to take. One is to filter the
results of the query in python (Note: I'm not talking about the filter method
of querysets). The downside to this is that the database still returns all
objects, and you are discarding those that having the wrong minute v
On 8 February 2010 17:33, Luke Sneeringer wrote:
> Good morning, Django e-mail list! Happy Monday! I have a problem. :) I
> checked the Django documentation and Stack Overflow with no success, so you
> guys are my next line of defense. This is an issue I've encountered several
> times; this is
When I inline a particular model the admin interface slows
down enormously. Inlining other models does not have this
effect. This is with the python server (runserver).
Any help would be great.
When I use the following in my admin file, displaying a
household object is very snappy, ~ 1 sec.
Hi Everyone,
I have a ForeignKey field that is always null on the Flex client. I
have tried using select_related(), but it's still null. Any idea what
I am doing wrong? In the following sample code, parentBlock is always
null on the Flex client:
File: BlockVO.py
from django.db import models
c
Hi Shawn,
Thanks for pointing me in the right direction. Really appreciated.
I'll check it out.
ALJ
On Feb 8, 4:42 pm, Shawn Milochik wrote:
> ALJ,
>
> I think you'd greatly benefit from just using this:
>
> http://docs.djangoproject.com/en/1.1/topics/auth/#storing-additional-...
>
> You can cr
Good morning, Django e-mail list! Happy Monday! I have a problem. :) I checked
the Django documentation and Stack Overflow with no success, so you guys are my
next line of defense. This is an issue I've encountered several times; this is
just the first time working around it has bothered me enou
thanks rebus
-jim
>
>
> {{entryform.as_ul }}
>
>
--
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
django-users+unsubscr...@goog
Opps, for you view context it should be "entryform" not "form":
{{entryform.as_ul }}
--
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 em
On 8 February 2010 16:52, jimgardener wrote:
> hi
> I created a view function to edit an entry.
> def edit_entry(request,id):
> entry=get_object_or_404(MyEntry,id=id)
> if request.method=='POST':
> form=MyEntryForm(request.POST,instance=entry)
> if form.
hi
I created a view function to edit an entry.
def edit_entry(request,id):
entry=get_object_or_404(MyEntry,id=id)
if request.method=='POST':
form=MyEntryForm(request.POST,instance=entry)
if form.is_valid():
form.save()
ALJ,
I think you'd greatly benefit from just using this:
http://docs.djangoproject.com/en/1.1/topics/auth/#storing-additional-information-about-users
You can create a model to store all your info, and use the built-in settings.py
option AUTH_PROFILE_MODULE.
Essentially you're adding fields to t
On Mon, Feb 8, 2010 at 8:51 AM, mf wrote:
> I want to show the human-readable name for the type selected but I
> keep getting the stored value.
>
> TYPE_CHOICES = (
>('0', 'Basic'),
>('1', 'Full'),
>('2', 'Intermediate'),
> )
>
> class ServiceType(models.Model):
>t
On Mon, Feb 8, 2010 at 10:42 PM, Andy Cottell wrote:
>> > > I am new to django, and have started building a project in it. I have
>> > > tried to use theadmininterface with the project am having issues
>> > > logging in. I have setup the interface as instruced in the django
>> > > tutorial part 2,
(I've just started my first project and I'm already in trouble. I've
read the documentation but still haven't assimilated it yet. So
sorry for the numpty question.)
I'm building an application to organise product demonstration events.
It will include a foreign key identifying a member of our
Bump!
On Feb 2, 1:48 am, Andy Cottell wrote:
> I have done this, and created an superuser when prompted. However the
> login still fails with the same error.
>
> Here is the urls.py:
>
> from django.conf.urls.defaults import *
>
> # Uncomment the next two lines to enable theadmin:
> from django.c
Thank you so much!
I'm new to Django and I have to say that the framework is so easy to
use that it's frustrating to find out how to do things
-Anders
On Feb 8, 3:09 pm, Tom Evans wrote:
> On Mon, Feb 8, 2010 at 1:46 PM, Anders Eide wrote:
> > I have a table width movies, and I would like to m
On Mon, Feb 8, 2010 at 1:46 PM, Anders Eide wrote:
> I have a table width movies, and I would like to make a form and a
> view thats updates a row.
>
> I build the form automatically from a model
>
> class SaveMovieForm(ModelForm):
> class Meta:
> model = Movie
> id = forms.IntegerFie
I have a table width movies, and I would like to make a form and a
view thats updates a row.
I build the form automatically from a model
class SaveMovieForm(ModelForm):
class Meta:
model = Movie
id = forms.IntegerField(
widget = forms.HiddenInput(),
required = Fals
Hi all,
I finally put my first, little django site in production. This was my
first work in django after several php site (cake, zend, joomla, magento
and so on...).
I take a VPS Hosting with Ubuntu 9.10 64 bit - the same linux distro I
use for work and try to put in production the site w
I want to show the human-readable name for the type selected but I
keep getting the stored value.
TYPE_CHOICES = (
('0', 'Basic'),
('1', 'Full'),
('2', 'Intermediate'),
)
class ServiceType(models.Model):
type = models.IntegerField(max_length=1, choices=TYPE_CHOICES
Hello guys,
I have the following situation:
class FooInline(TabularInline):
model = Foo
extra = 1
max_num = 1
class MyAdmin(admin.ModelAdmin):
inlines = [FooInline,]
Is there any way to perform a validation in which the user must have filled
the fields of the inline formset?
Solved...
The answer is to not user "pk" as a field in your model. I switch pk
to something else and the serialize and deserialize work fine.
-kurt
On Feb 7, 2:28 pm, Kurt Schwehr wrote:
> class alert(models.Model):
> pk = models.CharField(max_length=10, primary_key=True)
> zone_id = m
On Feb 8, 3:38 am, Eric Abrahamsen wrote:
[CUT]
> Now that you've got a date attribute, why not use that for next and
> previous?
1. Date based next and prev go throught the whole photo set,
but I prefer next and prev to provide only items inside a gallery.
But I guess that's just me unable to p
On 07/02/10 18:28, Wayne Dyck wrote:
Is there an easy way to format this date_field to my local time zone
i.e. PST? I have also tried using the "date" and "time" filters within
the template itself, however, those are still UTC.
Any pointers would be appreciated.
Well, django-timezones has a
On Sun, Feb 7, 2010 at 11:18 PM, Dennis Kaarsemaker
wrote:
> On ma, 2010-02-08 at 00:04 +0100, Henrik Genssen wrote:
>
>> what is the best way to setup a master-master replication using mysql
>> with django?
>
> Not to do it :)
>
>> Has anyone any experiences with this?
>
> I did not use it with d
84 matches
Mail list logo