Coder Social home page Coder Social logo

quxdev / qux Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 3.73 MB

Django Library

Home Page: https://qux.dev/qux/

License: Apache License 2.0

Python 41.59% HTML 10.99% CSS 6.06% JavaScript 41.35%
django django-framework django-package django-utilities django-utils python

qux's Introduction

Qux: A Django Template

Installation

_blank.html

Create your own _blank.html file and add your own CSS and JS files

{% extends '_seo.html' %}

...

{% block stylesheets %}
{{ block.super }}
{# Bootstrap is included with _seo.html #}
{# Overload after block.super if you don't want the Qux version #}
<link rel="stylesheet" href="{% static 'css/site.css' %}">
{% endblock %}

{% block javascript %}
{{ block.super }}
{# Bootstrap is included with _seo.html #}
{# Overload after block.super if you don't want the Qux version #}
{# Site Javascript #}
<script src="{% static 'js/site.js' %}"></script>
{% endblock}}

Introduction

Qux is a django template with augmented models, extra template tags, and useful utilities.

It is similar in intent to django_extensions, a massively useful tool.

  • Core
  • Auth
  • SEO
  • Templates
  • TemplateTags
  • Utils
    • mysql
    • date
    • phone

Core [qux_core]

Models

  • CoreModel
    • dtm_created
    • dtm_updated
    • to_dict(self)
    • get_dict(cls, pk)
    • slug - CharField() that also indicates if the model requires auto-slugs
    • AUDIT_SUMMARY - AuditSummary model
    • AUDIT_DETAIL - AuditDetail model
  • CoreModelPlus - where all deleted rows are soft-deleted only
  • AbstractLead
  • CoreModelAuditSummary
  • CoreModelAuditDetail

qux_auth

  • Company
  • Profile - OneToOne(User)

qux_core

Abstractions

  • AbstractCompany
  • AbstractContactPhone
  • AbstractContactEmail
  • AbstractContact

Logging

  • DownloadLog
  • UploadLog
  • CoreURLLog
  • CommLog

Auth [qux_auth]

urls.py

urlpatterns += [
    ...,
    path("", include("qux.auth.urls.appurls", namespace="qux_auth")),
    ...,
]

URLS

  • login/
  • logout/
  • change-password/
  • password-reset/

SEO [qux_seo]

Models

  • SEOSite - OneToOne(Site)
  • SEOPage

Mixin

  • SEOMixin

Templates

  • _blank.html

Template Tags

Library: qux

  • multiply
  • divide
  • atleast
  • qux_min
  • qux_max
  • date_before
  • addstr
  • url_replace
  • {% lineless %}{% endlineless %}

Library: quxform

  • is_checkbox โ†’ Boolean

Add these configuration in project/project/settings.py file after adding qux app in your project

LOGIN_URL = '/login/'
LOGOUT_URL = '/logout/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
SHOW_USERNAME_SIGNUP = False

ROOT_TEMPLATE = "_app.html"

qux's People

Contributors

akash1e9 avatar jayanta-hq avatar vishalapte avatar

Stargazers

 avatar

Watchers

 avatar  avatar

qux's Issues

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.