Comments (3)
Can you please send me your ModelCrud class.
from django-crudbuilder.
of corse, i try in more that one models.
class Plano(models.Model):
nome = models.CharField("Nome do Plano", max_length=50)
valor_mensal = models.DecimalField("Valor Mensal", max_digits=8, decimal_places=2, default=0)
valor_ativacao = models.DecimalField("Valor da Ativação", max_digits=8, decimal_places=2,default=0 )
valor_coletor = models.DecimalField("Valor do Coletor", max_digits=8, decimal_places=2, default=0)
sit = models.IntegerField("Situação", choices=GLOBAL_STATUS, default = 1)
sit_web = models.IntegerField(choices=GLOBAL_STATUS, default = 1)
nr_coletores = models.IntegerField("Número de Coletores", default=1)
nr_hosts = models.IntegerField("Número de Host's", default=100)
promocode = models.CharField("Código Promocional", max_length=50, blank=True, null=True,)
valido_ate = models.DateTimeField("Vencimento", default=timezone.now)
frequencia = models.IntegerField("Frequencia Cobrança", default=1)
class Meta:
ordering = ['nome']
verbose_name = 'plano'
verbose_name_plural = 'planos'
def __str__(self):
return self.nome
class PlanoCrud(BaseCrudBuilder):
model = Plano
search_feilds = ['nome']
tables2_fields = ('nome', 'valor_mensal', 'sit')
tables2_css_class = "table table-bordered table-condensed"
tables2_css_class = "table table-bordered table-striped dataTable"
tables2_pagination = 4 # default is 10
modelform_excludes = ['created_by', 'updated_by']
login_required=True
permission_required=False
custom_modelform = PlanoForm
custom_templates = {
'list': 'cadastro/crud/crud_list.html',
# 'create': 'cadastro/crud/crud_create.html',
'create': 'cadastro/cadC.html',
'detail': 'cadastro/crud/crud_detail.html',
'update': 'cadastro/cadC.html',
'delete': 'cadastro/crud/crud_delete.html'
}
from django-crudbuilder.
Pagination bug has been resolved here : 40c0b8d
from django-crudbuilder.
Related Issues (20)
- detailview_excludes not honoured when inlineformset used in BaseCrudBuilder
- The template tag `get_verbose_field_name` should not apply title case HOT 1
- Crudbuilder depends on the presence of an `id` field in the models HOT 1
- Primary Key Issues HOT 1
- Custom form initial data HOT 1
- Empty registered cruds list HOT 4
- Include erro in Django >1.10 HOT 2
- Erro in work with models managed=False HOT 2
- Migration to Django 2.0
- Django 2.0 support HOT 2
- LOGIN_REQUIRED_FOR_CRUD not honored for registered cruds page HOT 1
- Releasing 2.0 compatible version? HOT 1
- package is broken with django-tables2.0.1 HOT 3
- post_save signal is called 2 times HOT 1
- Any issues with inline update HOT 1
- Can I see the generated views and templates?
- Add Screenshots in Readme and Docs
- New release HOT 6
- Using django-filter for Filtering HOT 2
- Pluralization seems broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-crudbuilder.