Thank you very mutch! It work.
class Domains(models.Model):
domainname = models.CharField(max_length=200, blank=True)
domainuser = models.ForeignKey(User, on_delete=models.CASCADE)
domainwhois = models.DateField(blank=True, null=True)
def save(self, *args, **kwargs):
detai
So i am trying to create a directory with a Home,Blog,and Contact
selection. But every time i click on one of them they all go back to the
home page. How do i fix this, and here is the secton of code below. let me
know if you need to see more
Home
Blog
Contact
For this you have provide an app inside your urls and refer to it as
home:about where home is the app name and about is the page to be rendered.
Also provide namespace in the urls so that the url is linked to the app
name.
Kind Regards,
Aditya
On Thu, May 31, 2018, 7:54 AM Spence Patrick
wrote:
Is your link tag href="./about" or href="/about/"
On Wed, May 30, 2018, 19:14 wrote:
> Hello,
>
> I'm debugging an issue that I'm having with my URL patterns. In my HTML I
> have an "about me" page that is linking to an about.html file in my
> templates/blog/ directory. When I load the homepage
The date = models.DataTimeField() should be date = models.DateTimeFild() ?
https://docs.djangoproject.com/en/2.0/ref/models/fields/#datetimefield
Caleb Bryson 于2018年5月31日周四 上午9:45写道:
> I am getting a attribute error when i try to run my server. does anyone
> know what i can change in this code t
The f in field should be capitalized
On Wed, May 30, 2018, 20:10 Caleb Bryson wrote:
> it is still saying "AttributeError: model 'django.db.models' has no
> attribute 'Charfeild'
>
> On Wednesday, May 30, 2018 at 10:04:04 PM UTC-4, Mike Dewhirst wrote:
>>
>> On 31/05/2018 11:45 AM, Caleb Bryson
I think it was because i did not use camel casing so CharField instead of
Charfield. I will continue the tutorial and see if that works
On Wednesday, May 30, 2018 at 10:04:04 PM UTC-4, Mike Dewhirst wrote:
>
> On 31/05/2018 11:45 AM, Caleb Bryson wrote:
> > I am getting a attribute error when i
it is still saying "AttributeError: model 'django.db.models' has no
attribute 'Charfeild'
On Wednesday, May 30, 2018 at 10:04:04 PM UTC-4, Mike Dewhirst wrote:
>
> On 31/05/2018 11:45 AM, Caleb Bryson wrote:
> > I am getting a attribute error when i try to run my server. does
> > anyone know wh
On 31/05/2018 11:45 AM, Caleb Bryson wrote:
I am getting a attribute error when i try to run my server. does
anyone know what i can change in this code to fix that?
Try indenting the __str__ method so it is within the scope of the Post class
from django.db import models
class Post(models.Mod
I am getting a attribute error when i try to run my server. does anyone
know what i can change in this code to fix that?
from django.db import models
class Post(models.Model) :
title = models.Charfield(max_length=140)
body = models.Textfield()
date = models.DataTimeField()
def __str__(self):
re
it did thanks :). and changing the { to ( helped also for anyone view for
future reference
.
On Wednesday, May 30, 2018 at 8:48:53 PM UTC-4, Michael MacIntosh wrote:
>
> Hi Caleb,
>
> I think there should be a comma here
>
> basic.html' {'content'
>
> so it should be
>
> basic.html', {'content'
Hello,
I'm debugging an issue that I'm having with my URL patterns. In my HTML I
have an "about me" page that is linking to an about.html file in my
templates/blog/ directory. When I load the homepage and click on the "about
me" link than "domain.com/about/" loads, which matches the URL pattern
Hi Caleb,
I think there should be a comma here
basic.html' {'content'
so it should be
basic.html', {'content'
Hope that helps!
On 5/30/2018 5:45 PM, Caleb Bryson wrote:
I can not seem to figure out what the syntax error is in line 7 of
this code, can anyone help
from django.shortcuts impo
I can not seem to figure out what the syntax error is in line 7 of this
code, can anyone help
from django.shortcuts import render
def index(request):
return render(request, 'hybridair/home.html')
def contact(request):
return render(request, 'hybridair/basic.html' {'content' : ['contact the
tea
> import whois
>
>
> class Domains(models.Model):
> domainname = models.CharField(max_length=200, blank=True)
> domainuser = models.ForeignKey(User, on_delete=models.CASCADE)
> details = whois.whois(domainname)
> w = str(details.expiration_date)
> domainwhois = models.DateFie
Hi,
If I got this right, what you want to do is save the "domainwhois" with the
expiration date of the result of the whois.whois function.
Unfortunately, things don't work in class level like this, because things
are static here: whois.whois will be run one single time, not on every
object. For t
Hi,
The css file is in .../polls/static/polls/style.css
And here is the full code of .../polls/templates/polls/index.html:
{% load static %}
{% if latest_question_list %}
{% for question in latest_question_list %}
{{
question.question_text }}
{% endfor %}
{% else %}
Hello all.
I'm beginer. Sorry. Can anyone help me with this model. It did't
work(TypeError:
expected string or bytes-like object
):
import whois
class Domains(models.Model):
domainname = models.CharField(max_length=200, blank=True)
domainuser = models.ForeignKey(User, on_delete=model
Mathew,
Thanks!
Mark
On Tue, May 29, 2018 at 2:18 PM, Matthew Pava wrote:
> You can access self.instance, which should have all the fields populated
> for that model instance. So you can access it via self.instance.pk.
>
>
>
> Keep in mind, though, that if you are creating the Document, you w
maybe. Best thing for you to do would make an example and write a ticket
about it at https://code.djangoproject.com/
On Wednesday, May 30, 2018 at 1:58:28 AM UTC-4, ebuild wrote:
>
> This is happening only after updated to from 1.8 to 1.11, using Eclipse.
> I have multiple model admin with diffe
maybe. Best thing for you to do would make an example and write a ticket
about it at https://code.djangoproject.com/
On Wednesday, May 30, 2018 at 1:58:28 AM UTC-4, ebuild wrote:
>
> This is happening only after updated to from 1.8 to 1.11, using Eclipse.
> I have multiple model admin with diffe
Globally, we need call "add" form for model in admin site, but with options
selected by user:
1. user checks items in "changelist" of objects RepoFile
2. select action "create job"
3. redirect user to standard "add" form for new object DeviceCronJob where
field download_files already checked by
22 matches
Mail list logo