Hello,
I'm using a model with a many to many relationship to Site. I noticed
that the redirect from the admin site (the link "View on Site") is to
a domain that is not associated with the current SITE_ID. in other
words I have two sites, "devel.domain.com" and "www.domain.com." When
I select
On Wed, Jun 30, 2010 at 6:32 AM, Desproposito wrote:
> I've been thinking about how to do an application I have in mind, a
> kind of social network, and it's obvious you have to load different
> 'modules' like Friends, Messages, Posts, etc. The problem is that I
> have no
Hey guys,
I'm planning on writing a django app that will serve as a tool for
writing mail-merge type form letters. Well, not actually letters, but
documents which will have variable substitution in them, to either
rendered either as HTML or LaTeX documents or some other markup language.
Of
On Wednesday 30 June 2010 06:32:03 Desproposito wrote:
> I've been thinking about how to do an application I have in mind, a
> kind of social network, and it's obvious you have to load different
> 'modules' like Friends, Messages, Posts, etc. The problem is that I
> have no idea about how to do it
[I'm sorry I posted this question in the Developers Group, it won't
happen again :)]
Hi all,
First of all i'd like to say that I'm new in Python and Django and
maybe my question is stupid, sorry in case it is. Anyway I'm learning
fast I think. I'm boring of working with PHP and Java, and I'm
Hi,
I have a Django application with an "Article" model. I'm using the
radio_fields in django-admin with two of the ForeignKey fields that
are linked to Article.
Currently the related tables have five and twenty entries each, so
this UI works quite well on the Add/Change pages.
However, I'm
To make your code more portable, I would suggest to have settings.py
file as follow : see below.
It is still unclear to me what needs to be done to catch up the
language in my profile.
Another issue I have is that all the languages are shown ...
How to limit the number of languages to a sub-set
well yes, its adding all the fields in again. the errors thrown are
about missing required fields.
obviously this isn't a good approach since I'm not really editing the
model object, I'm just trying to fool the admin into letting me use
the inlines interface.
so I've opted to avoid using the
On 6/29/10 4:20 PM, Ray Cote wrote:
Hi Tim:
Thanks for the pointers.
I think the setattr is probably safest way to deal with the Django models.
--Ray
- Original Message -
From: "Tim Chase"
To: django-users@googlegroups.com
Cc: "Ray
Hi all,
I'm trying to do
foo is a User auth object
comments.readers is a ManyToMany field that links back to the User
I can iterate just fine by using
{% for foo in comments.readers.all %}
{% endfor %}
But I want to do this:
{% if foo in comments.readers.all %}
do stuff here
{% endif %}
Hi Tim:
Thanks for the pointers.
I think the setattr is probably safest way to deal with the Django models.
--Ray
- Original Message -
From: "Tim Chase"
To: django-users@googlegroups.com
Cc: "Ray Cote"
Sent: Tuesday,
On 29 June 2010 20:07, Andy McKay wrote:
> On 2010-06-29, at 10:48 AM, tiemonster wrote:
>
>> Is a signal emitted after a successful login? I need to hook a
>> particular piece of code into that point in the application.
>
One easy way is to wrap the login view function and
On 2010-06-29, at 10:48 AM, tiemonster wrote:
> Is a signal emitted after a successful login? I need to hook a
> particular piece of code into that point in the application.
Not specifically, if you are using django.contrib.auth last_login is set by
some scripts, eg the login
I was intrigued so I did it, I get this solution:
from models import User, Group, Membership
def example(request):
example_group_id = 1 #I create only one group to test, this is his id
group = Group.objects.get(pk=example_group_id)
for user in group.members.iterator(): #Get all user
Hi there,
I am trying to customize the django changelist and I have been having
trouble displaying data across reverse ForeignKey relationships.
Despite searching at length I have been unable to find a better method
to display this data than using _set.all(). My issue with this
solution is that
Bill Freeman wrote:
Not buildout specific, but, if I recall correctly, the pages egg
(among others) is not
built in such a way that the media files get included (in setup.py the
function that
goes and discovers the .py files to install only does .py files, other
files must be
added more
On 06/29/2010 12:01 PM, Ray Cote wrote:
Hi List:
I have a Django model with over 100 fields in it that is loaded from a data
feed.
Each row in the model has a unique field, let's call it item_id.
When loading new data, I'm first checking to see if item_id is in the table,
if it is, I want to
Is a signal emitted after a successful login? I need to hook a
particular piece of code into that point in the application.
--
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 everyone, considering these two classes.
class Foo(models.Model):
bar = models.ManyToManyField(Bar, blank=True, null=True, default=None)
class Bar(models.Model):
pass
I have a many to many relationship in my admin page so I can select multiple
Bar objects on Foo, which is good, but
No, it doesn't use unique_together to do the joins, but
unique_together will enforce the uniqueness constraint of the compound
key, and allow you to do a lookup of an object based on the compound
key.
As Bruno explained, you'll have to use for surrogate primary keys the
auto-generated integer
class User(models.Model):
name = models.CharField(max_length=128)
class Group(models.Model):
name = models.CharField(max_length=128)
members = models.ManyToManyField(User, through='Membership')
class Membership(models.Model):
person = models.ForeignKey(User)
group =
Thanks for the link Derek.
I don't think it quite does what I want.
I guess I should have been more specific.
I want to change how the Users object is displayed in the Django admin.
This is a one line change in the Django code, but I would rather not change
Django if I can avoid it.
Is there
Hi List:
I have a Django model with over 100 fields in it that is loaded from a data
feed.
Each row in the model has a unique field, let's call it item_id.
When loading new data, I'm first checking to see if item_id is in the table,
if it is, I want to update it with the new data from the new
Erm. I'm not sure as I've never done it. Have a read of the source for
contrib.admin. If you can't find what you're looking for let me know.
Euan
On Jun 28, 10:41 am, Massimiliano della Rovere
wrote:
> Yes that's my idea.
> Can you tell me which class/method
Django admin can't differentiate between empty string and None and
picks empty string which makes sense in most cases.
If you don't like the idea of empty string override the save method
and coerce empty string to None before calling the super classes save,
e.g.
class YourModel(models.Model):
Try to debug this using PDB. You can insert some breakpoints where the form
is not validated and see what are the errors.
Atenciosamente,
Vinicius Mendes
Solucione Sistemas
vinic...@solucione.info
On Tue, Jun 29, 2010 at 12:14 PM, felix wrote:
>
> I need to present an
Hi there !
One of my model fields attribute is set to null="true" to allow None
values. But if I use admin to save those model objects and leave it
blank, it saves blank value instead of None.
How to fix this ?
And Blank value is not None. Blank is "" (empty) but None is NULL in databases.
-RJ
I need to present an admin form that has no fields from the model and
only offers admin inlines.
class AptTranslationForm(DefaultModelForm):
class Meta:
model = AptTranslation
class AptTranslationsAdmin(models.Admin):
inlines = [AptTranslation_Inline,]
fields = []
the
On Jun 28, 5:47 pm, thusjanthan wrote:
> Hi,
>
> I have a Topic class I would like to create a form based on. BUT, I
> want many of these objects so Topics. How do I obtain such a feature.
>
> Suppose my form object is as follows:
>
> class TopicForms(ModelForm):
>
Hi everyone,
Thanks for your responses. After some research on this, it looks like
urllib2 is the way to go. With this I can write a python program that
runs on any of our linux machines, and can do a GET to get info that
is similar to what the user sees in the forms (ie, defaults for
various
On Jun 28, 6:47 pm, thusjanthan wrote:
> Hi,
>
> I have a Topic class I would like to create a form based on. BUT, I
> want many of these objects so Topics. How do I obtain such a feature.
>
> Suppose my form object is as follows:
>
> class TopicForms(ModelForm):
>
Eduan,
This might be a little technical for a beginner, but you'll have to
learn sometime :)
Python looks for modules according to the python path. If your module
isn't available on the path, then you'll get an error like you are
seeing. I believe that manage.py adds the directory it is in to
Hi everyone, considering these two classes.
class Foo(models.Model):
bar = models.ManyToManyField(Bar, blank=True, null=True,
default=None)
class Bar(models.Model):
pass
I have a many to many relationship in my admin page so I can select
multiple Bar objects on Foo, which is good, but I
You can also use ./manage.py validate to get django to check over your
models. Sometimes syncdb or others will fail because of a model
validation issue.
Alex
On Jun 28, 3:20 pm, Jonathan Hayward
wrote:
> P.S. This problem did not resurface after I made other
Not buildout specific, but, if I recall correctly, the pages egg
(among others) is not
built in such a way that the media files get included (in setup.py the
function that
goes and discovers the .py files to install only does .py files, other
files must be
added more painfully, and a lot of
On Jun 28, 7:54 pm, Jacob Fenwick wrote:
> Is there a simple way to change the displayed name of the users object in
> the auth package?
>
> I don't care about what it's called under the hood. I just want to change
> what the user sees.
>
> I'd like to avoid changing the
Hello everybody,
I have followed the install instructions for the latest versions of
the following: jython (version: jython-2.5.2b1), django (1.2.1) and
jython-django (version 1.1.1) and have built a war of my very simple
test application.
Oh i built the war on my linux box and have tested in
> I'd like to find a way to let my users submit form data without
> submitting
> it via an actual web form. For example, I have users that would like
> to
> send their data via email, or perhaps provide it in an excel spread
> sheet,
>
> I'm trying to figure out how to do this and still leverage
Hi
On Mon, Jun 28, 2010 at 4:37 PM, Jeff wrote:
> Hi,
>
> I have a question concerning some queryset behaviour in Django 1.1.
>
> In this example, I have an article model that can contain 1 or more
> authors who are users registered through Django's auth system.
>
> I
On Jun 28, 1:48 am, DoubleD wrote:
> I want to be able to edit all data on one page. How can i achieve
> this ? Should i modify my models? If so, then how should i modify
> them?
>
> class TextStyle(models.Model):
> color = models.CharField(_("color"), max_length=7)
>
On Jun 29, 12:29 pm, samie wrote:
> sir i am a beginner in python and django..
>
> i want develop a content management system using django..
>
> plz help me wht shld i do from where shld i start..
>
> i am learning python from google videos and develop a application
>
Django 1.2.1, with Python 2.6
I am trying to establish a many-to-many for a userprofile (working
with a legacy database so some of the field names are a little
strange...).
The models I have are:
class UserGrouping(models.Model):
#many-to-many
id = models.AutoField(primary_key=True,
Can You describe your folders structure and show us settings.py file?
If You followed tutorial correctly everything should work fine.
On Tue, Jun 29, 2010 at 2:00 PM, Eduan wrote:
> Okay thanks that you all are so helpful.
> I went through the whole tutorial allot of
I made a buildout with the config below that didn't work right and
found it needed to have some extra paths added.
Here is the extra path I needed:
'/home/john/buildout/eggs/django_page_cms-1.1.3-py2.6.egg',
'/home/john/buildout/eggs/django_page_cms-1.1.3-py2.6.egg/pages/templates/pages',
On Jun 29, 1:41 pm, justin jools wrote:
> Hi Tom if you read my original post you will realise that the error is
> being caused by setting of context processors to media_url (see
> original post).
> When context processors are active the {media_url} tag works
> perfectly,
Hi Tom if you read my original post you will realise that the error is
being caused by setting of context processors to media_url (see
original post).
When context processors are active the {media_url} tag works
perfectly, but breaks the admin.
If I comment out :
settings.py
Hi all,
I have the following code below and i need receive the parameters of
the index view: Sfase=[ ], Sserie=[ ], Sba=[ ], St=[ ] and f to my
view draws_graph but i don't know.
Because if I pass the parameters as I am passing on draws_graph
view(line 68,69 and 70 - view draws_graph), it
Okay thanks that you all are so helpful.
I went through the whole tutorial allot of times and can't even
complete part 1.
I thought that it was my setup that i was using.
I am using Windows 7 and Eclipse SDK Version: 3.5.2 for my programming
environment. I am using a MySQL 5.5 database.
It all
Yes, great ;) that worked. I put it in my root Apps folder...
seems very strange that it doesnt work in site-packages.
Anyway this will do fine :)
On Jun 29, 12:19 pm, Venkatraman S wrote:
> On Tue, Jun 29, 2010 at 4:35 PM, justin jools wrote:
> >
On Tue, Jun 29, 2010 at 5:08 PM, justin jools wrote:
> I tried installing by python setup.py install: SVN checkout, 0.3.1
> zip and also tried installing binary 0.3 exe.
> They all installed fine everytime, I also just tried moving 'tagging'
> to python/Lib/site-packages
On Tue, Jun 29, 2010 at 12:33 PM, justin jools wrote:
> I corrected my settings.py links:
>
> TEMPLATE_DIRS = 'C:/django/portfolio_root/templates/'
> MEDIA_ROOT = 'C:/django/portfolio_root/site-media/'
> MEDIA_URL = '/site-media/'
> ADMIN_MEDIA_PREFIX = '/media/'
>
> but I
I tried installing by python setup.py install: SVN checkout, 0.3.1
zip and also tried installing binary 0.3 exe.
They all installed fine everytime, I also just tried moving 'tagging'
to python/Lib/site-packages
It seems that Python isnt finding it.
On Jun 29, 12:19 pm, Venkatraman S
I corrected my settings.py links:
TEMPLATE_DIRS = 'C:/django/portfolio_root/templates/'
MEDIA_ROOT = 'C:/django/portfolio_root/site-media/'
MEDIA_URL = '/site-media/'
ADMIN_MEDIA_PREFIX = '/media/'
but I still get this error:
TemplateSyntaxError at /admin/
Caught an exception while rendering:
On Tue, Jun 29, 2010 at 4:35 PM, justin jools wrote:
> I've installed Django Tagging SVN checkout, 0.3.1 zip, 0.3 exe and
> 0.2.1 versions
> and I keep getting 'no module named tagging' when I try to run python
> manage.py syncdb.
>
> I've checked my Python path and added
I've installed Django Tagging SVN checkout, 0.3.1 zip, 0.3 exe and
0.2.1 versions
and I keep getting 'no module named tagging' when I try to run python
manage.py syncdb.
I've checked my Python path and added extra links:
C:\Python26\Lib\site-packages\tagging;
C:\Python26\Lib\site-packages;
Yes I did accidentally set my
ADMIN_MEDIA_PREFIX = '/site-media/' instead of media
I'll try this
On Jun 29, 8:57 am, bruno desthuilliers
wrote:
> On 29 juin, 00:44, justin jools wrote:
>
>
>
>
>
> > I am trying to use media_url with
You can learn from http://www.django-cms.org/ project.
It have all You need to start Your own project and to learn.
On Tue, Jun 29, 2010 at 12:41 PM, samie wrote:
> 1 more query..
>
> what are important that i shld. learn in python and in django to
> develop my cms..
>
1 more query..
what are important that i shld. learn in python and in django to
develop my cms..
--
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
sir i am a beginner in python and django..
i want develop a content management system using django..
plz help me wht shld i do from where shld i start..
i am learning python from google videos and develop a application
which is available on django home website..
m using python 2.6 and django
On 29 juin, 10:54, Eduan wrote:
> Hi all. I am a old Delphi programmer and started to use Django.
Hi Eduan
Just for a quick clarification : Django is a framework, based on the
Python programming language, and you'll need a good knowledge of
Python itself to make the besr
I do not know whether there is or not the complete tutorial, but you
can write the errors you receive or the doubts you have.
They could be useful for other beginners too :)
On Tue, Jun 29, 2010 at 10:54, Eduan wrote:
> Hi all. I am a old Delphi programmer and started to
Hi all. I am a old Delphi programmer and started to use Django. I
believe that it is the future of programming. I started at
Djangoprojects's tutorial and get stuck at places. Is there some
place
that I can download the full finished tutorial? or if anyone of you
have the complete tutorial that
On 28 juin, 19:27, thusjanthan wrote:
> Yes you are correct I am looking to implement the compounded primary
> keys.
It's a fact that Django's ORM doesn't support compound primary keys so
far. It's a bit of a shortcoming, but the good news is that it's a
FOSS project so
Hi all. I am a old Delphi programmer and started to use Django. I
believe that it is the future of programming. I started at
Djangoprojects's tutorial and get stuck at places. Is there some place
that I can download the full finished tutorial? or if anyone of you
have the complete tutorial that
On 29 juin, 00:44, justin jools wrote:
> I am trying to use media_url with generic views:
> When I set context processors to media_url, with generic views it
> breaks Admin:
>
> Caught an exception while rendering: user
>
> settings.py
> TEMPLATE_CONTEXT_PROCESSORS =
>
Hallöchen!
Margie Roginski writes:
> I'd like to find a way to let my users submit form data without
> submitting it via an actual web form. For example, I have users
> that would like to send their data via email, or perhaps provide
> it in an excel spread sheet,
Maybe you can fool the view
or you can use python urllib2: http://docs.python.org/library/urllib2.html
On Tue, Jun 29, 2010 at 02:15, Gabriel Gayan wrote:
> Maybe trying with ajax?
> jquery has some nice functions to deal with ajax post requests.
> You can even send files via ajax.
> From the server
67 matches
Mail list logo