Re: Looking for a team to join

2024-01-08 Thread Srinivasulu Kethanaboina
i like your work .can you  tell me what can you do.

On Mon, Jan 8, 2024 at 5:50 AM Hudaifa Saleh  wrote:

> Hey Django developers I hope you all doing great
> I'm hudaifa  self-taught Django developer looking for to join team
> I want to get experience I can done the job for free.
> please if you can help me I will be very grateful for you
>
> Here's my GitHub: https://github.com/hudaifa-saleh
>
> thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c9a7f15e-d8b9-4d56-83ce-d4177ff247f7n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHD3yQzoU467as9kDLm52DjbohUjF_84eLwf1y6vj2K5AHqGUg%40mail.gmail.com.


[no subject]

2024-01-08 Thread frank dilorenzo
I have 3 models as follows:

from django.db import models
from ckeditor.fields import RichTextField


# Create your models here.
class Species(models.Model):
scientific_name = models.CharField(max_length=50)
common_name = models.CharField(max_length=50, null=True, blank=True)
butterfly_image = models.ImageField(null=True, blank=True,
default="default.png")
# description = models.TextField(max_length=800, null=True, blank=True)
description = RichTextField(blank=True, null=True, default=None)

def __str__(self):
return self.scientific_name

class Meta:
ordering = ["scientific_name"]

=

from django.db import models


# Create your models here.
class Suppliers(models.Model):
name = models.CharField(max_length=60, null=True, blank=True)
phone = models.CharField(max_length=20)
email = models.EmailField(null=True, blank=True)
country = models.CharField(max_length=100, null=True, blank=True)
address = models.CharField(max_length=50, null=True, blank=True)
city = models.CharField(max_length=100, null=True, blank=True)
state = models.CharField(max_length=100, null=True, blank=True)
zipcode = models.CharField(max_length=15, null=True, blank=True)

class Meta:
ordering = ("name",)

def __str__(self):
return f"{self.name}"

=

from django.db import models
from suppliers.models import Suppliers
from species.models import Species


# Create your models here.
class Shipments(models.Model):
yes_no_choice = ((True, "Yes"), (False, "No"))

name = models.OneToOneField(
Suppliers, null=True, blank=True, on_delete=models.SET_NULL
)
species = models.OneToOneField(
Species, null=True, blank=True, on_delete=models.SET_NULL
)
label = models.CharField(max_length=20)
received = models.IntegerField(default=0)
bad = models.IntegerField(default=0, blank=True, null=True)
non = models.IntegerField(default=0, blank=True, null=True)
doa = models.IntegerField(default=0, blank=True, null=True)
para = models.IntegerField(default=0, blank=True, null=True)
released = models.IntegerField(default=0, blank=True, null=True)
entered = models.BooleanField(choices=yes_no_choice, default=False)
updated = models.DateTimeField(auto_now=True)
created = models.DateTimeField(auto_now_add=True)

def save(self, *args, **kwargs):
sub_quantity = self.bad + self.non + self.doa + self.para
self.released = self.received - sub_quantity

super().save(*args, **kwargs)

def __str__(self):
return str(self.name)

class Meta:
ordering = ["-created"]

==

I have a form to input shipment information:

{% extends 'base.html' %}
{% block title %}
  Create/Update form
{% endblock title %}
{% block content %}
  

  {% csrf_token %}
  {{ form.as_p }}
  
  
Back

  

  
{% endblock content %}

PROBLEM:


   - Shipments with this Name already exists.

Name:-BF.D.C.R.E.SE.B.N.ENTH.B.W.L.P.S.
 T.E.H.

Species:-Actias lunaAdelpha fessoniaAgraulis
vanillaeAnartia jatrophaeAnteos chlorindeAppias drusilla
 Archeaprepona
demophonArgema mimosaeAscia monusteAtrophaneura semperiAttacus
atlasBattus polydamasBiblis hyperiaBrassolis isthmiaCaligo
eurilochusCatonephele numiliaCatopsilia pyrantheCethosia cyane
 Charaxes brutusChilasa clytiaColobura dirceConsul fabiusDanaus
gilippusDione junoDircenna deroDoleschalia bisaltideDryadula
phaetusaDryas iuliaEryphanis polyxenaEueides isabellaEuphaedra
neophronEuploea phanaethreaEuxanthe wakefieldiGraphium angolanus
 Greta otoHamadryas amphinomeHebemoia glaucippeHeliconius
charitoniusHeraclides anchisiadesHypna clymenestraHypolimna
monteironisHypolimnas bolinaIdea leuconoeJunonia coeniaKallima
paraletkaLexia dirteaLimenitis archippusLycorea cleobaea
 Mechanitis
polymniaMelinaea ethraMemphis glyceriumMethona confusaMorpho
peleidesMyselia cyanirisNeptis hylasNessaea aglauraOpisiphanes
tamarindiOpsiphanes cassinaPachliopta aristolochiaePanacea
procillaPapilio thoasParides iphidamasParthenos sylviaPhoebis
argantePrecis atlitesPrepona omphalePterourus troilus
Rothschildea
lebeauSalamis anacardiiSiproeta epaphusTigridia acestaTirumala
septentrionisTithorea harmoniaTroides rhadamantusVindula dejone


Label:

Received:

Bad:

Non:

Doa:

Para:

Released:

Entered:YesNo

Back 


the supplier can have many species, many labels but if I try to add a
shipment with the same name I get an error saying the name already exists.
I need help trying to resolve this