mirror of
				https://github.com/SectorLabs/django-localized-fields.git
				synced 2025-11-04 03:58:58 +03:00 
			
		
		
		
	Add FAQ to the README
This commit is contained in:
		
							
								
								
									
										36
									
								
								README.rst
									
									
									
									
									
								
							
							
						
						
									
										36
									
								
								README.rst
									
									
									
									
									
								
							@@ -24,6 +24,7 @@ In the pipeline
 | 
				
			|||||||
We're working on making this easier to setup and use. Any feedback is apreciated. Here's a short list of things we're working to improve:
 | 
					We're working on making this easier to setup and use. Any feedback is apreciated. Here's a short list of things we're working to improve:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* Make it unnecesarry to add anything to your `INSTALLED_APPS`.
 | 
					* Make it unnecesarry to add anything to your `INSTALLED_APPS`.
 | 
				
			||||||
 | 
					* Move generic PostgreSQL code to a separate package.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Installation
 | 
					Installation
 | 
				
			||||||
------------
 | 
					------------
 | 
				
			||||||
@@ -242,3 +243,38 @@ Besides ``LocalizedField``, there's also:
 | 
				
			|||||||
              class MyModel(LocalizedModel):
 | 
					              class MyModel(LocalizedModel):
 | 
				
			||||||
                   title = LocalizedField()
 | 
					                   title = LocalizedField()
 | 
				
			||||||
                   description = LocalizedBleachField()
 | 
					                   description = LocalizedBleachField()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Frequently asked questions (FAQ)
 | 
				
			||||||
 | 
					--------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Why do I need to change the database back-end/engine?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    We utilize PostgreSQL's `hstore` data type, which allows you to store key-value pairs in a column.  In order to create `UNIQUE` constraints on specific key, we need to create a special type of index. We could do this without a custom database back-end, but it would require everyone to manually write their migrations. By using a custom database back-end, we added support for this. When changing the `uniqueness` constraint on a `LocalizedField`, our custom database back-end takes care of creating, updating and deleting these constraints/indexes in the database.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. I am already using a custom database back-end, can I still use yours?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Yes. You can set the ``LOCALIZED_FIELDS_DB_BACKEND_BASE`` setting to your current back-end. This will instruct our custom database back-end to inherit from the database back-end you specified. **Warning**: this will only work if the base you specified indirectly inherits from the standard PostgreSQL database back-end.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					3. Does this package work with Python 2?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    No. Only Python 3.5 or newer is supported. We're using type hints. These do not work well under older versions of Python.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4. Does this package work with Django 1.X?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    No. Only Django 1.10 or newer is supported. This is because we rely on Django's ``HStoreField``.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					5. Does this package come with support for Django Admin?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Yes. Our custom fields come with a special form that will automatically be used in Django Admin if the field is of ``LocalizedField``.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					7. Why should I pick this over any of the other translation packages out there?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    You should pick whatever you feel comfortable with. This package stores translations in your database without having to have translation tables. It however only works on PostgreSQL.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					8. I am using PostgreSQL <8.4, can I use this?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    No. The ``hstore`` data type was introduced in PostgreSQL 8.4.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					9. I am using this package. Can I give you some beer?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Yes! If you're ever in the area of Cluj-Napoca, Romania, swing by :)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user