Anonymous
hievery one i fix my css files load problem
Anonymous
now i cant load my back ground pic
Rust
I think, you need to check out this doc page: https://docs.djangoproject.com/en/2.0/howto/static-files/
Anonymous
Anonymous
style="background-image: url("{%static '/img/header-1.jpg' %}");">
Anonymous
i use this code
Anonymous
but it didnt worke
Rust
Then, for debugging you can open dev inspector in browser, you will see from where you are trying to load those pictures - this could give you a hint as well if everything is configured properly
Anonymous
i find my problem
Anonymous
style="background-image: url("{%static '/img/header-1.jpg' %}");">
Anonymous
my django cant undersstand this line becuse "" and '' it can't detect turly but i have no idea for fix it
Anonymous
can you help me ??
Anonymous
how most i rewrite my code
inchidi
inchidi
coz you didnt provide localhost:8000/static/assets/img/header_1.jpg?
Anonymous
but lock at in my atom bar header_1 there is in ture path
Anonymous
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
inchidi
Anonymous
inchidi
so the wrong part is on the css/html part, while your django already good
inchidi
now try inspect element your page, find the image part, and look which link rendered
inchidi
^sample
Django Bot
>> Links
- How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04 | D
Anonymous
Klim
Can somebody help me? I dont know why my signals doesnt work
https://pastebin.com/piuVE0ud
Klim
What should i do? I have places where is my Domain.save(), but nothing in the console, so signal doesnot work
Anonymous
Hello developers. I was wondering if there's any open source project to contribute to. I want to test my skills as a developer
Anonymous
Anonymous
@kmt I have. But i was just wondering if there's any here so that I can start here first
Anonymous
Django Bot
>> Blogs
- Equivalents in Python and JavaScript. Part 4
Django Bot
>> Links
- Pipenv Tutorial for Django Developers
- Techiediaries - Django: Create New Django Project (Django 1.11 Example)
Django Bot
>> Links
- Webinar: “Getting the Most Out of Django’s User Model” with Julia Looney |
Django Bot
>> Links
- Building Multi Tenant Applications with Django — Building Multi Tenant Appl
Nichita
Hi! How I can drag and drop objects to an image. For example I have in my panel objects, like bus, car, train and drag and drop this to my map(map is image). But this objects can contain data - position etc.
Max
Use js and svg
Charly
or canvas, but in both cases it doesn't has nothing to do with django
Max
django can store additional data in the database
Django Bot
>> Blogs
- Changing Default Python 3 in Terminal for Mac OS
- Pipenv Virtual Environments for Python
>> Links
- Building Modern Applications with Django and Vue.js
Anonymous
Anonymous
hi every one i need run my project on vps
do you have any video toturial link for it??
my vps is ubuntu 18.04
inchidi
inchidi
inchidi
me too tbh lol
Jimmies San
wowowo :D
Jimmies San
but gunicorn is more easy to setup
Anonymous
Anonymous
What additional library should be learnt beside django
inchidi
drf, graphene, channel? it depends tho
Jithin
Anyone knw about odoo....the erp framwork?
Django Bot
>> Links
- Advanced Django Training
Anonymous
excuseme i need a front end group
Anonymous
are there any link??
Django Bot
>> Links
- joke2k/django-environ: Django-environ allows you to utilize 12factor inspir
Django Bot
>> Jobs
- Fullstack Product Engineer (Python/ JavaScript)
Django Bot
>> Links
- Supporting Markdown in upcoming Django releases – dominicrodger.com
aan
#ask hello how to install python latest version on ubuntu 16.0.4? i try sudo apt-get install python3.7 always python 3.6.4 installed and i startproject django always ModuleNotFoundError: No module named '_sqlite3' how to fix this problem? can you help me?
inchidi
Code9
class GenericModelView():
model = 1
class ModelCreateView():
pass
class ModelRetrieveView():
pass
class ModelUpdateView():
pass
class ModelDeleteView():
pass
class ModelListView():
pass
def can_view(instance, user):
#conditional permission
return False
def can_add(instance, user):
return False
def can_change(instance, user):
return False
def can_delete(instance, user):
return False
Code9
I would like to create a set of views by subclassing the above class, making it easier to create views for new models. Any suggestions?
Django Bot
>> Links
- Django Models Best Practices - William S. Vincent
inchidi
Code9
Code9
Tabs are used -- they're not standard under PEP8 but are usable
inchidi
inner class != subclassing/extending class (inheritence) tho
inchidi
maybe you are looking for this kind of code:
class GenericModelView(Model):
model = FooModel
class ModelCreateView(ModelCreateView):
def can_add(instance, user):
return self.model.objects.filter(owner=user).exists()
by this, then:
m = ModelCreateView(*args)
m.model # will return FooModel
Code9
Code9
In that case I still have to create 5 classes per model
Code9
Oh right
Code9
Haven’t thought of that
Code9
Thanks!
inchidi
you're welcome