Good to know. Thanks again!
On Monday, July 24, 2017 at 10:23:44 PM UTC-6, Alexander Joseph wrote:
>
> I'm new to django, but coming from php I think its the greatest thing ever.
>
> I have a model for Invoices ...
>
> {{{
> from django.conf import settings
> from django.db import models
> from dj
On 27/07/2017 9:18 AM, Alexander Joseph wrote:
Thanks I'll pick up that book.
Would another acceptable approach be to do this in the view by
overriding the form_valid() method? Can you tell me if there is any
benefit/disadvantage to doing it one way or another? Thanks again
If you can do it
Traceback (most recent call last):
File
"/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/utils/autoreload.py",
line 226, in wrapper
fn(*args, **kwargs)
File
"/home/eliaspai/danibraz/.danibraz/lib/python3.5/site-packages/django/core/management/commands/runserver.py",
Thanks I'll pick up that book.
Would another acceptable approach be to do this in the view by overriding
the form_valid() method? Can you tell me if there is any
benefit/disadvantage to doing it one way or another? Thanks again
On Tuesday, July 25, 2017 at 4:48:22 PM UTC-6, Mike Dewhirst wr
The problem was I had records in the database from before I changed the
'their_company' field to a ForeignKey. Before it was a CharField so some of
the records had actual company names in them. I deleted those records since
there wasnt any real data in there anyways, just dummy data. Everything
Perfect, thanks!
On Wednesday, July 26, 2017 at 2:41:52 PM UTC-6, Lee Hinde wrote:
>
> in the init method of your form do something like this:
>
> self.fields['verification_date'].widget.attrs["placeholder"] = 'date'
>
> > On Jul 26, 2017, at 1:31 PM, Alexander Joseph > wrote:
> >
> > I'm usi
in the init method of your form do something like this:
self.fields['verification_date'].widget.attrs["placeholder"] = 'date'
> On Jul 26, 2017, at 1:31 PM, Alexander Joseph
> wrote:
>
> I'm using {{ form.as_p }} in my template and would like to be able to use
> placeholders in the individual
I'm using {{ form.as_p }} in my template and would like to be able to use
placeholders in the individual input fields. Is there a way to do this?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop re
Hi, thanks for the reply, however when I take out the 'their_company' field
altogether everything works fine. Also in the error it references the
their_company field. The entire error is *"invalid literal for int() with
base 10: 'NewCor'"* NewCor is a company in the contacts table. Thanks
On
On 2017-07-26 11:52, Alexander Joseph wrote:
> "*ValueError: invalid literal for int() with base 10:*" after I
> made a field in my models.py a ForeignKey. Below is my models.py
The problem lies in this line:
> new_invoice_num = int(last_invoice_num) + 1
For some reason last_invo
Very roughly.
Something along the lines of this
I would create a Player (players) and a Match (matches) tables.
The match table contains 4 keys (player1, player2, player3, player4) and some
extra fields (created, status, etc.)
For each player you store some type of a skill (number) and a status
Hello, I came across this error:
"*ValueError: invalid literal for int() with base 10:*" after I made a
field in my models.py a ForeignKey. Below is my models.py
from django.conf import settings
from django.db import models
from django.core.urlresolvers import reverse
from django.utils import ti
What will be the best approach to designing a database schema that groups users
in a collection of 4?
How will you create a model for lets say in an online game setting such that
you want only 4 players in a single group based on thesame criteria amongst
players?
Creating this model is problem
Maybe it's because you have instructed crispy to not generate the form tag and
you have not added it yourself in the HTML code.
--
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, se
Hi,
I need to develop a view that can help end-users create forms from the
frontend like SurveyMonkey or Google Survey Forms. Basically I need to get
admin forms at frontend and let the user's create forms on given set of
fields.
Can anyone point me to right direction please?
Thanks.
Shazia
--
You can include a template snippet into the body of the main template that
is rendering your current view.
That snippet in turn can either be passed data (such as a user count) from
the view that calls the main template - see
http://code.runnable.com/UpeQSkq7JxN6AANF/dynamic-content-in-a-templ
Thank you it worked.
Much appreciated.
Regards,
Shazia
On Wed, Jul 26, 2017 at 5:47 AM, M Hashmi wrote:
> Nothing wrong with your function based view. Just try to fill data in DB
> field. It will work. Because you don't have any record in DB. Try to use
> 'get_or_create' function.
>
>
> M
>
>
Nothing wrong with your function based view. Just try to fill data in DB
field. It will work. Because you don't have any record in DB. Try to use
'get_or_create' function.
M
On Wed, Jul 26, 2017 at 4:50 AM, Shazia Nusrat
wrote:
> Hi,
>
> I have a simple model like below:
>
> class Artists(mode
Hi All,
Just started a few weeks ago with (v1.11) *Django* (coming from Rails) and
I *love* it! Kudos to all the dev's!
I'm fiddling with creating forms. What would be the best approach to add a
*to_div* method to the *forms.Form* class ? many frameworks (bootstrap,
semantic-ui, etc.) are usi
Hello Guys
I am new to django. i am working on a web app and one of the requirements
in the application is a dropdown list in the header that displays the
number of users registered to a company that logins( The list is limited to
just 10 users). so this list needs to be there for all the pages
Hi,
I have a simple model like below:
class Artists(models.Model):
name = models.CharField(max_length=200)
description = models.TextField()
def __unicode__(self):
return self.name
I am trying to call it in my view like below:
def artistdetail(request, id):
Thank you so much for help.
Regards,
Shazia
On Tue, Jul 25, 2017 at 12:27 PM, Tim Graham wrote:
> Replace renderer=HorizontalRadioRenderer with attrs={'class': 'inline'}
> and then style radio elements using CSS. contrib.admin uses this
> approach. Here's the CSS:
>
> https://github.com/django
Hi, I'm getting this error when i try to create a new page. here's the
traceback.. any ideas on how to fix this?
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/en/cms_wizard/create/?language=en
Django Version: 1.11.3
Python Version: 3.6.0
Installed Applications:
('djangocm
23 matches
Mail list logo