version 0.1

This commit is contained in:
2022-04-21 14:48:17 +02:00
parent e3d4616e62
commit f754b02d91
6 changed files with 23 additions and 82 deletions

View File

@@ -1,61 +1,43 @@
# README #
This README would normally document whatever steps are necessary to get your application up and running.
**cao_blogr** is mini app for blogging developed with the Pyramid framework
### What is this repository for? ###
* Quick summary
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
### How do I get set up? ###
## How do I get set up? ##
- Change directory into your newly created Pyramid project.
cd cao_blogr
` cd cao_blogr `
- Create a Python virtual environment.
python3 -m venv env
`python3 -m venv env `
- Upgrade packaging tools.
env/bin/pip install --upgrade pip setuptools
`env/bin/pip install --upgrade pip setuptools `
- Install the project in editable mode with its testing requirements.
env/bin/pip install -e ".[testing]"
` env/bin/pip install -e ".[testing]" `
- Initialize and upgrade the database using Alembic.
- Generate your first revision.
env/bin/alembic -c development.ini revision --autogenerate -m "init"
`env/bin/alembic -c development.ini revision --autogenerate -m "init" `
- Upgrade to that revision.
env/bin/alembic -c development.ini upgrade head
`env/bin/alembic -c development.ini upgrade head `
- Load default data into the database using a script.
env/bin/initialize_cao_blogr_db development.ini
` env/bin/initialize_cao_blogr_db development.ini `
- Run your project's tests.
env/bin/pytest
` env/bin/pytest `
- Run your project.
env/bin/pserve development.ini
### Contribution guidelines ###
* Writing tests
* Code review
* Other guidelines
### Who do I talk to? ###
* Repo owner or admin
* Other community or team contact
`env/bin/pserve development.ini `

View File

@@ -1,43 +0,0 @@
cao_blogr
=========
Getting Started
---------------
- Change directory into your newly created project.
cd cao_blogr
- Create a Python virtual environment.
python3 -m venv env
- Upgrade packaging tools.
env/bin/pip install --upgrade pip setuptools
- Install the project in editable mode with its testing requirements.
env/bin/pip install -e ".[testing]"
- Initialize and upgrade the database using Alembic.
- Generate your first revision.
env/bin/alembic -c development.ini revision --autogenerate -m "init"
- Upgrade to that revision.
env/bin/alembic -c development.ini upgrade head
- Load default data into the database using a script.
env/bin/initialize_cao_blogr_db development.ini
- Run your project's tests.
env/bin/pytest
- Run your project.
env/bin/pserve development.ini

Binary file not shown.

View File

@@ -35,6 +35,7 @@
{{ form.tag(class_='form-control') }}
</div>
<br />
<div class="form-group">
<a class="btn btn-default" href="{{ request.route_url('home') }}"><span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<button class="btn btn-primary" type="submit" name="form.submitted">
@@ -45,6 +46,7 @@
{% endif %}
</div>
<p class="text-center">Apprendre la syntaxe de <a href="https://www.markdownguide.org/basic-syntax/" target="_blank">Markdown</a></li></p>
</form>

View File

@@ -10,7 +10,7 @@
<title>{{page_title}}</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" crossorigin="anonymous">
<!-- Custom styles for this scaffold -->
<link href="{{request.static_url('cao_blogr:static/theme.css')}}" rel="stylesheet">
@@ -37,7 +37,6 @@
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li><a href="#band">TAGS</a></li>
<li><a href="{{ request.route_url('apropos')}}">A PROPOS</a></li>
<li><a href="{{ request.route_url('page_search') }}"><span class="glyphicon glyphicon-search"></span></a></li>
<!-- si anonyme, lien pour se connecter -->
{% if request.authenticated_userid %}
@@ -84,11 +83,12 @@
<!-- Footer -->
<footer class="text-center">
<div class="row">
<p class="text-center">&copy; 2017&nbsp;-&nbsp;Phuoc Cao
<p class="text-center">
&copy; 2017&nbsp;-&nbsp;Phuoc Cao
&nbsp|&nbsp<a href="{{ request.route_url('apropos')}}">A propos</a>
{% if request.authenticated_userid == 'admin' %}
&nbsp|&nbsp<a href="{{request.route_url('users')}}" alt = "Utilisateurs">
<span class="glyphicon glyphicon-user"></span></a>
&nbsp|&nbsp<a href="{{request.route_url('users')}}">Utilisateurs</a>
{% endif %}
</p>
@@ -98,7 +98,7 @@
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="//code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -3,7 +3,7 @@ import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
with open(os.path.join(here, 'README.md')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
@@ -35,7 +35,7 @@ tests_require = [
setup(
name='cao_blogr',
version='0.0',
version='0.1',
description='cao_blogr',
long_description=README + '\n\n' + CHANGES,
classifiers=[