Hi,
I have a problem involving a relation between two entities, Person and
Group.
from django.contrib.auth.models import User
from django.db import models
class Group(models.Model):
employees = models.ManyToManyField('staff.Person',
related_name='groups')
leader = mod
gt; mixed up with the contrib.auth group. I would try changing the name of
> my group temporarily to something else just to eliminate that.
>
> Mike
>
> On 25/02/2013 8:58am, Roberto López López wrote:
>> Hi,
>>
>> I have a problem involving a relation between
Try https://docs.djangoproject.com/en/1.5/intro/
On 02/27/2013 09:29 AM, Akshay Ramesh wrote:
> Hi I am new to Djnago and would like to have some help from you. Where
> should I start from ?
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group
gt; For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Kind regards,
Roberto López López
System Developer
Parallab, Uni Computing
Høyteknologisenteret, Thormøhlensgate 55
N-5008 Bergen, Norway
Tel:(+47) 555 84091
--
You received this message because you are
opt_out>.
>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegrou
-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Kind regards,
Roberto López López
System Developer
Parallab, Uni Computing
Høyteknologisenteret, Thormøhl
cr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Kind regards,
Roberto López López
Syste
;
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, s
Hi guys,
I am developing a django application and between my requirements there
is being able to set the model fields into different languages.
For example:
class Employee(models.Model):
position = models.CharField()
# etc.
The employee position won't be the same in English and Spanish.
; an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Kind
Hi,
I am setting up i18n in my django app. I have added the following to my
settings.py:
PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
LOCALE_PATHS = (
os.path.join(PROJECT_PATH, 'locale'),
)
LANGUAGES = [
('en', _('English'))
at 10:31 PM, Roberto López López <mailto:roberto.lo...@uni.no>> wrote:
>
>> Hi guys,
>>
>> I am developing a django application and between my requirements there
>> is being able to set the model fields into different languages.
>>
>> For
ved this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googleg
Yes, I meant that. It works great, and fits perfectly my needs. I give
it an AAA+
Thanks again.
On 03/07/2013 02:58 PM, Johan ter Beest wrote:
>
> On Mar 6, 2013, at 4:20 PM, Roberto López López wrote:
>
>>
>> Thanks for your suggestion Johan.
>>
>> Just
not understand what the error indentation means.
> I am new to django, coming from PHP.
> I was using touch, because unlike PHP, I wanted changes to show without
> kicking users off.
> now I am afraid to use touch.
>
>
> On Thursday, March 7, 2013 8:54:15 AM UTC-5, R
If you are using pycharm, you just need to use the local history to
check which indents you have changed.
(right click over the file you want to check - local history - show
history - ...)
On 03/07/2013 03:58 PM, frocco wrote:
> The problem with the stack trace, is that I could not tell what vi
Hi,
How can I iterate over several list objects available in my template?
I'd like to avoid having to concatenate them in the view and pass that
as another parameter.
I mean something like this:
{% for x in list1, list2, list3... listN %}
{% if not forloop.first %}, {% endif %}write som
Thank you very much!
On 03/08/2013 03:12 PM, Javier Guerra Giraldez wrote:
> On Fri, Mar 8, 2013 at 5:07 AM, Roberto López López
> wrote:
>> I'd like to avoid having to concatenate them in the view and pass that
>> as another parameter.
>
>
> two ideas come
Hi,
I have a problem with my data model while doing field lookups. This is
my models.py:
from django.db import models, IntegrityError
# Create your models here.
class Model1(models.Model):
title = models.CharField(max_length=15)
models2 = models.ManyToManyField('Model2', through='Thro
/2013 05:02 PM, akaariai wrote:
> On 22 maalis, 15:44, Roberto López López wrote:
>> Hi,
>>
>> I have a problem with my data model while doing field lookups. This is
>> my models.py:
>>
>> from django.db import models, IntegrityError
>>
>> # Creat
Hi everyone,
We are trying to deploy a django application on our apache server
(mod_wsgi) following
https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ We
have different virtualhosts defined as well in httpd.conf.
We are now stuck, apache is throwing the following error:
WS
pinosa" <mailto:jlouis.espin...@gmail.com>> wrote:
>
> Do all your sites share the same Python, or are they in different
> virtualenvs?
>
> --
> Joey "JoeLinux" Espinosa
> Python Developer
> http://about.me/joelinux
>
&
7;ve implemented this solution myself.
>>
>> --
>> Joey Espinosa
>> Python Developer
>> http://about.me/joelinux
>>
>> On Apr 11, 2013 5:20 PM, "Roberto López López" > <mailto:roberto.lo...@uni.no>> wrote:
>>
>>
>> Hi J
Hi,
I have problems setting up django-guardian to work properly in my web
application. Object permissions seem to be correct after testing with
the django shell, but somehow admin doesn't seem to react to the
permission system.
I have a Department model:
class Department(models.Model):
Hi everyone,
I need to do some validation in my model. So far, I have been able to
validate normal forms, but I want to validate forms with an inline, to
ensure that at least one of those inlines match the requirement.
My code:
class PDMAdminForm(ModelForm):
class Meta:
Problem solved with BaseInlineFormSet.clean() :-)
On 05/11/2013 06:56 PM, Roberto López López wrote:
>
> Hi everyone,
>
> I need to do some validation in my model. So far, I have been able to
> validate normal forms, but I want to validate forms with an inline, to
> ensure
http://groups.google.com/group/django-users?hl=en
> <http://groups.google.com/group/django-users?hl=en>.
> For more options, visit
> https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
Hi,
I am having trouble registering a function to the m2m_changed signal. My
code is as follows:
1. from django.db.models.signals import m2m_changed
2. from django.db import models
3. from django.dispatch.dispatcher import receiver
4.
5. class Project(models.Model):
6. employees = models.M
Btw I have opened a stackoverflow thread:
http://stackoverflow.com/questions/17149305/post-save-signal-and-relations
At the beginning I was thinking of using a post_save signal, but an user
there suggested me to better use the m2m_changed.
On 06/18/2013 04:12 PM, Roberto López López wrote
Hi,
I need a sort of prepopulated foreign key with countries and their phone
prefixes, to add to my models. Does anyone know any 3rd party package or
service providing this? Thanks.
Cheers,
Roberto
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
Ok, answering my own question: django-country-dialcode
On 06/20/2013 11:35 AM, Roberto López López wrote:
> Hi,
>
> I need a sort of prepopulated foreign key with countries and their phone
> prefixes, to add to my models. Does anyone know any 3rd party package or
> service
Hi,
After creating an object from the admin interface I'm redirected to a
"localized" version of the url. For example, if the original url is
http://127.0.0.1:8000/admin/project/project/2/ , I'm redirected to
http://127.0.0.1:8000/en/admin/project/project/2/ .
I suppose this has to do with the m
Update: if I disable 'django.middleware.locale.LocaleMiddleware', it's
not redirecting anymore. But I need to have i18n support in my website!
Any idea?
On 06/26/2013 05:09 PM, Roberto López López wrote:
> Hi,
>
> After creating an object from the admin inter
Hi,
I am trying to listen to the m2m_changed signal on my models, but I
can't make it work. Even the execution flow does not reach the linked
method!
class Project(models.Model):
departments = models.ManyToManyField('department.Department',
related_name='projects',
I have tried as well using the post_save signal and overriding the
save() method. But in none of those cases Project.departments is
populated yet when reaching my code :-/
On 06/28/2013 11:50 AM, Roberto López López wrote:
>
> Hi,
>
> I am trying to listen to the m2m_changed
.com/groups/opt_out.
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.co
..@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Kind regards,
Roberto López López
System Developer
Paral
I am doing tests and the m2m_changed signal seems to work perfectly as
long as I have not defined a "through" model. Is there any trick here?
Thanks!
On 06/28/2013 12:14 PM, Roberto López López wrote:
>
> I have tried as well using the post_save signal and overriding the
>
Changing the m2m_changed signal on Project.departments.through to
post_save on ProjectDepartmentMembership did the trick.
m2m_changed signal seems to work as long as you don't explicitly define
the "through" model.
On 06/28/2013 02:06 PM, Roberto López López wrote:
>
>
-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Kind regards,
Roberto López López
System Developer
Parallab, Uni Computing
Høyteknologisenteret, Thormøhlensgat
ails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
Well, I suppose you are running that locally or have access to the
server. So show the logs.
On 07/27/2013 01:40 PM, Nigel Legg wrote:
>
> I have provided all the information I have. That's all there is on the
> screen in the browser. There is no trace.
>
> On 27 Jul 2013 1
On 07/28/2013 08:35 AM, Karl Arunachal wrote:
> ||
--
Roberto López López
System Developer
Parallab, Uni Computing
+47 55584091
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop rec
e from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.go
egroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Roberto López López
System Developer
Parallab, Uni Computing
+47 5
his group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.co
You have to fake the migration.
On 09/08/2013 09:12 PM, Harjot Mann wrote:
> I am trying to add a new field to model class in django using south
> but when I am running ./manage.py migrate app, I am getting this error
> http://202.164.53.122/~harjotmann/southerror
>
--
Roberto
Hi,
I need to use the m2m_changed signal to assign permissions over an
object. But somehow, I cannot make it work.
To summarise, my models.py is as follows:
from cmsplugin_news.models import News
from django.contrib.auth.models import Group
from django.db import models
from guar
ou edit the relationship
> from a *News* model form, you need to hook it up
> ("sender=News.department.through").
>
> On Sep 17, 2013, at 3:59 AM, Roberto López López <mailto:roberto.lo...@uni.no>> wrote:
>
>>
>> Hi,
>>
>> I need to use the m2m_c
roups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/d
Hi,
I want to integrate django-modeltranslation into the cmsplugin_news
package. I mean, register some fields in the News class to have a
translation in the DB for each of the settings.LANGUAGES defined.
class NewNewsForm(forms.ModelForm):
class Meta:
model = News
Hi,
I am trying to translate my model using django-modeltranslation and the
SlugField is giving me a lot of trouble. I have successfully registered
the fields for translation, as you can see in the db table description:
| Table "public.news_news"
Column
Hi,
I am extending a 3rd party model in my application, using multi-table
inheritance. I can create an instance and modify it, but when I try to
list the created objects at http://localhost:8000/en/admin/news/news/ ,
I am getting a nice exception:
Traceback:
File
"/home/roberto/.virt
ani
> Author of The Digital Cat <http://lgiordani.github.com>
> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
> page <https://github.com/lgiordani> - My Coderwall profile
> <https://coderwall.com/lgiordani>
>
>
> 2013/10/2 Robe
y GitHub
> page <https://github.com/lgiordani> - My Coderwall profile
> <https://coderwall.com/lgiordani>
>
>
> 2013/10/2 Roberto López López <mailto:roberto.lo...@uni.no>>
>
> Hi,
>
> I am extending a 3rd party model in my application, using
&
legroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e7e37ad2-281c-41f4-a0b9-b333294fe1b8%40googlegroups.com.
> For more options, visit https://groups.google.com/group
ps.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e7e37ad2-281c-41f4-a0b9-b333294fe1b8%40googlegroups
On 10/03/2013 04:13 PM, Roberto López López wrote:
> *return HttpResponse(json.dumps([players]) ,
> content_type='application/json')*
better without the square brackets
*return HttpResponse(json.dumps(players) ,
content_type='application/json')*
--
Roberto Ló
Hi,
The users of my project prefer ckeditor, so I am wondering how to use it
for cms.plugins.text . I am already making use of django-ckeditor in
other parts of the application. Can anyone enlighten me please?
Thanks,
Roberto
--
You received this message because you are subscribed to the Goo
wrong list, sorry :-(
On 10/07/2013 11:23 AM, Roberto López López wrote:
> Hi,
>
> The users of my project prefer ckeditor, so I am wondering how to use it
> for cms.plugins.text . I am already making use of django-ckeditor in
> other parts of the application. Can anyone enli
Hi,
In my project I make use of django-admin. I need to have different
readonly_fields depending on the user is connected, thus administrators
will be able to modify all fields, and other users less fields. Which
method do I have to override? I have already tried
ModelAdmin.get_readonly_fields() a
_superuser:
return readonly
else:
import itertools
return itertools.chain(readonly, ('is_featured',))
On 10/10/2013 02:45 PM, Roberto López López wrote:
> Hi,
>
> In my project I make use of django-admin. I need to have different
> reado
rm()? It should be the
> solution.
>
>
>
> On Thu, Oct 10, 2013 at 9:45 AM, Roberto López López
> mailto:roberto.lo...@uni.no>> wrote:
>
> Hi,
>
> In my project I make use of django-admin. I need to have different
> readonly_fields depending on the user
_featured', )/, the user can check/uncheck the box in
the admin interface. Do you see any flaw here? Thanks again!
Roberto
On 10/10/2013 04:52 PM, Timothy W. Cook wrote:
> On Thu, Oct 10, 2013 at 10:04 AM, Roberto López López
> mailto:roberto.lo...@uni.no>> wrote:
&
oyd Dube
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group
s+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ef9db670-7a3a-4b84-
Which is the question?
On 07. nov. 2013 09:15, Harjot Mann wrote:
Is using the InnoDb storage engine as default as per my knowledge in
MySql MyISAM is the default storage engine.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe
ango-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/860138ae-d915-493d-9643-2148842eb724%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-
68 matches
Mail list logo