You don’t have default.jpg in your media folder. Add jpg image named
default in the media folder.
On Mon, Mar 28, 2022 at 5:34 AM 'Delvin Alexander' via Django users <
django-users@googlegroups.com> wrote:
> Hello everyone,
>
> I am trying to register a new user by watching the Django tutorial. I
You can now easily write your URL patterns like this.
from django.urls import path
urlpatterns = [
path("", someview, name="somename")
]
On Mon, Jun 15, 2020 at 5:52 PM Kayode Oladipo
wrote:
> Use the path( ) method.
>
> from django.urls import path
>
> path('',...)
>
> On Mon, Jun 15, 20
On Mon, Jun 15, 2020 at 14:21 temitope iyanoye wrote:
> Hi everyone, I’m a newbie and I understand the basic syntax of python to
> some extents, I have a thing for web development so I chose to learn Django
> for backend dev but for like a week the whole thing looks strange to me, I
> following Y
I forgot that you need to import this
from django.utils.text import slugify
On Mon, Jun 15, 2020 at 6:35 PM Kelvin Sajere wrote:
> I think I kinda understand what you want to achieve here. You want to use
> a slug field, but you are wondering what happens when two posts have the
>
Did you specify a folder to use for media when you deployed your app? If
so, then make sure it's where you are supposed to have your media folder.
If it's a single hosting, then it should be in the public_html folder, but
on multiple hosting, it should be in the domain-specific folder. I never
real
On Mon, Jun 15, 2020 at 08:54 Soumen Khatua
wrote:
> Could you give me an example??
>
> On Mon, Jun 15, 2020 at 1:21 PM Kayode Oladipo
> wrote:
>
>> There's an id field built into every Django model (aka, the primary key
>> (pk))
>>
>> Just do, ModelInstance.id and that should do the trick.
>>
>
I think I kinda understand what you want to achieve here. You want to use a
slug field, but you are wondering what happens when two posts have the same
slug name. Here is what I do. On your model.
class Post(models.Model):
title = models.CharField(max_length=50)
slug = models.CharField(max
On Sun, Jun 14, 2020 at 19:38 Deborah wrote:
> good evening
> the tags that I use in the html file, appear on browsers when I launch the
> server, what to do ???
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this g
One of the main advantages of using a web framework or any framework for
that matter is that it takes away most of the stress of having to figure
out how to secure your application. Django is maintained and developed by
some of the best developers in the industry, so they already took care of
most
On Tue, Jun 16, 2020 at 02:22 learn code wrote:
> Hi,
>
> Thank you for your reply,sorry ,still I didn't understand how to add
> ratings.
>
> On Sat, Jun 13, 2020, 2:29 PM Gs_1001 wrote:
>
>> Hey,
>>
>> A rating feature for a peer reviewed books website would look somewhat
>> like:
>> - A books
t will check all the field if it
>> is available or not.
>> However my query is different I want to fetch the data based on ID only
>> but I want to make url as slug name, so it means the function will take
>> slug as a parameter not ID.
>>
>> On Tue 16 Jun, 2
On Tue, Jun 16, 2020 at 02:33 Kelvin Sajere wrote:
>
>
> On Tue, Jun 16, 2020 at 02:00 Soumen Khatua
> wrote:
>
>> Thank you for your response.
>>
>> On Tue 16 Jun, 2020, 6:29 AM Soumen Khatua,
>> wrote:
>>
>>> Yeah but in this way the tim
If you indeed have your media folder where it’s supposed to be, then make
sure in your settings file, you have specified that folder as your root
folder for media. I don’t see your code, so this might be difficult to
determine on my end.
--
KeLLs
--
You received this message because you are subs
The error is as it is.. Django can't find a path /index
On Fri, Jul 17, 2020, 10:22 PM Ralph Barhydt wrote:
>
> I have done the first part of the tutorial many times and suddenly, doing
> it one more time, I get this message. I am in the right directory and I
> have checked the code in urls.py
Apart from the answers already given, I see in your views, your form
variable didn’t include request.FILES that allows for files to be saved via
views. It should be form = PostForm(request.POST, request.FILES).
On Sat, Aug 29, 2020 at 12:48 allaberdi...@gmail.com <
allaberdi16yazha...@gmail.com> w
Off the bat, what I see is that your domain is not among the allowed hosts
in your settings.py file. Do that first and we'll go from there.
On Sat, Oct 31, 2020, 6:46 PM programmer 262
wrote:
> hy guys i want to deploy my app on heroku and i having a bad time this is
> the website that i deploye
I haven’t actually used repl.it, so I can’t really tell you what’s
happening. I basically just do things by creating a project, then using
manage.py to create apps for my project. But the unapplied migrations are
migrations that your project needs to be able to run. These are models that
come with
If you use a vpn, make sure it’s not on. Some vpn blocks all other ports
when they are on.
On Sun, Dec 20, 2020 at 05:27 Parul. wrote:
> Hy,
> I am not able to indentify the exact problem here. I tried various
> combinations like using only
> Python manage.py runserver
> Then
> Python manage.py
Good day everyone,
I’ve been developing web applications in django since late 2019, I have
done quite a number of projects, but I always felt using django for just
the backend and maybe a frontend framework for the frontend would actually
be better. I decided to look into vue this January, and dev
Hi Ajay,
If you would like to build something like this, then you should look into
Vuejs. I also used a design framework for Vuejs called Vuetify. You don’t
even get to see all of the amazing features the site has until you’re
logged in. I would really appreciate some positive or negative feedback
Ajay, I am currently hosting both front-end and back-end on namecheap.com,
but it's components are separate, so I can easily scale as the needs arise.
I am using MySQL for the database, so with time, I plan to move the backend
and database to Google cloud, then get a VPS or dedicated hosting on
Nam
Thanks Uche.
On Sun, Mar 14, 2021 at 15:33 Uche Kelvin wrote:
> Nice to hear from you.
>
> I love your app
>
> On Sun, 14 Mar 2021 at 16:58, Kelvin Sajere wrote:
>
>> Ajay, I am currently hosting both front-end and back-end on namecheap.com,
>> but it's compo
Simply because you haven't specified that URL path in your project, so it
would naturally not be able to find it. The path I see from your error
image, is the /admin/ path.
On Tue, Mar 16, 2021 at 10:02 Joel Goldstick
wrote:
>
>
> On Tue, Mar 16, 2021 at 9:11 AM Ronnie Atuhaire
> wrote:
>
>> He
n, Mar 14, 2021 at 15:33 Uche Kelvin wrote:
>>
>>> Nice to hear from you.
>>>
>>> I love your app
>>>
>>> On Sun, 14 Mar 2021 at 16:58, Kelvin Sajere wrote:
>>>
>>>> Ajay, I am currently hosting both front-end and back-end on
>
Just adding to the previous answer, you should always make sure your slug
field is unique when saving, as sometimes two posts can have the same title
and that would result to an error.
def _get_unique_slug(self): slug = slugify(self.blog_title)
unique_slug = slug
num = 1
while Blog.objects.filte
Sorry, the save method isn’t supposed to be inside the _get_unique_slug()
function. That’s what happens when u type code on an iPad.
On Sat, Mar 20, 2021 at 14:08 Kelvin Sajere wrote:
> Just adding to the previous answer, you should always make sure your slug
> field is unique when
Firstly, DRF is just like any other app you would create in your project
when you use it. It's not a full-blown framework. With that said, DRF uses
the same authentication system, I only use token authentication when I am
working on a project the frontend is decoupled from the backend. If not, I
ju
If you just want a random user, you could just use random.choice(). You can
use it in shell, in a function or wherever you want.
Example:
import random
users = User.objects.all() #a list of all users
random_user = random.choice(users) #a random user
On Mon, Apr 19, 2021 at 20:45 Mustafa Burhani
That's because both have the same path, and Django will always choose the
one it sees first, in this case, the audit. Just change the path of any of
the two will solve the problem.
On Mon, Apr 26, 2021 at 03:49 Mike Dewhirst wrote:
> This code in the chemical model indicates that I'm trying to d
In your URL pattern, just indicate that the audit URL pattern must first go
to “audit/{id}/”,and intro URL pattern to “intro/{id}/”.
On Mon, Apr 26, 2021 at 03:49 Mike Dewhirst wrote:
> This code in the chemical model indicates that I'm trying to display two
> different views of the same chemica
This has little to do with the backend of an application, so it’s is going
to be a JavaScript problem to solve. I would suggest using Django to write
the backend (REST API) using Django rest framework preferably, then use
some frontend framework like Vuejs, Reactjs, or Angular. I would suggest
Vuej
Glad I could help.
On Mon, Apr 26, 2021 at 09:21 Mike Dewhirst wrote:
> Many thanks Kelvin :-)
>
> M
>
>
>
> --
> (Unsigned mail from my phone)
>
>
>
> ---- Original message
> From: Kelvin Sajere
> Date: 26/4/21 18:12 (GMT+10:00)
> To
Modern applications are built so you can from it create a web app, mobile
app, or just about anything. I'm talking about building a backend API with
Django Rest Framework or any other backend technology and then create a
frontend web app, mobile app, or whatever by calling the API.
On Sat, May 8,
I don't know why you would want users to upload their own base HTML file,
but if it's to make every user have a unique frontend view, then I think it
would be better just having the users choose layouts, styles and other
frontend properties that would be saved to the database, then use these
saved
Import the User model in your forms.py and use it instead of Profile. As
the error clearly states, the Profile model does not have a username field.
Django actually recommends using the AbstractUser, or the AbstractBaseUser
to extend the default User model if you wish to create something like a
pro
If your app just sends email upon registration or just configured to send
mail generally and you would like to use an email with your production
domain like in a production setting, then you only need to change the email
configuration in your settings.py file to reflect your domain email. For
examp
What I would do in such case, is to write a function somewhere that checks
if a user applied for a leave, then check if the leave time is within a
day, then do whatever you want, like setting is_active to False. Then set
the cron job to run this function every day, every hour, or however you'd
like
I see three errors in your views and templates. First, the kvc variable in
your view holds a list of all objects in your Aboutus table and all objects
in your Services table, and I don’t think that’s what you want.
If I understand what you want to achieve, then your view should look like
this.
de
I have a feeling the hosting company might have some input on how django is
deployed on their shared Cpanel hosting, but in namecheap for instance, you
would have to make sure you have imported the application in your wsgi,
configured the media and static URLs and root to where you’d like them to
b
I would prefer using a cloud service like AWS or Google cloud service for
your media files and host your application with Heroku.
On Thu, Jun 24, 2021 at 14:05 Sunday Iyanu Ajayi
wrote:
> Hi
>
> You can use this link:
> https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-d
Not everyone can afford a VPS. And hosting a django website isn’t at all
difficult. I use shared cpanel hosting for hosting django websites often,
and it is easy. You just need to do it once and you never have to worry
about doing it again. You still have to know how to host on VPS right? Or
is it
I suggest that you use the AbstractUser model that django officially
recommends.
from django.contrib.auth.models AbstractUser
class User(AbstractUser):
age : models.IntegerField(default=0)
is_student : models.BooleanField(default=False)
# extra profile information
Then also make sure
You can create anything with both django and php, but to be fair, django
can only really be compared to laravel which is the most popular web
framework for php like django is for python. I suggest using django since
you’ve already been working with python for years. It would be easier, you
can deve
43 matches
Mail list logo