Code Monkey home page Code Monkey logo

django101-ab2017's Introduction

Django101-AB2017 Etkinlik Notları

Examples for Python and Django

django-admin startproject proje_adi --> Django projesi oluşturma kodu

python manage.py runserver --> projeyi serverda koşma komutu

python manage.py startapp app_adi --> projenin altında yeni bir app oluşturmak için

python manage.py test --> testi deneme kodu

Kaynaklar:

https://docs.djangoproject.com/en/1.10/intro/tutorial01/

https://tutorial.djangogirls.org/tr/index.html

http://www.pythondersleri.com/p/django-egitim-serisi.html

----2----

python manage.py makemigrations --> oluşturma

python manage.py migrate (python manage.py migrate model_app) --> uygulama

python manage.py showmigrations --> tüm migrations görme

python manage.py sqlmigrate model_app 0001_initial --> oluşan sql'i görmek için

class Meta:
    db_table="kisi_tablosu"                               --> tablo adı değiştirme

python manage.py shell --> teste yazmadan test etmek için(mesela views)

python manage.py createsuperuser --> admin paneline yetkili atama


from model_app.models import Kisi,Sanatci kisi=Kisi() print(kisi) Kisi object kisi.ad = "Ahmet Can" kisi.soyad="kepenek" kisi.eposta '[email protected]' kisi.epsota="[email protected]" kisi.eposta '[email protected]' kisi.eposta="[email protected]" kisi.eposta '[email protected]' kisi.save() kisi.id 1


sanatci=Sanatci() sanatci.ilgilendigi_bolum =1 sanatci.kisi=kisi sanatci.save() sanatci.id 1


netstat -ap |grep 8000

Proje CollectiveWork

iş ---> kullanıcı

*user profile app

-kullanıcı ekle -kullanıcı profili

*ticket app

python -m smtpd -n -c DebuggingServer localhost:1025 --> mesaj almak için gerekli olan EMAIL sunucusu açılıyor

django101-ab2017's People

Contributors

faoztas avatar

Stargazers

Alpay Önal avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.