I am planning to drop unique key constraint on "name" column of
auth_group table.
Any possible issues it may cause?
thanks
--
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
In simpler terms:
is there a way to filter instances shown with "admin" pages considering the
logged user id?
is there a way to "interface" request.User with admin.ModelAdmin ?
On Mon, Jan 18, 2010 at 22:33, Massimiliano della Rovere <
massimiliano.dellarov...@gmail.com> wrote:
> Greetings,
> I'm
heya,
The thing is, the foreign key field is on the Address object, linking
to another object that *has* an address.
AFAIK, that's how it's meant to be in database design.
That's why I need to put something there - e.g.
class Address(models.Model):
...
user = models.ForeignKey(UserProfi
heya,
Thanks for the reply =).
I tried that, and the fields aren't there, but when I try to save the
object, I get a:
IntegrityError at /admin/people/address/add/
people_address.content_type_id may not be NULL
so obvoiusly Django doesn't like it if those fields aren't filled.
How do pe
Victor Hooi wrote:
> I tried that, and the fields aren't there, but when I try to save the
> object, I get a:
>
> IntegrityError at /admin/people/address/add/
> people_address.content_type_id may not be NULL
>
> so obvoiusly Django doesn't like it if those fields aren't filled.
it's a bug
On Jan 19, 10:35 am, Victor Hooi wrote:
> heya,
>
> Thanks for the reply =).
>
> I tried that, and the fields aren't there, but when I try to save the
> object, I get a:
>
> IntegrityError at /admin/people/address/add/
> people_address.content_type_id may not be NULL
>
> so obvoiusly Djang
chiranjeevi.muttoju wrote:
> Hi friends,
>
> i am working with django1.1.1, now i want to connect django with
> multiple database, could you people please help me how to achieve
> this.
Django 1.1.1 /does not support/ multiple databases. You therefore cannot
expect much in the way of help with 1
Hi,
Does anybody have any experience using django-sproutcore (code found
here: http://github.com/sproutcoreisyournewbicycle)
I've spent a several hours trying to figure out how to connect it all
together but can't quite figure it out. The code looks usable but
there's no documentation...
Sam
--
hello, it doen't work on my postgres when I try run syncdb.
Python traceback :
File "./bin/django", line 28, in
djangorecipe.manage.main('lfc_project.settings')
File "/opt/eggs/djangorecipe-0.20-py2.6.egg/djangorecipe/manage.py", line
16, in main
management.execute_manager(mod)
Fil
El 19/01/10 08:49, Sam Barnes escribió:
> I've spent a several hours trying to figure out how to connect it all
> together but can't quite figure it out. The code looks usable but
> there's no documentation...
>
Not familiar at all with django-sproutcore (or sproucore itself), but
googling a bi
I set up django to run on FCGI in a shared hosting account using a guide that I
found in my web host's forums. The setup is working except that after
accessing some pages I get an error on my shell session:
-jailshell: fork: Resource temporarily unavailable
I was able to kill the python process
definitely, the best way would be to use a form factory with the type
() function. There are many articles about this around the web, for me
the best introduction was
http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/
moreover, you might find useful the code of django-questions[1]
have a nic
Hi Victor,
You are trying to do this the wrong way around. It shouldn't be the
Adress class on which you want to define a relationship, but on the
other classes. An address is an address whether it's the address of a
User or the address of an Institution.
class Address(models.Model):
# the fi
I have an initial_data.json file which provides some, er, initial data
whenever I run syncdb. One of my models has a DateTimeField with
auto_now_add=True. The data is loaded first time round, but on
subsequent syncdbs, I get "IntegrityError: posts_entry.pub_date may
not be NULL".
Is this the expec
On Jan 19, 12:49 pm, Sam Barnes wrote:
> Hi,
>
> Does anybody have any experience using django-sproutcore (code found
> here:http://github.com/sproutcoreisyournewbicycle)
>
> I've spent a several hours trying to figure out how to connect it all
> together but can't quite figure it out. The code lo
Hello all,
What is the best method to load a page. This page to be build from
a template. The template to have a table, with data from db? The data
from db, are from more then one object. So I'm interested how can I
build the template, with data from one or more objects(ob.objects.all
()).
--
On Tue, Jan 19, 2010 at 3:17 AM, zweb wrote:
>
> I am planning to drop unique key constraint on "name" column of
> auth_group table.
>
> Any possible issues it may cause?
>
Yes. With the unique constraint in place, .get() by name is guaranteed to
either find a single group or none with a matchi
Please complete the tutorial:
http://docs.djangoproject.com/en/dev/intro/tutorial01/
Then read this, then provide more information about your question.
http://catb.org/~esr/faqs/smart-questions.html
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django user
Hi,
if the form is bound (i.e. form.is_bound is true) then you can access
its data attribute, which contains the data entered into the form.
If the form is valid (i.e. form.is_valid() is true), then you can
access the cleaned_data attributes as well.
So for example if you have form like this:
f =
Solved:
I found this (well hidden) page:
http://code.djangoproject.com/wiki/RowLevelPermissions
I do not know it is not embedded in Admin.site documentation... and why
those fully functional methods are simply hidden in the source code...
On Tue, Jan 19, 2010 at 10:00, Massimiliano della Rovere <
Greetings,
The django translation sprint was a clear success. A team of eight
sprinters worked on the Django documentation and after an intense
training session on the toolchain, we were able complete a sizable
part of the API documentation. Our coach, Mathieu Leduc-Hamel, did a
great job pin
On Sun, Jan 3, 2010 at 10:52 PM, Russell Keith-Magee
wrote:
> On Sun, Jan 3, 2010 at 4:06 PM, CB wrote:
>
>>> The
>>> default implementation would essentially be:
>>>
>>> def db_from_related_object(self, instance):
>>> return instance._state.db
>>
>> I'm not familiar with ._state and
I followed all instructions regarding the intallation of the
development version of Django on Leopard.
I’ve created the symbolic links but I keep getting two error messages:
The first one trying to rum django-admin.py command not found
The seccond trying to import django in the python shell
Hey,
I own and run a small professional services company in the greater DC
area (aajinteractive.com). We do project based software development
work, staff augmentation and direct recruiting for our clients. I
have a client who wants to hire a solid Django developer. The rite
person will have:
> The first one trying to rum django-admin.py command not found
This means that the directory containing django-admin.py is not on your PATH.
You can add it, or just type the full path to django-admin.py. However, if your
Django installation isn't on your PYTHONPATH, you may have a differe
Gonzalo, thanks for your reply, but yes, this is tutorial is too old!
Waldemar, thanks for sharing your thoughts.
A reply on the sproutcore google group has suggested using django-
piston and I think this is probably the route I'll take.
Sam
On 19 Jan, 13:54, Waldemar Kornewald wrote:
> On Jan
Since all my looks up are by id and I am not using admin, I should be
ok.
I was not sure if django auth framework used it internally anywhere.
On Jan 19, 6:03 am, Karen Tracey wrote:
> On Tue, Jan 19, 2010 at 3:17 AM, zweb wrote:
>
> > I am planning to drop unique key constraint on "name" colu
Is there a way to show or hide a model field in a admin site "change" page
depending upon the value of request.user.is_superuser ?
I was thinking about filling ModelAdmin.field or .fieldset depending on the
value of request.user, but how to read the value of request in ?
Also .readonly_fields when
I think it should be pretty easy to do.
The get_form() method on ModelAdmin returns the form, and it knows
about the current request. So you could modify that to remove the
field after the form is generated.
class MyModelAdmin(admin.ModelAdmin):
def get_form(self, request, obj=None, **kwarg
Thanks for your answer Tim.
def get_form(self, request, obj=None, **kwargs):
form = super(RowModelAdmin, self).get_form(request, obj, **kwargs)
if not request.user.is_superuser:
* **del form['compilatore']*
return form
It seems that the object returned by get_form does not behave like a dict().
Hi,
Please forgive the possibly daft question, but as an Ubuntu newbie I
am going crazy with the following problem.
I am seeing unexpected behaviour on our live production server,
running Ubuntu, when I execute manage.py
The site hosts two sites, the LIVE site and a mirror TEST site that we
use
Taking the example from:
http://docs.djangoproject.com/en/dev/topics/db/aggregation/#filter-and-exclude
Publisher.objects.filter(book__rating__gt=3.0).annotate(num_books=Count
('book'))
Is there anyway to have the filter only apply to the annotation, so it
would return all publishers, with some h
If you really are using backslash as a path separator on ubuntu, it
could lead to
various unexpected results.
Also, if you're not doing so, cd into the directory containing
manage.py before running
the commands.
Also, try the manage.py shell command, and at the prompt do:
---
I might be missing something here but I thought that the manage.py
commands were looked for in the "management/commands" subdirectories of
INSTALLED_APPS.
According to your email, the loaddata command lives in maintenance/commands.
Is your set up accounting for this non-default behavior?
Take ca
Thanks for the advice in the previous email. I will try the steps you
suggest
As for your other comment:
> I might be missing something here but I thought that the manage.py
> commands were looked for in the "management/commands" subdirectories of
> INSTALLED_APPS.
>
> According to your email, th
I'm getting an ImportError... I think it's a sys.path problem but I
can't figure out what to do. Below are the details. Any help?
## Mod Python Error ##
MOD_PYTHON ERROR
ProcessId: 17855
Interpreter:'my_django'
ServerName: 'cube.twusa.ca'
DocumentRoot: '/var/www/html'
URI:
Hi Bill,
(Forgive the backslashes, when I type it comes natural as a windows
developer)
I think you found my problem(s), but I am not sure what to do to solve
them.
Typing in your commands from the LIVE and TEST directories containing
manage.py I found
> -
> impo
Also take a look at the code for django-survey at
http://code.google.com/p/django-survey/
This helped me a lot when I needed to do something similar last year.
Paddy
On Jan 19, 8:42 am, dk wrote:
> I have an application in which I'd like to present a form whose
> elements are stored in a datab
Hello all,
I'm planing to start a community based django apps website. If there's
anyone interested in participating on the development please reply to
this thread or just mail me. I already have the server and the domain,
just need the website ;-)
Cheers
--
You received this message because you
On Jan 19, 10:45 pm, HRCerqueira wrote:
> Hello all,
>
> I'm planing to start a community based django apps website. If there's
> anyone interested in participating on the development please reply to
> this thread or just mail me. I already have the server and the domain,
> just need the website ;
On Tue, Jan 19, 2010 at 4:57 PM, MauroCam wrote:
>
>> pprint.pprint(sys.path)
> - LIVE & TEST both return the same as I'd expect. Not sure if /home/
> test-project/src should be in there though, and if it should not be /
> home/project/src:
> ['/home/projectt/src/projectfiles ',
> '/home/test-pr
2010/1/18 dk
>
> Is there a way to do what I'm trying?
>
>
As a totally shameless plug I wrote about this fairly recently;
http://dougalmatthews.com/articles/2009/dec/16/nicer-dynamic-forms-django/
I don't quite do the step of the database but show how one can create a form
on the fly - it could
Hi there!
I need to do some changes in the django admin change_list template (I
think so). What I need is to add some class or id (html) to every
displayed row (that list is a tree with mptt) so i can add a
javascript accordion when clicking given row. I noticed the
templatetag {% result_list cl %
Bill,
see my replies below.
>
> Well, if sys.path is the same for both, they are both going to load
> the same django.
>
> The exception to this is that, at least when python starts, the first
> item o the path is
> an empty string, representing the relative path to the current
> directory (at s
Well, as far as I know, djangoplugables is still in beta, and pinax is
very focused on a specific "product". Either way, I don't know enough
about any of these to give a precise opinion on how would it differ.
Also, django is growing, and it won't hurt if there are more than one
website providing
Maybe that sys.path.append('..') gives you access to some stuff.
I'm not sure how it's managing to load django from two different places.
apache has nothing to do with running stuff via manage.py, such as
shell or loaddata. They each run their own process worth of python,
and the sys.path manipu
Bill,
thanks for all your help. I have fixed it by manually saving
PYTHONPATH in.profile, and the sys.path is now reflecting the correct
path. Runnnig the loaddata command now correctly loads the data!
Not sure why saving it in .bashrc did not have the same effect.
Will also try your suggestions
The suggestions provided in the replies have all been very helpful to
me. I appreciate the help greatly, and I suspect that others coming
across this thread on google-groups will find the advice helpful, as
well.
I ended up doing as follows in my forms.py, and it works nicely for
me.
class
Hi
Im trying iterating over a dictionary.
i have no problem with this but when i get to the last key:value
( value is a list) i get the following error
value= list
TypeError: 'float' object is not iterable
django code
{% for states in prices_demand.items %}
{{ states.0 }}
{{ states.1.ite
On Wed, Jan 20, 2010 at 3:42 AM, Collin Anderson
wrote:
> Taking the example from:
> http://docs.djangoproject.com/en/dev/topics/db/aggregation/#filter-and-exclude
>
> Publisher.objects.filter(book__rating__gt=3.0).annotate(num_books=Count
> ('book'))
>
> Is there anyway to have the filter only ap
On 6/08/2009 10:15am, Peter Herndon wrote:
I'm pleased to announce the release of django-ldap-groups. Of special
interest for building intranet sites, django-ldap-groups allows Django
users to authenticate against LDAP, and allows site administrators to
map LDAP organizational units (OUs) to Dj
I am currently looking for a Django Developer in South Australia,
Victoria or New South Wales, who can assist me with a current web
project.
The project will involve working from an existing website that
requires both major and minor alterations.
If anyone interested, could please let me of any pre
hi ,now i want to deploy my website to nginx,,use ubuntu,
then myproject is located at /home/x/myproject/ ,
here is my configuration,thank you very much:
user www-data;
worker_processes 2;
error_log /var/log/nginx/error.log info;
events {
worker_connections 1024;
use epoll;
}
http
I am not sure if the following statements in Django/Mysql will result
in one or three database queries.
candidates = Candidate.objects.filter(department = dept).order_by('-
salary')[:30] # Gets all the top salary candidates
head_candidates = candidates[:20] # Gets top 20
tail_candidates = cand
54 matches
Mail list logo