Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 14 16:11
    @MadLittleMods banned @Rehmanjeff
Selvaganesh
@selvaganesh3m

https://stackoverflow.com/questions/67824572/populate-data-in-database-using-yaml-file-through-fixtures-in-django

Please some one open the above link and help me either by answering there or Here

I Narrated my problem 2 days ago
It's been one week I'm struggling with the only task
Rens Houben
@rhouben:vac.systemec.nl
[m]
... There's already an answer to that question that's even been accepted as correct.
Selvaganesh
@selvaganesh3m

... There's already an answer to that question that's even been accepted as correct.

I'm extremely sorry I edited the Above Link Now

Rens Houben
@rhouben:vac.systemec.nl
[m]
.. From what I can see, the function you're calling explicitly wants a numeric ID -- IE, a foreign key -- and you're deliberately insisting on not giving it one, then expressing surprise that it doesn't work.
Selvaganesh
@selvaganesh3m
Yes
Rens Houben
@rhouben:vac.systemec.nl
[m]
At database level, employee.user is a foreign key pointing at an entry in settings.AUTH_USER_MODEL. I'm not sure why you think manager.finance could even be counted on to hold a value like that.
Selvaganesh
@selvaganesh3m

Especially the problem is

Employee Model

manager Field

image.png

@rhouben:vac.systemec.nl My dear ffriend

The user list is here

Please look at this
Selvaganesh
@selvaganesh3m
image.png
Those are the name of the users
Rens Houben
@rhouben:vac.systemec.nl
[m]

I need to go - I'm meeting someone for dinner - but let me be very blunt for a moment: Looking at your question and the code you've written, I have no idea what exactly you're hoping to accomplish by it, and I suspect neither do you.

This smells like an 'XY problem' -- you're trying to accomplish X but have a poor grasp of how Django works so you think doing Y might get what you want, so you're asking how to do Y and confusing people beause Y does not work that way.

Take a step back. Try to explain what you're actually trying to accomplish rather than the specific of how you're trying to go about it.

I've been where you are - frequently - and I've found that that method tends to be the most effective at getting things done.
Selvaganesh
@selvaganesh3m
Ok my dear friend @rhouben:vac.systemec.nl Thanking you
for your valuable time
Nick Smith
@Kremnari
Greetings Django(ners?)! I'm working with a django interpolated html template used to print labels. I know the backend is storing custom field information, but I don't have an example of how to access it. Is there an html-side-only way I can iterate through the fields on the model object?
Jakob Papirov
@JakobPapirov
Is it possible in Django to show currency in my native language? As in decimalcomma is used for the equivalent of cents and a space is used to denote thousand, million etc?
sorry that's actually a two part question; 1. show numbers as stated above, 2. show USD / EUR after a value, or is it simpler to do via html/css?
Rens Houben
@rhouben:vac.systemec.nl
[m]
@JakobPapirov: What you want is called localization. It's entirely possible and there are entire systems specifically built for it.
Jakob Papirov
@JakobPapirov
thanks!
Ali Hassan UOS
@AliHassanUOS
Hi Geeting! How to make Django real-time chat web app?
Rens Houben
@rhouben:vac.systemec.nl
[m]
.. Um. That's a bit like asking a general engineering forum how to build a car from scratch.
First you're going to have to decide whether to speak an extant protocol or just run all of it on your own homebrew. Then you'll have to design a messaging structure, whether you want things like fixed rooms, user-creatable ones or private messages only, how you want to handle channel administration, access control...
Jakob Papirov
@JakobPapirov
If I understand it correctly, Django supports multiple databases, but I'd have to configure it myself? In this context I refer to eg. Database 1, Database 2 both in sqlite3. If that's the case, does it mean it's prefered to only use one DB per Django project/site?
Rens Houben
@rhouben:vac.systemec.nl
[m]
It's possible to use multiple databases simultaneously in the same project, but the entire framework is geared to easily work with a single DB at a time.
Jakob Papirov
@JakobPapirov
thanks @rhouben:vac.systemec.nl that's what I got from skimming briefly https://docs.djangoproject.com/en/3.2/topics/db/multi-db/
Victor Aguilar C.
@victoraguilarc
Hi, Greeting!
Testing becomes very slow when there are many applications with many migrations.
How do you handle it? Any recommendation?
2 replies
Robert Kuzma
@balavec
Hey all… I started working with geodjango and PointFields and as a consequence the openlayer maps …
I was wondering how/where to change the icon when selecting the location in the map.
Screen Shot 2021-06-16 at 2.30.09 PM.png
I would like to change that blue dot/circle into custom png.
Jakob Papirov
@JakobPapirov
TIL about geoDjango!
is it like QGIS?
or OpenStreetMaps?
Robert Kuzma
@balavec
I think OpenStreetMaps
<script type="text/javascript">
    var map_options = {};
    var base_layer = new ol.layer.Tile({
        source: new ol.source.XYZ({
            attributions: "NASA Worldview",
            maxZoom: 8,
            url: "https://map1{a-c}.vis.earthdata.nasa.gov/wmts-webmerc/" +
                 "BlueMarble_ShadedRelief_Bathymetry/default/%7BTime%7D/" +
                 "GoogleMapsCompatible_Level8/{z}/{y}/{x}.jpg"
        })
    });

    var options = {
        base_layer: base_layer,
        geom_name: '{{ geom_type }}',
        id: '{{ id }}',
        map_id: '{{ id }}_map',
        map_options: map_options,
        map_srid: {{ map_srid|unlocalize }},
        name: '{{ name }}'
    };

    var {{ module }} = new MapWidget(options);
</script>
Andre Luiz Abdalla Silveira
@andre_prog_gitlab
I hope you enjoy the link https://pyfest.online/ :smiley:
Majid
@MajidHeydari
I use django-export-import and I want module export list_filter but how is add to project?
Alex Stelmakh
@alexstelmakh
Hey guys! Do I need to install libjpeg and zlib separately before installing wagtail? Or Pillow supplies these packages out of the box? Wagtail's website says that I need to install libjpeg and zlib before installing wagtail but I can't find how to do that:/
tsyn
@tsyn:matrix.org
[m]
I've never had to explicitly install them
Jimmy Merrild Krag
@beruic
@alexstelmakh What OS are you on?
Selvaganesh
@selvaganesh3m

@selvaganesh3m
Guys please someone help me

What is the difference between Queryset and List
Please some One Help me Out Asap
Thank you

1 reply
Rens Houben
@rhouben:vac.systemec.nl
[m]
A queryset is a set of queries you assemble and prepare before sending it off to be evaluated by the database backend. A List is a list of things.
I'm not sure what you're trying to ask.
Habib ur Rehaman
@Rehmanjeff
i am testing a legacy django app
i created a new app init and wanted to see it on the admin side
can anyone help, where to look for such thing?