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
i check it many times but it have no method for back gournd pics
background pic is the same static pic as any other. Make sure you follow this part: https://docs.djangoproject.com/en/2.0/howto/static-files/#configuring-static-files - you have to have static in settings configured and take a look at paragraph 3
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
my django cant undersstand this line becuse "" and '' it can't detect turly but i have no idea for fix it
nope, django template engine will only "look" {% static '/img/header-1.jpg' %} part
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
will you get the image by opening this link?
yes exacly open it with no problem
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
Jimmies San
my django cant undersstand this line becuse "" and '' it can't detect turly but i have no idea for fix it
you REALLY need to study django before use it: like all others thing. it's totally useless this discussion in this tone. time totally lost. 3 days you ask: in 3 days you can do a good tutorial, complete it, and understand all major components of django.
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
Jimmies San
What should i do? I have places where is my Domain.save(), but nothing in the console, so signal doesnot work
your file looks ok, maybe the problem is in another file check this maybe can help you https://simpleisbetterthancomplex.com/tutorial/2016/07/28/how-to-create-django-signals.html
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
@kmt I have. But i was just wondering if there's any here so that I can start here first
Anonymous
you REALLY need to study django before use it: like all others thing. it's totally useless this discussion in this tone. time totally lost. 3 days you ask: in 3 days you can do a good tutorial, complete it, and understand all major components of django.
HI DEAR JIMMY plz check my photo that i send in gp i have no problem with back end django my problem was how load css in front end and else about front end i most tell you i didnt know css even js just know it in low level but in this project i was alone and didnt work with me any fornt end coer at last i find my problem and i wnt never ever give up and think a place for asking questions and get helping toghedr
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
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
Anonymous
what stack you prefer?
i don't know which options i have but i find a link it was usefull
Anonymous
i don't know which options i have but i find a link it was usefull
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-local-django-app-to-a-vps
Jimmies San
oh gunicorn+nginx. okay
i prefer uwsgi+nginx :P [flame: civil war :D ]
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?
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
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
In that case I still have to create 5 classes per model
inchidi
In that case I still have to create 5 classes per model
in that case you can try ViewClass.as_view(model=ModelClass) in your url
Code9
Oh right
Code9
Haven’t thought of that
Code9
Thanks!
inchidi
you're welcome