Re: How to customizing CSS in djangocms-table

2016-04-16 Thread Luis Zárate
You only need to overwrite the template

https://github.com/divio/djangocms-table/blob/master/djangocms_table/templates/cms/plugins/table.html

Django template engine find the template in the order of INSTALLED_APPS, so
you only need to put an app with your version of
templates/cms/plugins/table.html
before djangocms_table and django will load this file and not the
djangocms_table file



El sábado, 16 de abril de 2016, Derek  escribió:
> Is this project being maintained; looks like last change was nearly a
year ago..?
>
> On Friday, 15 April 2016 20:18:51 UTC+2, Régis Silva wrote:
>>
>> I use djangocms-table. And this plugin return
>> 
>>   Tabela exemplo
>>   
>> 
>>   2
>>   3
>>   5
>>   8
>>   
>> 
>> 
>>   a
>>   b
>>   c
>>   d
>>   e
>> 
>> 
>>   f
>>   g
>>   h
>>   i
>>   j
>> 
>>   
>> 
>>
>> But i need with Bootstrap style. I need
>> 
>>   
>> 
>>   
>>   2
>>   3
>>   5
>>   8
>> 
>> 
>>   a
>>   b
>>   c
>>   d
>>   e
>> 
>> 
>>   f
>>   g
>>   h
>>   i
>>   j
>> 
>>   
>> 
>> I'm not talking to insert the CSS properly, but extend the plugin so
that it returns this bootstrap style.
>
> --
> 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, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/df5af9aa-230e-4b94-8fd3-8bd2d4438be9%40googlegroups.com
.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyPdOcch2mgfeE1041RkXD54uET5H%3Difax0GqKdcpZ3Jwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django tutorial part 3 - question_id vs question.id

2016-04-16 Thread Peter of the Norse
On Mar 26, 2016, at 8:04 AM, jorrit...@gmail.com wrote:
> 
> I believe Django lets you access the pk field of a table (which is created 
> automatically unless you define it explicitly on your model) in multiple 
> ways: self.pk, self.id, and self._id. Someone correct me if I’m 
> wrong.

You can’t use _id.  The closest is the foreign key ID.

Peter of the Norse
rahmc...@radio1190.org



-- 
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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/C006445C-23E3-41AC-842E-7EDF52143044%40Radio1190.org.
For more options, visit https://groups.google.com/d/optout.


Error with urlresolvers.reverse when running tests for admin

2016-04-16 Thread Derek
I am struggling to get 'reverse' working when running tests for actions
defined in my admin.py files.

If I open a Django shell and run:

from django.core.urlresolvers import reverse
print reverse('admin:trees_alivetrees_changelist')

I get:

/admin/trees/alivetrees/

as expected.

But if I define a test file (called `test_admin_fail.py`):

from django.test import TestCase
from django.core.urlresolvers import reverse

class TreeAdminTest(TestCase):

def test_action_tree_mark_dead(self):
change_url = reverse('admin:trees_alivetrees_changelist')
self.assertContains(change_url, "alivetrees")   # temporary test

and run it from the command line:

python manage.py test --traverse-namespace tests.trees.test_admin_fail -v 2
--settings=test_settings

then I get this error:

Traceback (most recent call last):
  File "/dev/tests/trees/test_admin_fail.py", line 7, in
test_action_tree_mark_dead
change_url = reverse('admin:trees_alivetrees_changelist')
  File
"/.virtualenvs/s2/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 536, in reverse
return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args,
**kwargs))
  File
"/home/derek/.virtualenvs/s2/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 456, in _reverse_with_prefix
(lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'trees_alivetrees_changelist' with arguments
'()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
 >> begin captured stdout << -
nose.proxy:128 err (,
NoReverseMatch(u"Reverse for 'trees_alivetrees_changelist' with arguments
'()' and keyword arguments '{}' not found. 0 pattern(s) tried: []",),
)


The test_settings.py file is used to create an in-memory database (and has
never itself caused any issues before).


Any guidance here would be appreciated; I have tried Googling for the
error, but the combination of admin, testing and reverse is one I have not
seen.

Thanks
Derek

-- 
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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF1Wu3P7QKBwoPZJUDYePn1OVsgoQA0GCks%2BXEtJyC1iKbG3-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to customizing CSS in djangocms-table

2016-04-16 Thread Derek
Is this project being maintained; looks like last change was nearly a year 
ago..?


On Friday, 15 April 2016 20:18:51 UTC+2, Régis Silva wrote:
>
> I use djangocms-table . And 
> this plugin return
>
> 
>   Tabela exemplo
>   
> 
>   2
>   3
>   5
>   8
>   
> 
> 
>   a
>   b
>   c
>   d
>   e
> 
> 
>   f
>   g
>   h
>   i
>   j
> 
>   
> 
>
>
> But i need with Bootstrap style. I need
>
> 
>   
> 
>   
>   2
>   3
>   5
>   8
> 
> 
>   a
>   b
>   c
>   d
>   e
> 
> 
>   f
>   g
>   h
>   i
>   j
> 
>   
> 
>
> I'm not talking to insert the CSS properly, but extend the plugin so that 
> it returns this bootstrap style.
>

-- 
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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/df5af9aa-230e-4b94-8fd3-8bd2d4438be9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Comparison of django MTV and MVC architecture

2016-04-16 Thread Mukul Chakravarty
Can we say that views in MTV architecture is basically performing the tasks of 
both Models and Controller in an MVC architecture like Rails ?

-- 
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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4c6ba552-4665-42c1-b072-61c92e9c12c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.