Example #1
0
# -*- coding: utf-8 -*-

from django.conf.urls import patterns, include, url
from settings import app

urlpatterns = patterns(app('views'),
    url(r'^search/$', 'search'),
    url(r'^$', 'indexPage', {'template': 'lenta.html'}, name="lenta"),
)
Example #2
0
from settings import console, typer, app
from pathlib import PurePath, Path
# - - - - - - - - - - - - - - - - - - - - - - - - 
# - - - -  - - - -  - - - -  - - - -  - - - -  - - - - 
@app.command()
def new(
):
    console.print(Path.parts)
    pass

# - - - - - - - - - - - - - - - - - - - - - - - - 
if __name__ == "__main__":
    app()


# function gitnew(){
#     usr = '******'
# 	pwd = '57a361e49a3a8d12a7a73c6d8d79cf70c3da0425'
    
#     cmds = []
#     cmds.append('git init')
#     cmds.append('git init')
    
#     curl -u f'{usr}:{pwd}' https://api.github.com/user/repos -d f'{"name":"{repo}"}'
#     git remote add origin "[email protected]:ab22375/${1}.git"
#     git add .
#     git commit -m "first commit"
#     git push --set-upstream origin master
# }
Example #3
0
# -*- coding: utf-8 -*-

from django.conf.urls import patterns, include, url
from django.contrib import admin
from settings import app
admin.autodiscover()


# приложение:
urlpatterns = patterns('',
    url(r'^', include(app('urls'))),
)

# административный интерфейс:
urlpatterns += patterns('',
    url(r'^admin/', include(admin.site.urls)),
)