GithubHelp home page GithubHelp logo

baharogurlu / django-project-with-bootstrap Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 15.64 MB

Django Project With Bootstrap

Python 94.87% JavaScript 1.92% HTML 1.92% CSS 1.24% PowerShell 0.02% Batchfile 0.02%

django-project-with-bootstrap's Introduction

Django-Project-With-Bootstrap

Django Project With Bootstrap Database-URL-Views-Bootstrap Template-Security

My site adlı proje oluştukmak için: django-admin startproject mysite

Poll adında bir app eklemek için: python manage.py startapp polls Uygulamayı çalıştırmak için mysite içerisine gidip: python manage.py runserver Model eklendikten sonra polls app i için : python manage.py makemigrations polls mysite içerisindeki settings.py içerisine INSTALLED_APPS Altına ‘polls’, ifadesi eklenir. Bu işlemden sonra 1-)python manage.py makemigrations polls 2-)python manage.py migrate komutu çalıştırılır. Migrations dosyası içerisinde initial.py adlı file oluşur. Bu file içerisinde oluşturduğunuz modeller gözükür.

POPULATING DATABASE:

  1. python manage.py Shell
  2. import django

  3. django.setup()

  4. from polls.models import Question,Choice

  5. Question.objects.all()
  6. from django.utils import timezone
  7. q=Question(question_text="whats your name",pub_date=timezone.now())

  8. q.save()

  9. Question.objects.all()

  10. exit()

Models.py içerisine def str(self): return self.choice_text

modeller içerisindeki değerleri döndüren metod yazılır. Choice_text bi attributre tır.

python manage.py createsuperuser //süper user oluşturma python manage.py runserver

django-project-with-bootstrap's People

Contributors

baharogurlu avatar

Stargazers

 avatar

Forkers

trellixvulnteam

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.