Skip to content

Commit 3b98b12

Browse files
committed
README fixes
1 parent 8399bc8 commit 3b98b12

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

README.markdown

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# [Django Macros Url](https://github.com/phpdude/django-macros-url/) v0.2.0 - Routing must be simple as possible
1+
# [Django Macros URL](https://github.com/phpdude/django-macros-url/) v0.2.0 - Routing must be simple as possible
22

3-
Django Macros Url makes it easy to write (and read) url patterns in your django applications by using macros.
3+
Django Macros URL makes it easy to write (and read) URL patterns in your Django applications by using macros.
44

5-
You can combine your prefixes with macro names with underscore, for example you can use macro `:slug` and `:product_slug`. They both will be compiled to same regex pattern with their group names of course. Multiple underscores accepted too.
5+
You can combine your prefixes with macro names with an underscore, for example, you can use a macro `:slug`
6+
and `:product_slug`. They both will be compiled to same regex pattern with their group names of course.
7+
Multiple underscores accepted too.
68

79
[![Build Status](https://travis-ci.org/phpdude/django-macros-url.svg?branch=master)](https://travis-ci.org/phpdude/django-macros-url)
810

@@ -18,23 +20,25 @@ pk - \d+
1820
uuid - [a-fA-F0-9]{8}-?[a-fA-F0-9]{4}-?[1345][a-fA-F0-9]{3}-?[a-fA-F0-9]{4}-?[a-fA-F0-9]{12}
1921
```
2022

21-
If you want to offer more macros by default, you can fork and make pull request.
23+
If you want to offer more macros by default, you can fork and make a pull request.
2224

2325
### Installation
2426

25-
You can install library with pypi like a charm.
27+
You can install the library with PyPI.
2628

2729
```
2830
pip install django-macros-url
2931
```
3032

3133
### Usage
3234

33-
Django Macros Urls used same way as django standart urls. You just import this and declare your patterns with macros.
35+
Django Macros URLs used the same way as Django standard URLs. You just import this and declare your
36+
patterns with macros.
3437

35-
Also you can register new macro (or maybe you want to replace default macro with your like regex pattern) with `macrosurl.register(macro, pattern)` method.
38+
Also, you can register new macro (or maybe you want to replace default macro with your like regex
39+
pattern) with `macrosurl.register(macro, pattern)` method.
3640

37-
Example of registration.
41+
An example of registration.
3842

3943
```python
4044
import macrosurl
@@ -48,29 +52,30 @@ urlpatterns = patterns(
4852
)
4953
```
5054

51-
You free to register custom macro anywhere (i do it in main urls.py file). Macros Urls uses lazy initiazation. Macros will be compiled only on first request.
55+
Feel free to register custom macro anywhere (i do it in main urls.py file). Macros URLs uses lazy
56+
initialization. Macros will be compiled only on the first request.
5257

53-
### Urls normalization
58+
### URL normalization
5459

55-
Once Macros Url finished compile regex pattern, it makes normalization of it by rules:
60+
Once Macros URL completed compile regex pattern, it makes normalization of it by rules:
5661

5762
- Strip from left side all whitespace and ^
5863
- Strip from right side of pattern all whitespace and $
5964
- Add to left side ^
6065
- Add to right side $
6166

62-
This makes your urls always very strong to adding any unexpected params into path.
67+
This makes your URLs always very strong to adding any unexpected params into a path.
6368

64-
### Auto-calling as_view on CBV objects.
69+
### Auto-calling as_view() on CBV objects.
6570

66-
Library check type of view and if view is type object with defined 'as_view' function, call this. This allow
71+
Library check type of view and if a view is type object with defined 'as_view' function, call this. This allows
6772
you omit ".as_view()" calls in your urls.py files. But you can call this manual with params if you need.
6873

69-
This feature help you to keep your urls.py files must clean as possible. I hope you like this feature!
74+
This feature helps you to keep your urls.py files clean as possible. I hope you like this feature!
7075

7176
### Examples
7277

73-
Macro Url example urls.py file
78+
Macros URL example urls.py file
7479

7580
```python
7681
from django.conf.urls import patterns
@@ -90,7 +95,7 @@ urlpatterns = patterns(
9095
)
9196
```
9297

93-
Django way urls example
98+
Standard Django urls example
9499

95100
```python
96101
from django.conf.urls import patterns
@@ -115,14 +120,11 @@ I think you understand the difference of ways :)
115120

116121
#### Routing must be simple! ;-)
117122

118-
I think real raw url regexp patterns needed in 1% case only. Prefer simple way to write (and read, this is important) fancy clean urls.
123+
I think raw URL regexp patterns needed in 1% case only. I prefer simple way to write (and read, this is
124+
important) fancy clean URLs.
119125

120126
### Contributor
121127

122-
Alexandr Shurigin (aka [phpdude](https://github.com/phpdude/))
128+
[Alexandr Shurigin](https://github.com/phpdude/)
123129

124-
### Additionals
125-
126-
Sorry for my english level :(
127-
128-
You are welcome fix readme to good english by pull request! Thank you.
130+
You are welcome to contribute by PR.

0 commit comments

Comments
 (0)