Django template coverage

2015-08-24 Thread Ned Batchelder
Hi all, If you've been using coverage measurement on your Django code, you might be interested in a new development: now you can also measure the coverage of your templates. Coverage.py 4.0 (currently in the last stages of beta) supports plugins. Django-coverage-plugin implements measurement

Re: Forms questions

2015-08-24 Thread Sait Maraşlıoğlu
Can you provide the template code? On Tuesday, 25 August 2015 00:16:40 UTC+3, Hugo Kitano wrote: > > Hi, I'm trying to figure out what's wrong with my form: > > I've noticed that every time I load my submit view, the request.method is > GET not POST, so nothing gets saved to the database. > > >

Crispy form layout stored in db

2015-08-24 Thread Sait Maraşlıoğlu
You can see my question, I can clarify it if needed. http://stackoverflow.com/questions/32192693/building-crispy-form-from-database Basically I store my form layout in db and let user change it. I got a structural model and got it working but when it came consume the queryset and create a

Re: Using ModelForms

2015-08-24 Thread Sait Maraşlıoğlu
instead of model_instance.sub_date = timezone.now() I suggest you to declare a default for that field in your model definition. default = timezone.now() On Thursday, 20 August 2015 23:41:05 UTC+3, Hugo Kitano wrote: > > Hi, I'm a beginner using Django, and I'm having trouble using model forms

Re: Using ModelForms

2015-08-24 Thread 'Hugo Osvaldo Barrera' via Django users
On Mon, Aug 24, 2015, at 16:41, Hugo Kitano wrote: > I'm actually now pretty certain that my html file is what's causing it > to not work > > Including your message as an inline image rather than simple text will reduce the amount of people that can actually read your message (and complicate

Forms questions

2015-08-24 Thread Hugo Kitano
Hi, I'm trying to figure out what's wrong with my form: I've noticed that every time I load my submit view, the request.method is GET not POST, so nothing gets saved to the database. Here's views.py models.py Thanks!! -- You received this message because you are subscribed to the Google

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
Also, it looks like the request.method is always 'GET', not 'POST', which means the form is never saved. How is this happening? On Monday, August 24, 2015 at 12:56:39 PM UTC-7, Hugo Kitano wrote: > > More specifically, what does the action="/stats/" field do and require? > > On Monday, August

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
More specifically, what does the action="/stats/" field do and require? On Monday, August 24, 2015 at 12:41:16 PM UTC-7, Hugo Kitano wrote: > > I'm actually now pretty certain that my html file is what's causing it to > not work > > > > On Monday, August 24, 2015 at 11:34:41 AM UTC-7, Hugo

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
I'm actually now pretty certain that my html file is what's causing it to not work On Monday, August 24, 2015 at 11:34:41 AM UTC-7, Hugo Kitano wrote: > > It always redirects to the stats page, though the model instance isn't > saved. > I suspect it has to do with the .save() function, but I

Re: Using ModelForms

2015-08-24 Thread Hugo Kitano
It always redirects to the stats page, though the model instance isn't saved. I suspect it has to do with the .save() function, but I can't tell why, since I even create the modelform in the views.py file. Thanks, Hugo On Saturday, August 22, 2015 at 3:19:07 AM UTC-7, James Schneider

Re: Django + microservices: What's correct approach?

2015-08-24 Thread Tom Christie
Django REST framework is a general purpose API toolkit, and more than capable of building microservice-type services. Likewise there are plenty of frameworks in alternative languages that are also suitable for building APIs that could be characterized as 'microservice'. The reason you're

Re: Django Many-to-many Query: Publications with no Articles? Publications with some Articles?

2015-08-24 Thread Shawn Milochik
I couldn't find it in Django's documentation; just from StackOverflow and another source (both found via Google). I always used to do something like Thing.objects.filter(other__id__isnull=True) to do that, but clearly this is better. -- You received this message because you are subscribed to

Re: Django Many-to-many Query: Publications with no Articles? Publications with some Articles?

2015-08-24 Thread Edward Sitarski
Thanks - didn't see that one. For my own reference/sanity, can you attach a link where this is documented? I should have found this one before too. > -- You received this message because you are

Re: Django CMS or Wiki?

2015-08-24 Thread guettli
A static content generator is what I use up to now. I want to alter the site from every web enabled device (pc or tablet). Am Montag, 24. August 2015 14:30:07 UTC+2 schrieb Shawn Milochik: > > On Mon, Aug 24, 2015 at 2:49 AM, guettli > wrote: > >> >> Has someone an advice

Re: Django CMS or Wiki?

2015-08-24 Thread Shawn Milochik
On Mon, Aug 24, 2015 at 2:49 AM, guettli wrote: > > Has someone an advice which django application could be used? > > Regards, > Thomas Güttler > > Why does it have to be a Django application? Static site generators such as Hugo and Pelican are very popular, especially for

Re: Django + microservices: What's correct approach?

2015-08-24 Thread François Schiettecatte
What do you mean by microservices? What are you looking to accomplish. François > On Aug 24, 2015, at 3:17 AM, cr0hn wrote: > > Hi guys, > > I'm investigating about how to use Django as a microservices architecture, > but I'm so surprised that I don't found almost

Re: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form CommitmentForm needs updating

2015-08-24 Thread James Schneider
You need to set the fields attribute in the Meta class of your ModelForm: https://docs.djangoproject.com/en/1.8/topics/forms/modelforms/#selecting-the-fields-to-use Or, if you are not using a custom ModelForm (Django is building it for you dynamically), then you need to specify the fields on

Re: Django CMS or Wiki?

2015-08-24 Thread Avraham Serour
Django cms feels like a framework for building your own cms, it has many things that will help you to build your own system and it is very flexible mezzanine is a finished product, it is highly configurable but it may be harder to customize (but always possible) On Mon, Aug 24, 2015 at 10:47 AM,

Re: Django CMS or Wiki?

2015-08-24 Thread Avraham Serour
try http://mezzanine.jupo.org/ On Mon, Aug 24, 2015 at 9:49 AM, guettli wrote: > I am unsure which application I should use for my personal homepage. > > At work we use a wiki and I like it a lot, since you can edit the content > very fast and linking > between pages is very

Django + microservices: What's correct approach?

2015-08-24 Thread cr0hn
Hi guys, I'm investigating about how to use Django as a microservices architecture, but I'm so surprised that I don't found almost information about that. Could you help me with some resource, documentation and anything? Thanks! Cheers -- You received this message because you are subscribed

Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form CommitmentForm needs updating

2015-08-24 Thread Francis Louis
Hi All, May I ask this question, I am using Django 1.8.4 with Python 2.7 After I run the development server by running this command c:\Python27\python.exe manage.py runserver and access the below given URL, http://127.0.0.1:8000/ I get this error, May I know how to resolve this issue? Best

Django CMS or Wiki?

2015-08-24 Thread guettli
I am unsure which application I should use for my personal homepage. At work we use a wiki and I like it a lot, since you can edit the content very fast and linking between pages is very easy. On the other hand django cms seems to be a widespread application and it could be a solid ground for