├── .gitignore ├── MANIFEST.in ├── README.rst ├── licenses ├── gnu-gpl-v2.0.txt ├── gnu-gpl-v3.0.txt └── mit-license.txt ├── saved_search ├── __init__.py ├── groupsearch.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_add_field_SavedSearch_name_slug.py │ ├── 0003_add_field_SavedSearch_querystring.py │ ├── 0004_auto__del_field_savedsearch_group__add_field_savedsearch_country__add_.py │ ├── 0005_auto.py │ ├── 0006_auto__add_field_savedsearch_site.py │ ├── 0007_add_field_SavedSearch_urlslab.py │ ├── 0008_auto__del_field_savedsearch_urlslab__add_field_savedsearch_url.py │ ├── 0009_auto__del_field_savedsearch_url__add_field_savedsearch_url_slab.py │ ├── 0010_auto__add_field_savedsearch_blurb__add_field_savedsearch_show_blurb__a.py │ ├── 0011_auto__del_field_savedsearch_site__add_field_savedsearch_group.py │ ├── 0012_auto__chg_field_savedsearch_city__chg_field_savedsearch_keyword__chg_f.py │ ├── 0013_auto__chg_field_savedsearch_querystring.py │ └── 0014_auto__del_field_savedsearch_keyword.py ├── models.py ├── templates │ ├── admin │ │ └── saved_search │ │ │ └── savedsearch │ │ │ └── change_form.html │ ├── base.html │ ├── saved_search │ │ ├── base.html │ │ └── savedsearchform.html │ ├── savedsearchform.html │ └── userhome.html ├── urls.py └── views.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.gz 2 | *.pyc 3 | locpop.py 4 | python_usdol.py 5 | .idea -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include setup.py MANIFEST.in 2 | recursive-include saved_search/templates * 3 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Saved Search 2 | ======= 3 | Saved Search is a tool for storing search queries as recallable objects. It is funded and maintained by DirectEmployers Foundation. 4 | 5 | Copyright and License 6 | --------------------- 7 | Copyright (C) 2012-2013, DirectEmployers Foundation. This project is provided under 8 | a triple license that allows you to select the license that is best for your 9 | needs. You may choose from: 10 | 11 | - The GNU GPL v2.0 12 | - The GNU GPL v3.0 13 | - The MIT License 14 | 15 | You can read the licenses in the licenses directory. 16 | 17 | 18 | More information 19 | ---------------- 20 | Information about DirectEmployers Foundation can be found at http://directemployersfoundation.org 21 | -------------------------------------------------------------------------------- /licenses/gnu-gpl-v2.0.txt: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | -------------------------------------------------------------------------------- /licenses/gnu-gpl-v3.0.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DirectEmployers/saved-search/5ccc79dde6cf6346735646cfef47c700eec1b6c7/licenses/gnu-gpl-v3.0.txt -------------------------------------------------------------------------------- /licenses/mit-license.txt: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining 2 | a copy of this software and associated documentation files (the 3 | "Software"), to deal in the Software without restriction, including 4 | without limitation the rights to use, copy, modify, merge, publish, 5 | distribute, sublicense, and/or sell copies of the Software, and to 6 | permit persons to whom the Software is furnished to do so, subject to 7 | the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be 10 | included in all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 16 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 17 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 18 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /saved_search/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DirectEmployers/saved-search/5ccc79dde6cf6346735646cfef47c700eec1b6c7/saved_search/__init__.py -------------------------------------------------------------------------------- /saved_search/groupsearch.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.utils import tree 3 | 4 | from haystack.backends import log_query, EmptyResults, BaseEngine, SearchNode 5 | from haystack.backends.solr_backend import SolrSearchBackend, SolrSearchQuery 6 | from haystack.constants import ID, DJANGO_CT, DJANGO_ID 7 | from haystack.models import SearchResult 8 | from haystack.query import SearchQuerySet, SQ 9 | 10 | from pysolr import SolrError 11 | 12 | 13 | class GroupQuerySet(SearchQuerySet): 14 | def group_query(self, *args, **kwargs): 15 | """ 16 | Performs a group query against a standard query. 17 | Works in the same manner as .filter(). 18 | 19 | """ 20 | clone = self._clone() 21 | clone.query.add_group_query(*args, **kwargs) 22 | return clone 23 | 24 | def __len__(self): 25 | if not self.query._results: 26 | qc = self.query.get_count() 27 | 28 | return len(self.query._results) 29 | 30 | 31 | class GroupQueryError(Exception): 32 | def __init__(self, value): 33 | self.param = value 34 | 35 | def __str__(self): 36 | return repr(self.param) 37 | 38 | 39 | class SolrGroupSearchBackend(SolrSearchBackend): 40 | """ 41 | Solr's result grouping feature is very useful but provides results of 42 | a different structure than standard "vanilla" queries that pysolr & 43 | Haystack are oriented toward. This backend, in conjunction with my 44 | fork of pysolr, the SolrGroupSearchQuery and GroupQuerySet, provides 45 | compatibility with results of this nature. 46 | 47 | http://wiki.apache.org/solr/FieldCollapsing 48 | 49 | """ 50 | @log_query 51 | def search(self, query_string, sort_by=None, start_offset=0, end_offset=None, 52 | fields='', highlight=False, facets=None, date_facets=None, 53 | query_facets=None, narrow_queries=None, spelling_query=None, 54 | limit_to_registered_models=None, result_class=None, group=True, 55 | group_ngroups=True, group_query=[], group_format="simple", 56 | **kwargs): 57 | 58 | if not group_query: 59 | raise GroupQueryError("You must specify at least one group query.") 60 | 61 | if len(query_string) == 0: 62 | return { 63 | 'results': [], 64 | 'hits': 0, 65 | } 66 | 67 | kwargs = { 68 | 'fl': '* score', 69 | 'group': group, 70 | 'group.ngroups': group_ngroups, 71 | 'group.format': group_format, 72 | 'group.query': group_query 73 | } 74 | 75 | if fields: 76 | kwargs['fl'] = fields 77 | 78 | if sort_by is not None: 79 | kwargs['sort'] = sort_by 80 | 81 | if start_offset is None and end_offset is None: 82 | kwargs['rows'] = 1 83 | elif start_offset is not None: 84 | kwargs['start'] = start_offset 85 | elif end_offset is not None: 86 | kwargs['rows'] = end_offset - start_offset 87 | 88 | if highlight is True: 89 | kwargs['hl'] = 'true' 90 | kwargs['hl.fragsize'] = '200' 91 | 92 | if self.include_spelling is True: 93 | kwargs['spellcheck'] = 'true' 94 | kwargs['spellcheck.collate'] = 'true' 95 | kwargs['spellcheck.count'] = 1 96 | 97 | if spelling_query: 98 | kwargs['spellcheck.q'] = spelling_query 99 | 100 | if facets is not None: 101 | kwargs['facet'] = 'on' 102 | kwargs['facet.field'] = facets.keys() 103 | 104 | for facet_field, options in facets.items(): 105 | for key, value in options.items(): 106 | kwargs['f.%s.facet.%s' % (facet_field, key)] = self.conn._from_python(value) 107 | 108 | 109 | kwargs['group'] = self.conn._from_python(kwargs['group']) 110 | kwargs['group.ngroups'] = self.conn._from_python(kwargs['group.ngroups']) 111 | 112 | if date_facets is not None: 113 | kwargs['facet'] = 'on' 114 | kwargs['facet.date'] = date_facets.keys() 115 | kwargs['facet.date.other'] = 'none' 116 | 117 | for key, value in date_facets.items(): 118 | kwargs["f.%s.facet.date.start" % key] = self.conn._from_python( 119 | value.get('start_date')) 120 | kwargs["f.%s.facet.date.end" % key] = self.conn._from_python( 121 | value.get('end_date')) 122 | gap_by_string = value.get('gap_by').upper() 123 | gap_string = "%d%s" % (value.get('gap_amount'), gap_by_string) 124 | 125 | if value.get('gap_amount') != 1: 126 | gap_string += "S" 127 | 128 | kwargs["f.%s.facet.date.gap" % key] = '+%s/%s' % (gap_string, 129 | gap_by_string) 130 | 131 | if query_facets is not None: 132 | kwargs['facet'] = 'on' 133 | kwargs['facet.query'] = ["%s:%s" % (field, value) for field, value 134 | in query_facets] 135 | 136 | if limit_to_registered_models is None: 137 | lrm = 'HAYSTACK_LIMIT_TO_REGISTERED_MODELS' 138 | limit_to_registered_models = getattr(settings, lrm, True) 139 | 140 | if limit_to_registered_models: 141 | # Using narrow queries, limit the results to only models handled 142 | # with the current routers. 143 | if narrow_queries is None: 144 | narrow_queries = set() 145 | 146 | registered_models = self.build_models_list() 147 | 148 | if len(registered_models) > 0: 149 | narrow_queries.add('%s:(%s)' % (DJANGO_CT, 150 | ' OR '.join(registered_models))) 151 | 152 | if narrow_queries is not None: 153 | kwargs['fq'] = list(narrow_queries) 154 | 155 | try: 156 | raw_results = self.conn.search(query_string, **kwargs) 157 | except (IOError, SolrError) as e: 158 | if not self.silently_fail: 159 | raise 160 | 161 | self.log.error("Failed to query Solr using '%s': %s", query_string, 162 | e) 163 | raw_results = [EmptyResults()] 164 | 165 | if hasattr(raw_results, 'grouped'): 166 | return [self._process_results(res, highlight=highlight, 167 | result_class=result_class) 168 | for res in raw_results.grouped.iteritems()] 169 | else: 170 | return [] 171 | 172 | def _process_results(self, raw_results, highlight=False, result_class=None): 173 | from haystack import connections 174 | 175 | results = [] 176 | try: 177 | hits = raw_results[1]['doclist']['numFound'] 178 | except (KeyError, IndexError): 179 | hits = 0 180 | 181 | try: 182 | group = raw_results[0] 183 | except IndexError: 184 | group = "" 185 | 186 | facets = {} 187 | spelling_suggestion = None 188 | 189 | if result_class is None: 190 | result_class = SearchResult 191 | 192 | if hasattr(raw_results, 'facets'): 193 | facets = { 194 | 'fields': raw_results.facets.get('facet_fields', {}), 195 | 'dates': raw_results.facets.get('facet_dates', {}), 196 | 'queries': raw_results.facets.get('facet_queries', {}), 197 | } 198 | 199 | for key in ['fields']: 200 | for facet_field in facets[key]: 201 | # Convert to a two-tuple, as Solr's json format returns a list of 202 | # pairs. 203 | facets[key][facet_field] = zip(facets[key][facet_field][::2], 204 | facets[key][facet_field][1::2]) 205 | 206 | if self.include_spelling is True: 207 | if hasattr(raw_results, 'spellcheck'): 208 | if len(raw_results.spellcheck.get('suggestions', [])): 209 | # For some reason, it's an array of pairs. Pull off the 210 | # collated result from the end. 211 | spelling_suggestion = raw_results.spellcheck.get('suggestions')[-1] 212 | 213 | return { 214 | 'group': group, 215 | 'results': results, 216 | 'hits': hits, 217 | 'facets': facets, 218 | 'spelling_suggestion': spelling_suggestion 219 | } 220 | 221 | class SolrGroupSearchQuery(SolrSearchQuery): 222 | def __init__(self, **kwargs): 223 | super(SolrGroupSearchQuery, self).__init__(**kwargs) 224 | self.group = True 225 | self.gquery_filter = SearchNode() 226 | self.group_format = "simple" 227 | self.group_ngroups = True 228 | self.group_queries = set() 229 | 230 | def add_group_query(self, query_filter, use_or=False, is_master=True, 231 | tag=None): 232 | """ 233 | Adds a group query to the current query. 234 | """ 235 | if use_or: 236 | connector = SQ.OR 237 | else: 238 | connector = SQ.AND 239 | 240 | if self.gquery_filter and query_filter.connector != SQ.AND and len(query_filter) > 1: 241 | self.gquery_filter.start_subtree(connector) 242 | subtree = True 243 | else: 244 | subtree = False 245 | 246 | for child in query_filter.children: 247 | if isinstance(child, tree.Node): 248 | self.gquery_filter.start_subtree(connector) 249 | self.add_group_query(child, is_master=False) 250 | self.gquery_filter.end_subtree() 251 | else: 252 | expression, value = child 253 | self.gquery_filter.add((expression, value), connector) 254 | 255 | connector = query_filter.connector 256 | 257 | if query_filter.negated: 258 | self.gquery_filter.negate() 259 | 260 | if subtree: 261 | self.gquery_filter.end_subtree() 262 | 263 | if is_master: 264 | # If and only if we have iterated through all the children of the 265 | # query_filter, the SQ object, append the query fragment to the 266 | # set of group queries, and reset self.gquery_filter back to an 267 | # empty SearchNode. 268 | qfrag = self.gquery_filter.as_query_string(self.build_query_fragment) 269 | 270 | # If specified, add a local param to identify individual group 271 | # query statements. 272 | if tag: 273 | qfrag = '{!tag="%s"} ' % str(tag) + qfrag 274 | 275 | if qfrag: 276 | self.group_queries.add(qfrag) 277 | 278 | self.gquery_filter = SearchNode() 279 | 280 | def run(self, spelling_query=None, **kwargs): 281 | """Builds & executes the query. Returns a list of result groupings.""" 282 | final_query = self.build_query() 283 | 284 | kwargs['start_offset'] = self.start_offset 285 | kwargs['result_class'] = self.result_class 286 | kwargs['group_query'] = [i for i in self.group_queries] 287 | kwargs['group_format'] = self.group_format 288 | kwargs['group_ngroups'] = self.group_ngroups 289 | 290 | if self.order_by: 291 | order_by_list = [] 292 | 293 | for order_by in self.order_by: 294 | if order_by.startswith('-'): 295 | order_by_list.append('%s desc' % order_by[1:]) 296 | else: 297 | order_by_list.append('%s asc' % order_by) 298 | 299 | kwargs['sort_by'] = ", ".join(order_by_list) 300 | 301 | if self.narrow_queries: 302 | kwargs['narrow_queries'] = self.narrow_queries 303 | 304 | if self.query_facets: 305 | kwargs['query_facets'] = self.query_facets 306 | 307 | if self.end_offset is not None: 308 | kwargs['end_offset'] = self.end_offset 309 | 310 | if self.highlight: 311 | kwargs['highlight'] = self.highlight 312 | 313 | if spelling_query: 314 | kwargs['spelling_query'] = spelling_query 315 | 316 | self._results = self.backend.search(final_query, **kwargs) 317 | self._hit_count = sum([r['hits'] for r in self._results]) 318 | 319 | def has_run(self): 320 | """Indicates if any query has been run.""" 321 | return None not in (self._results, self._hit_count) 322 | 323 | def _clone(self, **kwargs): 324 | clone = super(SolrGroupSearchQuery, self)._clone(**kwargs) 325 | clone.group_queries = self.group_queries 326 | return clone 327 | 328 | 329 | class SolrGrpEngine(BaseEngine): 330 | backend = SolrGroupSearchBackend 331 | query = SolrGroupSearchQuery 332 | -------------------------------------------------------------------------------- /saved_search/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding model 'SavedSearch' 12 | db.create_table('saved_search_savedsearch', ( 13 | ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), 14 | ('name', self.gf('django.db.models.fields.CharField')(max_length=100)), 15 | ('name_slug', self.gf('django.db.models.fields.SlugField')(db_index=True, max_length=100, null=True, blank=True)), 16 | ('group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'], null=True, blank=True)), 17 | ('date_created', self.gf('django.db.models.fields.DateField')(auto_now=True, blank=True)), 18 | ('keyword', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), 19 | ('title', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), 20 | ('querystring', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True)), 21 | )) 22 | db.send_create_signal('saved_search', ['SavedSearch']) 23 | 24 | # Adding M2M table for field country on 'SavedSearch' 25 | db.create_table('saved_search_savedsearch_country', ( 26 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 27 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 28 | ('country', models.ForeignKey(orm['seo.country'], null=False)) 29 | )) 30 | db.create_unique('saved_search_savedsearch_country', ['savedsearch_id', 'country_id']) 31 | 32 | # Adding M2M table for field state on 'SavedSearch' 33 | db.create_table('saved_search_savedsearch_state', ( 34 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 35 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 36 | ('state', models.ForeignKey(orm['seo.state'], null=False)) 37 | )) 38 | db.create_unique('saved_search_savedsearch_state', ['savedsearch_id', 'state_id']) 39 | 40 | # Adding M2M table for field city on 'SavedSearch' 41 | db.create_table('saved_search_savedsearch_city', ( 42 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 43 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 44 | ('city', models.ForeignKey(orm['seo.city'], null=False)) 45 | )) 46 | db.create_unique('saved_search_savedsearch_city', ['savedsearch_id', 'city_id']) 47 | 48 | 49 | def backwards(self, orm): 50 | 51 | # Deleting model 'SavedSearch' 52 | db.delete_table('saved_search_savedsearch') 53 | 54 | # Removing M2M table for field country on 'SavedSearch' 55 | db.delete_table('saved_search_savedsearch_country') 56 | 57 | # Removing M2M table for field state on 'SavedSearch' 58 | db.delete_table('saved_search_savedsearch_state') 59 | 60 | # Removing M2M table for field city on 'SavedSearch' 61 | db.delete_table('saved_search_savedsearch_city') 62 | 63 | 64 | models = { 65 | 'auth.group': { 66 | 'Meta': {'object_name': 'Group'}, 67 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 68 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 69 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 70 | }, 71 | 'auth.permission': { 72 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 73 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 74 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 75 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 76 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 77 | }, 78 | 'contenttypes.contenttype': { 79 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 80 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 81 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 82 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 83 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 84 | }, 85 | 'saved_search.savedsearch': { 86 | 'Meta': {'object_name': 'SavedSearch'}, 87 | 'city': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.City']", 'null': 'True', 'blank': 'True'}), 88 | 'country': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.Country']", 'null': 'True', 'blank': 'True'}), 89 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 90 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 91 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 92 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 93 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 94 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 95 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 96 | 'state': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.State']", 'null': 'True', 'blank': 'True'}), 97 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 98 | }, 99 | 'seo.city': { 100 | 'Meta': {'object_name': 'City'}, 101 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 102 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 103 | 'nation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Country']"}) 104 | }, 105 | 'seo.country': { 106 | 'Meta': {'object_name': 'Country'}, 107 | 'abbrev': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 108 | 'abbrev_short': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), 109 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 110 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) 111 | }, 112 | 'seo.state': { 113 | 'Meta': {'unique_together': "(('name', 'nation'),)", 'object_name': 'State'}, 114 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 115 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 116 | 'nation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Country']"}) 117 | } 118 | } 119 | 120 | complete_apps = ['saved_search'] 121 | -------------------------------------------------------------------------------- /saved_search/migrations/0002_add_field_SavedSearch_name_slug.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding field 'SavedSearch.name_slug' 12 | db.add_column('saved_search_savedsearch', 'name_slug', self.gf('django.db.models.fields.SlugField')(db_index=True, max_length=100, null=True, blank=True), keep_default=False) 13 | 14 | 15 | def backwards(self, orm): 16 | 17 | # Deleting field 'SavedSearch.name_slug' 18 | db.delete_column('saved_search_savedsearch', 'name_slug') 19 | 20 | 21 | models = { 22 | 'auth.group': { 23 | 'Meta': {'object_name': 'Group'}, 24 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 | }, 28 | 'auth.permission': { 29 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 32 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 33 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 34 | }, 35 | 'contenttypes.contenttype': { 36 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 37 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 40 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 41 | }, 42 | 'saved_search.savedsearch': { 43 | 'Meta': {'object_name': 'SavedSearch'}, 44 | 'city': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.City']", 'null': 'True', 'blank': 'True'}), 45 | 'country': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.Country']", 'null': 'True', 'blank': 'True'}), 46 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 47 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 48 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 49 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 50 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 51 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 52 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 53 | 'state': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.State']", 'null': 'True', 'blank': 'True'}), 54 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 55 | }, 56 | 'seo.city': { 57 | 'Meta': {'object_name': 'City'}, 58 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 59 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 60 | 'nation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Country']"}) 61 | }, 62 | 'seo.country': { 63 | 'Meta': {'object_name': 'Country'}, 64 | 'abbrev': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 65 | 'abbrev_short': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), 66 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 67 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) 68 | }, 69 | 'seo.state': { 70 | 'Meta': {'unique_together': "(('name', 'nation'),)", 'object_name': 'State'}, 71 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 72 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 73 | 'nation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Country']"}) 74 | } 75 | } 76 | 77 | complete_apps = ['saved_search'] 78 | -------------------------------------------------------------------------------- /saved_search/migrations/0003_add_field_SavedSearch_querystring.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding field 'SavedSearch.querystring' 12 | db.add_column('saved_search_savedsearch', 'querystring', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 13 | 14 | 15 | def backwards(self, orm): 16 | 17 | # Deleting field 'SavedSearch.querystring' 18 | db.delete_column('saved_search_savedsearch', 'querystring') 19 | 20 | 21 | models = { 22 | 'auth.group': { 23 | 'Meta': {'object_name': 'Group'}, 24 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 | }, 28 | 'auth.permission': { 29 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 32 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 33 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 34 | }, 35 | 'contenttypes.contenttype': { 36 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 37 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 40 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 41 | }, 42 | 'saved_search.savedsearch': { 43 | 'Meta': {'object_name': 'SavedSearch'}, 44 | 'city': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.City']", 'null': 'True', 'blank': 'True'}), 45 | 'country': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.Country']", 'null': 'True', 'blank': 'True'}), 46 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 47 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 48 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 49 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 50 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 51 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 52 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 53 | 'state': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.State']", 'null': 'True', 'blank': 'True'}), 54 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 55 | }, 56 | 'seo.city': { 57 | 'Meta': {'object_name': 'City'}, 58 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 59 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 60 | 'nation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Country']"}) 61 | }, 62 | 'seo.country': { 63 | 'Meta': {'object_name': 'Country'}, 64 | 'abbrev': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 65 | 'abbrev_short': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}), 66 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 67 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) 68 | }, 69 | 'seo.state': { 70 | 'Meta': {'unique_together': "(('name', 'nation'),)", 'object_name': 'State'}, 71 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 72 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}), 73 | 'nation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Country']"}) 74 | } 75 | } 76 | 77 | complete_apps = ['saved_search'] 78 | -------------------------------------------------------------------------------- /saved_search/migrations/0004_auto__del_field_savedsearch_group__add_field_savedsearch_country__add_.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Deleting field 'SavedSearch.group' 12 | db.delete_column('saved_search_savedsearch', 'group_id') 13 | 14 | # Adding field 'SavedSearch.country' 15 | db.add_column('saved_search_savedsearch', 'country', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 16 | 17 | # Adding field 'SavedSearch.state' 18 | db.add_column('saved_search_savedsearch', 'state', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 19 | 20 | # Adding field 'SavedSearch.city' 21 | db.add_column('saved_search_savedsearch', 'city', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 22 | 23 | # Removing M2M table for field city on 'SavedSearch' 24 | db.delete_table('saved_search_savedsearch_city') 25 | 26 | # Removing M2M table for field country on 'SavedSearch' 27 | db.delete_table('saved_search_savedsearch_country') 28 | 29 | # Removing M2M table for field state on 'SavedSearch' 30 | db.delete_table('saved_search_savedsearch_state') 31 | 32 | # Adding M2M table for field group on 'SavedSearch' 33 | db.create_table('saved_search_savedsearch_group', ( 34 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 35 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 36 | ('group', models.ForeignKey(orm['auth.group'], null=False)) 37 | )) 38 | db.create_unique('saved_search_savedsearch_group', ['savedsearch_id', 'group_id']) 39 | 40 | 41 | def backwards(self, orm): 42 | 43 | # Adding field 'SavedSearch.group' 44 | db.add_column('saved_search_savedsearch', 'group', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.Group'], null=True, blank=True), keep_default=False) 45 | 46 | # Deleting field 'SavedSearch.country' 47 | db.delete_column('saved_search_savedsearch', 'country') 48 | 49 | # Deleting field 'SavedSearch.state' 50 | db.delete_column('saved_search_savedsearch', 'state') 51 | 52 | # Deleting field 'SavedSearch.city' 53 | db.delete_column('saved_search_savedsearch', 'city') 54 | 55 | # Adding M2M table for field city on 'SavedSearch' 56 | db.create_table('saved_search_savedsearch_city', ( 57 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 58 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 59 | ('city', models.ForeignKey(orm['seo.city'], null=False)) 60 | )) 61 | db.create_unique('saved_search_savedsearch_city', ['savedsearch_id', 'city_id']) 62 | 63 | # Adding M2M table for field country on 'SavedSearch' 64 | db.create_table('saved_search_savedsearch_country', ( 65 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 66 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 67 | ('country', models.ForeignKey(orm['seo.country'], null=False)) 68 | )) 69 | db.create_unique('saved_search_savedsearch_country', ['savedsearch_id', 'country_id']) 70 | 71 | # Adding M2M table for field state on 'SavedSearch' 72 | db.create_table('saved_search_savedsearch_state', ( 73 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 74 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 75 | ('state', models.ForeignKey(orm['seo.state'], null=False)) 76 | )) 77 | db.create_unique('saved_search_savedsearch_state', ['savedsearch_id', 'state_id']) 78 | 79 | # Removing M2M table for field group on 'SavedSearch' 80 | db.delete_table('saved_search_savedsearch_group') 81 | 82 | 83 | models = { 84 | 'auth.group': { 85 | 'Meta': {'object_name': 'Group'}, 86 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 87 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 88 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 89 | }, 90 | 'auth.permission': { 91 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 92 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 93 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 94 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 95 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 96 | }, 97 | 'contenttypes.contenttype': { 98 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 99 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 100 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 101 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 102 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 103 | }, 104 | 'saved_search.savedsearch': { 105 | 'Meta': {'object_name': 'SavedSearch'}, 106 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 107 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 108 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 109 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 110 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 111 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 112 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 113 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 114 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 115 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 116 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 117 | } 118 | } 119 | 120 | complete_apps = ['saved_search'] 121 | -------------------------------------------------------------------------------- /saved_search/migrations/0005_auto.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding M2M table for field site on 'SavedSearch' 12 | db.create_table('saved_search_savedsearch_site', ( 13 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 14 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 15 | ('seosite', models.ForeignKey(orm['seo.seosite'], null=False)) 16 | )) 17 | db.create_unique('saved_search_savedsearch_site', ['savedsearch_id', 'seosite_id']) 18 | 19 | 20 | def backwards(self, orm): 21 | 22 | # Removing M2M table for field site on 'SavedSearch' 23 | db.delete_table('saved_search_savedsearch_site') 24 | 25 | 26 | models = { 27 | 'auth.group': { 28 | 'Meta': {'object_name': 'Group'}, 29 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 30 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 31 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 32 | }, 33 | 'auth.permission': { 34 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 35 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 36 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 37 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 38 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 39 | }, 40 | 'contenttypes.contenttype': { 41 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 42 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 43 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 44 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 45 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 46 | }, 47 | 'saved_search.savedsearch': { 48 | 'Meta': {'object_name': 'SavedSearch'}, 49 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 50 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 51 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 52 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 53 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 54 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 55 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 56 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 57 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 58 | 'site': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.SeoSite']", 'null': 'True', 'blank': 'True'}), 59 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 60 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 61 | }, 62 | 'seo.businessunit': { 63 | 'Meta': {'object_name': 'BusinessUnit'}, 64 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 65 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 66 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 67 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 68 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 69 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 70 | }, 71 | 'seo.configuration': { 72 | 'Meta': {'object_name': 'Configuration'}, 73 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 74 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 75 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 76 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 77 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 78 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 79 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 80 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 81 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 82 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 83 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 84 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 85 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 86 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 87 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 88 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 89 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 90 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 91 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 92 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 93 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 94 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 95 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 96 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 97 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 98 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 99 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 100 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 101 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 102 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 103 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 104 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 105 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 106 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 107 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 108 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 109 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 110 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 111 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 112 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 113 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 114 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 115 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 116 | }, 117 | 'seo.facet': { 118 | 'Meta': {'object_name': 'facet'}, 119 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 120 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 121 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 122 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 123 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 124 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 125 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 126 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 127 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 128 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 129 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 130 | }, 131 | 'seo.facetjob': { 132 | 'Meta': {'object_name': 'facetJob'}, 133 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 134 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 135 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 136 | }, 137 | 'seo.googleanalytics': { 138 | 'Meta': {'object_name': 'GoogleAnalytics'}, 139 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 140 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 141 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 142 | }, 143 | 'seo.joblisting': { 144 | 'Meta': {'object_name': 'jobListing'}, 145 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 146 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 147 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 148 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 149 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 150 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 151 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 152 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 153 | 'description': ('django.db.models.fields.TextField', [], {}), 154 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 155 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 156 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 157 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 158 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 159 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 160 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 161 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 162 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 163 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 164 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 165 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 166 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 167 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 168 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 169 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 170 | }, 171 | 'seo.onet': { 172 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 173 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 174 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 175 | }, 176 | 'seo.seosite': { 177 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 178 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 179 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 180 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 181 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 182 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 183 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 184 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 185 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 186 | }, 187 | 'sites.site': { 188 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 189 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 190 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 191 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 192 | }, 193 | 'social_links.micrositecarousel': { 194 | 'Meta': {'object_name': 'MicrositeCarousel'}, 195 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 196 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 197 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 198 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 199 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 200 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 201 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 202 | } 203 | } 204 | 205 | complete_apps = ['saved_search'] 206 | -------------------------------------------------------------------------------- /saved_search/migrations/0006_auto__add_field_savedsearch_site.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding field 'SavedSearch.site' 12 | db.add_column('saved_search_savedsearch', 'site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['seo.SeoSite'], null=True), keep_default=False) 13 | 14 | # Removing M2M table for field site on 'SavedSearch' 15 | db.delete_table('saved_search_savedsearch_site') 16 | 17 | 18 | def backwards(self, orm): 19 | 20 | # Deleting field 'SavedSearch.site' 21 | db.delete_column('saved_search_savedsearch', 'site_id') 22 | 23 | # Adding M2M table for field site on 'SavedSearch' 24 | db.create_table('saved_search_savedsearch_site', ( 25 | ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), 26 | ('savedsearch', models.ForeignKey(orm['saved_search.savedsearch'], null=False)), 27 | ('seosite', models.ForeignKey(orm['seo.seosite'], null=False)) 28 | )) 29 | db.create_unique('saved_search_savedsearch_site', ['savedsearch_id', 'seosite_id']) 30 | 31 | 32 | models = { 33 | 'auth.group': { 34 | 'Meta': {'object_name': 'Group'}, 35 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 36 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 37 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 38 | }, 39 | 'auth.permission': { 40 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 41 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 42 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 43 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 44 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 45 | }, 46 | 'contenttypes.contenttype': { 47 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 48 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 49 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 50 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 51 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 52 | }, 53 | 'saved_search.savedsearch': { 54 | 'Meta': {'object_name': 'SavedSearch'}, 55 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 56 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 57 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 58 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 59 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 60 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 61 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 62 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 63 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 64 | 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.SeoSite']", 'null': 'True'}), 65 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 66 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 67 | }, 68 | 'seo.businessunit': { 69 | 'Meta': {'object_name': 'BusinessUnit'}, 70 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 71 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 72 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 73 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 74 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 75 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 76 | }, 77 | 'seo.configuration': { 78 | 'Meta': {'object_name': 'Configuration'}, 79 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 80 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 81 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 82 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 83 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 84 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 85 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 86 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 87 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 88 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 89 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 90 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 91 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 92 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 93 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 94 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 95 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 96 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 97 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 98 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 99 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 100 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 101 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 102 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 103 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 104 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 105 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 106 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 107 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 108 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 109 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 110 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 111 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 112 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 113 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 114 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 115 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 116 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 117 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 118 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 119 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 120 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 121 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 122 | }, 123 | 'seo.facet': { 124 | 'Meta': {'object_name': 'facet'}, 125 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 126 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 127 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 128 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 129 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 130 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 131 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 132 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 133 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 134 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 135 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 136 | }, 137 | 'seo.facetjob': { 138 | 'Meta': {'object_name': 'facetJob'}, 139 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 140 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 141 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 142 | }, 143 | 'seo.googleanalytics': { 144 | 'Meta': {'object_name': 'GoogleAnalytics'}, 145 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 146 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 147 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 148 | }, 149 | 'seo.joblisting': { 150 | 'Meta': {'object_name': 'jobListing'}, 151 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 152 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 153 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 154 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 155 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 156 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 157 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 158 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 159 | 'description': ('django.db.models.fields.TextField', [], {}), 160 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 161 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 162 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 163 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 164 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 165 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 166 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 167 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 168 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 169 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 170 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 171 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 172 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 173 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 174 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 175 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 176 | }, 177 | 'seo.onet': { 178 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 179 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 180 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 181 | }, 182 | 'seo.seosite': { 183 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 184 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 185 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 186 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 187 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 188 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 189 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 190 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 191 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 192 | }, 193 | 'sites.site': { 194 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 195 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 196 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 197 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 198 | }, 199 | 'social_links.micrositecarousel': { 200 | 'Meta': {'object_name': 'MicrositeCarousel'}, 201 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 202 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 203 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 204 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 205 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 206 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 207 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 208 | } 209 | } 210 | 211 | complete_apps = ['saved_search'] 212 | -------------------------------------------------------------------------------- /saved_search/migrations/0007_add_field_SavedSearch_urlslab.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding field 'SavedSearch.urlslab' 12 | db.add_column('saved_search_savedsearch', 'urlslab', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 13 | 14 | 15 | def backwards(self, orm): 16 | 17 | # Deleting field 'SavedSearch.urlslab' 18 | db.delete_column('saved_search_savedsearch', 'urlslab') 19 | 20 | 21 | models = { 22 | 'auth.group': { 23 | 'Meta': {'object_name': 'Group'}, 24 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 | }, 28 | 'auth.permission': { 29 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 32 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 33 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 34 | }, 35 | 'contenttypes.contenttype': { 36 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 37 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 40 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 41 | }, 42 | 'saved_search.savedsearch': { 43 | 'Meta': {'object_name': 'SavedSearch'}, 44 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 45 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 46 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 47 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 48 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 49 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 50 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 51 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 52 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 53 | 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.SeoSite']", 'null': 'True'}), 54 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 55 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 56 | 'urlslab': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 57 | }, 58 | 'seo.businessunit': { 59 | 'Meta': {'object_name': 'BusinessUnit'}, 60 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 61 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 62 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 63 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 64 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 65 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 66 | }, 67 | 'seo.configuration': { 68 | 'Meta': {'object_name': 'Configuration'}, 69 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 70 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 71 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 72 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 73 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 74 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 75 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 76 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 77 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 78 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 79 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 80 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 81 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 82 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 83 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 84 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 85 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 86 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 87 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 88 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 89 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 90 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 91 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 92 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 93 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 94 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 95 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 96 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 97 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 98 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 99 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 100 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 101 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 102 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 103 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 104 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 105 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 106 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 107 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 108 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 109 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 110 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 111 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 112 | }, 113 | 'seo.facet': { 114 | 'Meta': {'object_name': 'facet'}, 115 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 116 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 117 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 118 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 119 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 120 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 121 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 122 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 123 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 124 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 125 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 126 | }, 127 | 'seo.facetjob': { 128 | 'Meta': {'object_name': 'facetJob'}, 129 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 130 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 131 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 132 | }, 133 | 'seo.googleanalytics': { 134 | 'Meta': {'object_name': 'GoogleAnalytics'}, 135 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 136 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 137 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 138 | }, 139 | 'seo.joblisting': { 140 | 'Meta': {'object_name': 'jobListing'}, 141 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 142 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 143 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 144 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 145 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 146 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 147 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 148 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 149 | 'description': ('django.db.models.fields.TextField', [], {}), 150 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 151 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 152 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 153 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 154 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 155 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 156 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 157 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 158 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 159 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 160 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 161 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 162 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 163 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 164 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 165 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 166 | }, 167 | 'seo.onet': { 168 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 169 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 170 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 171 | }, 172 | 'seo.seosite': { 173 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 174 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 175 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 176 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 177 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 178 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 179 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 180 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 181 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 182 | }, 183 | 'sites.site': { 184 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 185 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 186 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 187 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 188 | }, 189 | 'social_links.micrositecarousel': { 190 | 'Meta': {'object_name': 'MicrositeCarousel'}, 191 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 192 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 193 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 194 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 195 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 196 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 197 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 198 | } 199 | } 200 | 201 | complete_apps = ['saved_search'] 202 | -------------------------------------------------------------------------------- /saved_search/migrations/0008_auto__del_field_savedsearch_urlslab__add_field_savedsearch_url.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Deleting field 'SavedSearch.urlslab' 12 | db.delete_column('saved_search_savedsearch', 'urlslab') 13 | 14 | # Adding field 'SavedSearch.url' 15 | db.add_column('saved_search_savedsearch', 'url', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 16 | 17 | 18 | def backwards(self, orm): 19 | 20 | # Adding field 'SavedSearch.urlslab' 21 | db.add_column('saved_search_savedsearch', 'urlslab', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 22 | 23 | # Deleting field 'SavedSearch.url' 24 | db.delete_column('saved_search_savedsearch', 'url') 25 | 26 | 27 | models = { 28 | 'auth.group': { 29 | 'Meta': {'object_name': 'Group'}, 30 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 31 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 32 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 33 | }, 34 | 'auth.permission': { 35 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 36 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 37 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 40 | }, 41 | 'contenttypes.contenttype': { 42 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 43 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 44 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 45 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 46 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 47 | }, 48 | 'saved_search.savedsearch': { 49 | 'Meta': {'object_name': 'SavedSearch'}, 50 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 51 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 52 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 53 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 54 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 55 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 56 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 57 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 58 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 59 | 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.SeoSite']", 'null': 'True'}), 60 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 61 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 62 | 'url': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 63 | }, 64 | 'seo.businessunit': { 65 | 'Meta': {'object_name': 'BusinessUnit'}, 66 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 67 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 68 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 69 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 70 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 71 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 72 | }, 73 | 'seo.configuration': { 74 | 'Meta': {'object_name': 'Configuration'}, 75 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 76 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 77 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 78 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 79 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 80 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 81 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 82 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 83 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 84 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 85 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 86 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 87 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 88 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 89 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 90 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 91 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 92 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 93 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 94 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 95 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 96 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 97 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 98 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 99 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 100 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 101 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 102 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 103 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 104 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 105 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 106 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 107 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 108 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 109 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 110 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 111 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 112 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 113 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 114 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 115 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 116 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 117 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 118 | }, 119 | 'seo.facet': { 120 | 'Meta': {'object_name': 'facet'}, 121 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 122 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 123 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 124 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 125 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 126 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 127 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 128 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 129 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 130 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 131 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 132 | }, 133 | 'seo.facetjob': { 134 | 'Meta': {'object_name': 'facetJob'}, 135 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 136 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 137 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 138 | }, 139 | 'seo.googleanalytics': { 140 | 'Meta': {'object_name': 'GoogleAnalytics'}, 141 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 142 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 143 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 144 | }, 145 | 'seo.joblisting': { 146 | 'Meta': {'object_name': 'jobListing'}, 147 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 148 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 149 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 150 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 151 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 152 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 153 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 154 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 155 | 'description': ('django.db.models.fields.TextField', [], {}), 156 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 157 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 158 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 159 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 160 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 161 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 162 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 163 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 164 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 165 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 166 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 167 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 168 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 169 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 170 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 171 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 172 | }, 173 | 'seo.onet': { 174 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 175 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 176 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 177 | }, 178 | 'seo.seosite': { 179 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 180 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 181 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 182 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 183 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 184 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 185 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 186 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 187 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 188 | }, 189 | 'sites.site': { 190 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 191 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 192 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 193 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 194 | }, 195 | 'social_links.micrositecarousel': { 196 | 'Meta': {'object_name': 'MicrositeCarousel'}, 197 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 198 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 199 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 200 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 201 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 202 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 203 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 204 | } 205 | } 206 | 207 | complete_apps = ['saved_search'] 208 | -------------------------------------------------------------------------------- /saved_search/migrations/0009_auto__del_field_savedsearch_url__add_field_savedsearch_url_slab.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Deleting field 'SavedSearch.url' 12 | db.delete_column('saved_search_savedsearch', 'url') 13 | 14 | # Adding field 'SavedSearch.url_slab' 15 | db.add_column('saved_search_savedsearch', 'url_slab', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 16 | 17 | 18 | def backwards(self, orm): 19 | 20 | # Adding field 'SavedSearch.url' 21 | db.add_column('saved_search_savedsearch', 'url', self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True), keep_default=False) 22 | 23 | # Deleting field 'SavedSearch.url_slab' 24 | db.delete_column('saved_search_savedsearch', 'url_slab') 25 | 26 | 27 | models = { 28 | 'auth.group': { 29 | 'Meta': {'object_name': 'Group'}, 30 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 31 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 32 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 33 | }, 34 | 'auth.permission': { 35 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 36 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 37 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 40 | }, 41 | 'contenttypes.contenttype': { 42 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 43 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 44 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 45 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 46 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 47 | }, 48 | 'saved_search.savedsearch': { 49 | 'Meta': {'object_name': 'SavedSearch'}, 50 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 51 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 52 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 53 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 54 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 55 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 56 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 57 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 58 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 59 | 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.SeoSite']", 'null': 'True'}), 60 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 61 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 62 | 'url_slab': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 63 | }, 64 | 'seo.businessunit': { 65 | 'Meta': {'object_name': 'BusinessUnit'}, 66 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 67 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 68 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 69 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 70 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 71 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 72 | }, 73 | 'seo.configuration': { 74 | 'Meta': {'object_name': 'Configuration'}, 75 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 76 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 77 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 78 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 79 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 80 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 81 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 82 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 83 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 84 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 85 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 86 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 87 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 88 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 89 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 90 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 91 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 92 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 93 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 94 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 95 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 96 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 97 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 98 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 99 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 100 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 101 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 102 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 103 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 104 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 105 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 106 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 107 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 108 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 109 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 110 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 111 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 112 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 113 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 114 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 115 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 116 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 117 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 118 | }, 119 | 'seo.facet': { 120 | 'Meta': {'object_name': 'facet'}, 121 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 122 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 123 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 124 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 125 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 126 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 127 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 128 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 129 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 130 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 131 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 132 | }, 133 | 'seo.facetjob': { 134 | 'Meta': {'object_name': 'facetJob'}, 135 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 136 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 137 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 138 | }, 139 | 'seo.googleanalytics': { 140 | 'Meta': {'object_name': 'GoogleAnalytics'}, 141 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 142 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 143 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 144 | }, 145 | 'seo.joblisting': { 146 | 'Meta': {'object_name': 'jobListing'}, 147 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 148 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 149 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 150 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 151 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 152 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 153 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 154 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 155 | 'description': ('django.db.models.fields.TextField', [], {}), 156 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 157 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 158 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 159 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 160 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 161 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 162 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 163 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 164 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 165 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 166 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 167 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 168 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 169 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 170 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 171 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 172 | }, 173 | 'seo.onet': { 174 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 175 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 176 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 177 | }, 178 | 'seo.seosite': { 179 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 180 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 181 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 182 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 183 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 184 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 185 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 186 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 187 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 188 | }, 189 | 'sites.site': { 190 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 191 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 192 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 193 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 194 | }, 195 | 'social_links.micrositecarousel': { 196 | 'Meta': {'object_name': 'MicrositeCarousel'}, 197 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 198 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 199 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 200 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 201 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 202 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 203 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 204 | } 205 | } 206 | 207 | complete_apps = ['saved_search'] 208 | -------------------------------------------------------------------------------- /saved_search/migrations/0010_auto__add_field_savedsearch_blurb__add_field_savedsearch_show_blurb__a.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Adding field 'SavedSearch.blurb' 12 | db.add_column('saved_search_savedsearch', 'blurb', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False) 13 | 14 | # Adding field 'SavedSearch.show_blurb' 15 | db.add_column('saved_search_savedsearch', 'show_blurb', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False) 16 | 17 | # Adding field 'SavedSearch.show_production' 18 | db.add_column('saved_search_savedsearch', 'show_production', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) 19 | 20 | 21 | def backwards(self, orm): 22 | 23 | # Deleting field 'SavedSearch.blurb' 24 | db.delete_column('saved_search_savedsearch', 'blurb') 25 | 26 | # Deleting field 'SavedSearch.show_blurb' 27 | db.delete_column('saved_search_savedsearch', 'show_blurb') 28 | 29 | # Deleting field 'SavedSearch.show_production' 30 | db.delete_column('saved_search_savedsearch', 'show_production') 31 | 32 | 33 | models = { 34 | 'auth.group': { 35 | 'Meta': {'object_name': 'Group'}, 36 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 37 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 38 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 39 | }, 40 | 'auth.permission': { 41 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 42 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 43 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 44 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 45 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 46 | }, 47 | 'contenttypes.contenttype': { 48 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 49 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 50 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 51 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 52 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 53 | }, 54 | 'saved_search.savedsearch': { 55 | 'Meta': {'object_name': 'SavedSearch'}, 56 | 'blurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 57 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 58 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 59 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 60 | 'group': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 61 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 62 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 63 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 64 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 65 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 66 | 'show_blurb': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 67 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 68 | 'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.SeoSite']", 'null': 'True'}), 69 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 70 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 71 | 'url_slab': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 72 | }, 73 | 'seo.businessunit': { 74 | 'Meta': {'object_name': 'BusinessUnit'}, 75 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 76 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 77 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 78 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 79 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 80 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 81 | }, 82 | 'seo.configuration': { 83 | 'Meta': {'object_name': 'Configuration'}, 84 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 85 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 86 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 87 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 88 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 89 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 90 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 91 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 92 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 93 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 94 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 95 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 96 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 97 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 98 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 99 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 100 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 101 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 102 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 103 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 104 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 105 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 106 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 107 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 108 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 109 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 110 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 111 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 112 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 113 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 114 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 115 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 116 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 117 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 118 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 119 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 120 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 121 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 122 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 123 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 124 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 125 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 126 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 127 | }, 128 | 'seo.facet': { 129 | 'Meta': {'object_name': 'facet'}, 130 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 131 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 132 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 133 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 134 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 135 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 136 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 137 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 138 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 139 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 140 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 141 | }, 142 | 'seo.facetjob': { 143 | 'Meta': {'object_name': 'facetJob'}, 144 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 145 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 146 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 147 | }, 148 | 'seo.googleanalytics': { 149 | 'Meta': {'object_name': 'GoogleAnalytics'}, 150 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 151 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 152 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 153 | }, 154 | 'seo.joblisting': { 155 | 'Meta': {'object_name': 'jobListing'}, 156 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 157 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 158 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 159 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 160 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 161 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 162 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 163 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 164 | 'description': ('django.db.models.fields.TextField', [], {}), 165 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 166 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 167 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 168 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 169 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 170 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 171 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 172 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 173 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 174 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 175 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 176 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 177 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 178 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 179 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 180 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 181 | }, 182 | 'seo.onet': { 183 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 184 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 185 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 186 | }, 187 | 'seo.seosite': { 188 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 189 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 190 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 191 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 192 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 193 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 194 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 195 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 196 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 197 | }, 198 | 'sites.site': { 199 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 200 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 201 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 202 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 203 | }, 204 | 'social_links.micrositecarousel': { 205 | 'Meta': {'object_name': 'MicrositeCarousel'}, 206 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 207 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 208 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 209 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 210 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 211 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 212 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 213 | } 214 | } 215 | 216 | complete_apps = ['saved_search'] 217 | -------------------------------------------------------------------------------- /saved_search/migrations/0013_auto__chg_field_savedsearch_querystring.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Changing field 'SavedSearch.querystring' 12 | db.alter_column('saved_search_savedsearch', 'querystring', self.gf('django.db.models.fields.CharField')(max_length=2000, null=True)) 13 | 14 | 15 | def backwards(self, orm): 16 | 17 | # Changing field 'SavedSearch.querystring' 18 | db.alter_column('saved_search_savedsearch', 'querystring', self.gf('django.db.models.fields.CharField')(max_length=255, null=True)) 19 | 20 | 21 | models = { 22 | 'auth.group': { 23 | 'Meta': {'object_name': 'Group'}, 24 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 | }, 28 | 'auth.permission': { 29 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 32 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 33 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 34 | }, 35 | 'contenttypes.contenttype': { 36 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 37 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 40 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 41 | }, 42 | 'saved_search.savedsearch': { 43 | 'Meta': {'object_name': 'SavedSearch'}, 44 | 'blurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 45 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 46 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 47 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 48 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 49 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 50 | 'keyword': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 51 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 52 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 53 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}), 54 | 'show_blurb': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 55 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 56 | 'site': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.SeoSite']", 'null': 'True', 'symmetrical': 'False'}), 57 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 58 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 59 | 'url_slab': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 60 | }, 61 | 'seo.businessunit': { 62 | 'Meta': {'object_name': 'BusinessUnit'}, 63 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 64 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 65 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 66 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 67 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 68 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 69 | }, 70 | 'seo.configuration': { 71 | 'Meta': {'object_name': 'Configuration'}, 72 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 73 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 74 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 75 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 76 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 77 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 78 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 79 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 80 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 81 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 82 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 83 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 84 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 85 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 86 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 87 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 88 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 89 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 90 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 91 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 92 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 93 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 94 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 95 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 96 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 97 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 98 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 99 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 100 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 101 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 102 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 103 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 104 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 105 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 106 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 107 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 108 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 109 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 110 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 111 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 112 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 113 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 114 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 115 | }, 116 | 'seo.facet': { 117 | 'Meta': {'object_name': 'facet'}, 118 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 119 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 120 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 121 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 122 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 123 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 124 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 125 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 126 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 127 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 128 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 129 | }, 130 | 'seo.facetjob': { 131 | 'Meta': {'object_name': 'facetJob'}, 132 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 133 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 134 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 135 | }, 136 | 'seo.googleanalytics': { 137 | 'Meta': {'object_name': 'GoogleAnalytics'}, 138 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 139 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 140 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 141 | }, 142 | 'seo.joblisting': { 143 | 'Meta': {'object_name': 'jobListing'}, 144 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 145 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 146 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 147 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 148 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 149 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 150 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 151 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 152 | 'description': ('django.db.models.fields.TextField', [], {}), 153 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 154 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 155 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 156 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 157 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 158 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 159 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 160 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 161 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 162 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 163 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 164 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 165 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 166 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 167 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 168 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 169 | }, 170 | 'seo.onet': { 171 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 172 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 173 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 174 | }, 175 | 'seo.seosite': { 176 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 177 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 178 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 179 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 180 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 181 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 182 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 183 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 184 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 185 | }, 186 | 'sites.site': { 187 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 188 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 189 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 190 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 191 | }, 192 | 'social_links.micrositecarousel': { 193 | 'Meta': {'object_name': 'MicrositeCarousel'}, 194 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 195 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 196 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 197 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 198 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 199 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 200 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 201 | } 202 | } 203 | 204 | complete_apps = ['saved_search'] 205 | -------------------------------------------------------------------------------- /saved_search/migrations/0014_auto__del_field_savedsearch_keyword.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import datetime 3 | from south.db import db 4 | from south.v2 import SchemaMigration 5 | from django.db import models 6 | 7 | class Migration(SchemaMigration): 8 | 9 | def forwards(self, orm): 10 | 11 | # Deleting field 'SavedSearch.keyword' 12 | db.delete_column('saved_search_savedsearch', 'keyword') 13 | 14 | 15 | def backwards(self, orm): 16 | 17 | # Adding field 'SavedSearch.keyword' 18 | db.add_column('saved_search_savedsearch', 'keyword', self.gf('django.db.models.fields.CharField')(max_length=800, null=True, blank=True), keep_default=False) 19 | 20 | 21 | models = { 22 | 'auth.group': { 23 | 'Meta': {'object_name': 'Group'}, 24 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 25 | 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 26 | 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) 27 | }, 28 | 'auth.permission': { 29 | 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, 30 | 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 31 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 32 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 33 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 34 | }, 35 | 'contenttypes.contenttype': { 36 | 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 37 | 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 38 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 39 | 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 40 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) 41 | }, 42 | 'saved_search.savedsearch': { 43 | 'Meta': {'object_name': 'SavedSearch'}, 44 | 'blurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 45 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 46 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 47 | 'date_created': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}), 48 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True', 'blank': 'True'}), 49 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 50 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 51 | 'name_slug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '100', 'null': 'True', 'blank': 'True'}), 52 | 'querystring': ('django.db.models.fields.CharField', [], {'max_length': '2000', 'null': 'True', 'blank': 'True'}), 53 | 'show_blurb': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 54 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 55 | 'site': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.SeoSite']", 'null': 'True', 'symmetrical': 'False'}), 56 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 57 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '800', 'null': 'True', 'blank': 'True'}), 58 | 'url_slab': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}) 59 | }, 60 | 'seo.businessunit': { 61 | 'Meta': {'object_name': 'BusinessUnit'}, 62 | 'associated_jobs': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 63 | 'date_crawled': ('django.db.models.fields.DateTimeField', [], {}), 64 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 65 | 'id': ('django.db.models.fields.IntegerField', [], {'max_length': '10', 'primary_key': 'True'}), 66 | 'scheduled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 67 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}) 68 | }, 69 | 'seo.configuration': { 70 | 'Meta': {'object_name': 'Configuration'}, 71 | 'backgroundColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 72 | 'browse_city_order': ('django.db.models.fields.IntegerField', [], {'default': '3'}), 73 | 'browse_city_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 74 | 'browse_city_text': ('django.db.models.fields.CharField', [], {'default': "'City'", 'max_length': '50'}), 75 | 'browse_country_order': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 76 | 'browse_country_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 77 | 'browse_country_text': ('django.db.models.fields.CharField', [], {'default': "'Country'", 'max_length': '50'}), 78 | 'browse_facet_order': ('django.db.models.fields.IntegerField', [], {'default': '5'}), 79 | 'browse_facet_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 80 | 'browse_facet_text': ('django.db.models.fields.CharField', [], {'default': "'Job Profiles'", 'max_length': '50'}), 81 | 'browse_moc_order': ('django.db.models.fields.IntegerField', [], {'default': '6'}), 82 | 'browse_moc_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 83 | 'browse_moc_text': ('django.db.models.fields.CharField', [], {'default': "'Military Titles'", 'max_length': '50'}), 84 | 'browse_state_order': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 85 | 'browse_state_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 86 | 'browse_state_text': ('django.db.models.fields.CharField', [], {'default': "'State'", 'max_length': '50'}), 87 | 'browse_title_order': ('django.db.models.fields.IntegerField', [], {'default': '4'}), 88 | 'browse_title_show': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 89 | 'browse_title_text': ('django.db.models.fields.CharField', [], {'default': "'Title'", 'max_length': '50'}), 90 | 'css_body': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 91 | 'defaultBlurb': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 92 | 'defaultBlurbTitle': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 93 | 'directemployers_link': ('django.db.models.fields.URLField', [], {'default': "'http://directemployers.org'", 'max_length': '200'}), 94 | 'facet_tag': ('django.db.models.fields.CharField', [], {'default': "'new-jobs'", 'max_length': '50'}), 95 | 'fontColor': ('django.db.models.fields.CharField', [], {'default': "'666666'", 'max_length': '6'}), 96 | 'footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 97 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 98 | 'header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 99 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 100 | 'location_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs'", 'max_length': '50'}), 101 | 'meta': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 102 | 'moc_tag': ('django.db.models.fields.CharField', [], {'default': "'vet-jobs'", 'max_length': '50'}), 103 | 'num_filter_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 104 | 'num_job_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '10'}), 105 | 'num_subnav_items_to_show': ('django.db.models.fields.IntegerField', [], {'default': '9'}), 106 | 'primaryColor': ('django.db.models.fields.CharField', [], {'default': "'990000'", 'max_length': '6'}), 107 | 'revision': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 108 | 'secondaryColor': ('django.db.models.fields.CharField', [], {'max_length': '6', 'null': 'True', 'blank': 'True'}), 109 | 'status': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True', 'blank': 'True'}), 110 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}), 111 | 'title_tag': ('django.db.models.fields.CharField', [], {'default': "'jobs-in'", 'max_length': '50'}), 112 | 'useCssBody': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 113 | 'wide_footer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 114 | 'wide_header': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}) 115 | }, 116 | 'seo.facet': { 117 | 'Meta': {'object_name': 'facet'}, 118 | 'always_show': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 119 | 'childFacet': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.facet']", 'symmetrical': 'False', 'blank': 'True'}), 120 | 'default_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '3'}), 121 | 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 122 | 'facetSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 123 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 124 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 125 | 'jobListing': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.jobListing']", 'symmetrical': 'False', 'through': "orm['seo.facetJob']", 'blank': 'True'}), 126 | 'show_description': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 127 | 'show_production': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 128 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) 129 | }, 130 | 'seo.facetjob': { 131 | 'Meta': {'object_name': 'facetJob'}, 132 | 'facet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.facet']"}), 133 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 134 | 'jobListing': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.jobListing']"}) 135 | }, 136 | 'seo.googleanalytics': { 137 | 'Meta': {'object_name': 'GoogleAnalytics'}, 138 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 139 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 140 | 'web_property_id': ('django.db.models.fields.CharField', [], {'max_length': '20'}) 141 | }, 142 | 'seo.joblisting': { 143 | 'Meta': {'object_name': 'jobListing'}, 144 | 'buid': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.BusinessUnit']"}), 145 | 'city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 146 | 'citySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 147 | 'country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 148 | 'countrySlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 149 | 'country_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 150 | 'date_new': ('django.db.models.fields.DateTimeField', [], {}), 151 | 'date_updated': ('django.db.models.fields.DateTimeField', [], {}), 152 | 'description': ('django.db.models.fields.TextField', [], {}), 153 | 'f_city': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 154 | 'f_country': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 155 | 'f_state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 156 | 'f_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 157 | 'hitkey': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 158 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 159 | 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}), 160 | 'location': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 161 | 'onet': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['seo.Onet']", 'null': 'True', 'blank': 'True'}), 162 | 'reqid': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 163 | 'state': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 164 | 'stateSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '50', 'null': 'True', 'blank': 'True'}), 165 | 'state_short': ('django.db.models.fields.CharField', [], {'max_length': '3', 'null': 'True', 'blank': 'True'}), 166 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 167 | 'titleSlug': ('django.db.models.fields.SlugField', [], {'db_index': 'True', 'max_length': '200', 'null': 'True', 'blank': 'True'}), 168 | 'uid': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'db_index': 'True'}) 169 | }, 170 | 'seo.onet': { 171 | 'Meta': {'unique_together': "(('title', 'code'),)", 'object_name': 'Onet'}, 172 | 'code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'primary_key': 'True'}), 173 | 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) 174 | }, 175 | 'seo.seosite': { 176 | 'Meta': {'ordering': "('domain',)", 'object_name': 'SeoSite', '_ormbases': ['sites.Site']}, 177 | 'business_units': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.BusinessUnit']", 'null': 'True', 'blank': 'True'}), 178 | 'configurations': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['seo.Configuration']", 'symmetrical': 'False', 'blank': 'True'}), 179 | 'default_facet': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'filtered_sites'", 'null': 'True', 'to': "orm['seo.facet']"}), 180 | 'facets': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.facet']", 'null': 'True', 'blank': 'True'}), 181 | 'google_analytics': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['seo.GoogleAnalytics']", 'null': 'True', 'blank': 'True'}), 182 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 183 | 'microsite_carousel': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['social_links.MicrositeCarousel']", 'null': 'True', 'blank': 'True'}), 184 | 'site_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['sites.Site']", 'unique': 'True', 'primary_key': 'True'}) 185 | }, 186 | 'sites.site': { 187 | 'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"}, 188 | 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 189 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 190 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) 191 | }, 192 | 'social_links.micrositecarousel': { 193 | 'Meta': {'object_name': 'MicrositeCarousel'}, 194 | 'carousel_title': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 195 | 'display_rows': ('django.db.models.fields.IntegerField', [], {}), 196 | 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.Group']", 'null': 'True'}), 197 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 198 | 'include_all_sites': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 199 | 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 200 | 'link_sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'related_name': "'linked_carousel'", 'null': 'True', 'symmetrical': 'False', 'to': "orm['seo.SeoSite']"}) 201 | }, 202 | 'taggit.tag': { 203 | 'Meta': {'object_name': 'Tag'}, 204 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 205 | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 206 | 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}) 207 | }, 208 | 'taggit.taggeditem': { 209 | 'Meta': {'object_name': 'TaggedItem'}, 210 | 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}), 211 | 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 212 | 'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}), 213 | 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"}) 214 | } 215 | } 216 | 217 | complete_apps = ['saved_search'] 218 | -------------------------------------------------------------------------------- /saved_search/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | SOLR_ESCAPE_CHARS = ['+', '-', '&&', '||', '!', '(', ')', '{', '}', '[', ']', 4 | '^', '~', '"', '*', '?'] 5 | 6 | 7 | class BaseSavedSearch(models.Model): 8 | name = models.CharField(max_length=100, 9 | help_text=("""A concise and descriptive name for 10 | this saved search, e.g.: Nursing Jobs, 11 | Tech Support Jobs in Texas""")) 12 | name_slug = models.SlugField(max_length=100, blank=True, null=True) 13 | date_created = models.DateField(auto_now=True) 14 | querystring = models.CharField(max_length=7000, null=True, blank=True) 15 | title = models.CharField(max_length=800, null=True, blank=True, 16 | help_text=(""" 17 | A comma-separated list of job titles to 18 | search on. Terms entered here will refer 19 | to job titles as provided in your 20 | company's job listings. e.g.: 21 | Dental Technician,Office Assistant 22 | """)) 23 | url_slab = models.CharField(max_length=255, null=True, blank=True) 24 | blurb = models.TextField(null=True, blank=True) 25 | show_blurb = models.BooleanField("Use Saved Search Blurb", default=True) 26 | show_production = models.BooleanField("Show in Production", default=False) 27 | 28 | #make specific text fields sortable as boolean objects in the admin panel 29 | querystring.char_as_boolean_filter = True 30 | blurb.char_as_boolean_filter = True 31 | 32 | def __unicode__(self): 33 | return '%s' % self.name 34 | 35 | def get_sqs(self, *args, **kwargs): 36 | """Return a list of results.""" 37 | raise NotImplementedError 38 | 39 | def _escape(self): 40 | """Escape special characters.""" 41 | raise NotImplementedError 42 | 43 | def _make_qs(self): 44 | """Generate atomic elements of query.""" 45 | raise NotImplementedError 46 | 47 | def _full_qs(self): 48 | """Combine the atomic elements of query into single query.""" 49 | raise NotImplementedError 50 | 51 | class Meta: 52 | abstract = True 53 | 54 | -------------------------------------------------------------------------------- /saved_search/templates/admin/saved_search/savedsearch/change_form.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/change_form.html" %} 2 | -------------------------------------------------------------------------------- /saved_search/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |